Packet switching divides data into smaller units called packets, which may travel independently through a network. At the destination, sequence numbers place packets in the correct order so the original data can be reconstructed.
How Packet Switching Works
Before transmission, a message or file is divided into packets. Each packet contains a payload, which is part of the original data, and a header containing control information.
| Stage | What happens |
|---|---|
| Segmentation | The sender divides data into manageable packets. |
| Addressing | Headers identify source and destination addresses and may include sequence and error-checking information. |
| Routing | Routers examine destination information and forward each packet toward it. |
| Independent travel | Packets may follow different routes as routers respond to congestion or failures. |
| Arrival | Packets may arrive out of order, be duplicated, corrupted, or missing. |
| Reassembly | The receiver checks, orders, and combines payloads to reconstruct the data. |
With a reliable transport protocol such as TCP, sequence numbers identify each segment's position. The receiver uses error detection to identify corrupted data and acknowledgements to confirm receipt. Missing or corrupted data is retransmitted before the complete message is passed to the application.
Packet switching uses network capacity efficiently because many transmissions share communication links. It is also resilient: if one route is unavailable, routers can use another.
A common misconception is that all packets from one message must follow the same route. They do not; therefore, ordering and reliability mechanisms are needed at the destination.
Exam Technique
For an IB Computer Science explain question in A2.3 Data transmissions, link the stages: division into packets, header information, independent routing, possible out-of-order arrival, error checking, retransmission where required, and final reassembly. Do not claim that packet switching guarantees delivery; reliability depends on the protocols used. This causal chain is more valuable than a simple definition.