Menu

Packet Switching

Packet Header

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 fieldWhat it containsWhy it is useful
Destination IP addressThe IP address of the device the packet is being sent toShows where the packet should go
Source IP addressThe IP address of the device that sent the packetShows where the packet came from
Sequence numberThe packet’s position in the sequenceHelps the receiver place packets in order
Total number of packetsHow many packets are in the whole communicationTells the receiver how many to expect
Error-checking data (may be included)Data used to check for damageHelps detect a corrupted packet

Without these fields, packets could not be directed correctly or identified as part of the same message.

Practise this