3.3.7
Packet Switching
What's in a Packet?
What's in a Packet?
When data is split into packets, it is bundled with extra information which tries to make sure that it will reach its destination safely.
Payload
Payload
- The payload of a packet is the actual data that was intended to be sent.
Header
Header
- A header is also attached to the packet.
- A header includes useful information such as:
- The intended recipient's IP address.
- The sender's IP address.
- The sequence number (so we can re-arrange the packets into the correct order at the other end).
- A checksum (to make sure the data was sent correctly).
How do Packets get Routed?
How do Packets get Routed?
Packet switching is the process of breaking data down into packets, sending them across the Internet to another computer, and then re-assembling the data.
Sender's local area network
Sender's local area network
- The sender will generate data in an application on their computer.
- This happens at the application layer.
- The data is split into packets of data.
- This happens at the transport layer.
- Internet Protocol adds IP addresses to each packet.
- This happens at the Internet layer.
- Packets are grouped into frames and sent to the router on the LAN.
- This happens at the Network layer.
Over the Internet
Over the Internet
- The sender's router inspects the packet to determine if the destination IP is on the current LAN.
- If it is not then it will send the packet onto the Internet (or other wide area network).
- This happens at the Internet layer.
- Each packet is sent from the sender's router to the destination router via connected routers.
- The path of each packet can be different, which maximises efficient use of the network by avoiding bottlenecks.
Recipient's local area network
Recipient's local area network
- Because they have taken different paths, the packets at the destination will be in the wrong order.
- These packets are unpackaged and reassembled into the correct order using the sequence number of each packet.
Did my Data Arrive Safely?
Did my Data Arrive Safely?
Interference across a network can cause data to become corrupted (changed) as it is transmitted to the recipient.
Lost packets
Lost packets
- Some packets might get lost within the network.
- Each packet transfer will have a certain timeout, which is the maximum amount of time that the packet transfer is expected to take.
- If the time taken is more than the timeout, then we send a timeout signal to the sender to ask them to re-send the packet.
Checksums
Checksums
- A checksum is a piece of data which is generated from the payload.
- When data is assembled into packets, we calculate the checksum and send this along with the packet.
- When the data is received, the recipient can re-calculate the checksum from the data they receive and compare it to the checksum they received.
- If the values are different, then some of the data was corrupted.
- They can then request the data again.
Confirmation message
Confirmation message
- If all packets have been successfully received, then a confirmation message is sent to the sender.
- This lets them know that there were no issues in transmission that they might need to fix.
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Jump to other topics
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Unlock your full potential with GoStudent tutoring
Affordable 1:1 tutoring from the comfort of your home
Tutors are matched to your specific learning needs
30+ school subjects covered