Packet Switching
A packet header is the control section at the start of a packet. It holds the details needed to move the packet across a network and to help the receiving device make sense of it. The header does not carry the data itself; it carries the details needed to deliver it.
Two key fields are the destination IP address and the source IP address. The destination IP address identifies where the packet is going, while the source IP address identifies where it came from. For example, if a tablet at home requests a web page from a web server, each packet’s header carries the tablet’s IP address as the source and the server’s IP address as the destination. This means the packet can be directed towards the right device, and the receiver knows who sent it.
Each header also includes a sequence number and the total number of packets in the communication. The sequence number shows the packet’s position in the sequence — for instance, a packet might be number 23 — and the total tells the receiver how many packets make up the whole message, such as 80. A header may also contain error-checking data, which lets the receiving device detect whether the packet was damaged on the way.
| Header field | What it contains | Why it is useful |
|---|---|---|
| Destination IP address | The IP address of the device the packet is being sent to | Shows where the packet should go |
| Source IP address | The IP address of the device that sent the packet | Shows where the packet came from |
| Sequence number | The packet’s position in the sequence | Helps the receiver place packets in order |
| Total number of packets | How many packets are in the whole communication | Tells the receiver how many to expect |
| Error-checking data (may be included) | Data used to check for damage | Helps detect a corrupted packet |
Without these fields, packets could not be directed correctly or identified as part of the same message.
Edexcel GCSE Computer Science · Packet Switching