You need to send data across a network shared by many users. If you dedicate the entire channel to one conversation (like a phone call), most of the channel sits idle during pauses. That’s wasteful. How do you share a single physical medium among thousands of conversations efficiently?
Break the data into small chunks called packets. Each packet carries the destination address. Packets from different conversations share the same physical links. Each packet may take a different route to the destination. The receiver reassembles them in order.
- Data is segmented into packets of bounded size
- Each packet gets a header with: source address, destination address, sequence number, error-checking info
- Packets are forwarded independently by intermediate nodes (routers)
- Different packets may take different paths
- Destination reassembles based on sequence numbers
- Statistical multiplexing — link capacity is shared dynamically, not pre-allocated
- No dedicated path — packets from the same conversation compete with others for bandwidth
- Store-and-forward — each router receives the full packet, checks it, then forwards
- Robust — if one path fails, packets can reroute through other paths
- Contrasts with: Circuit Switching — dedicated path vs shared, fixed bandwidth vs dynamic
- Related: Point-to-Point Links — packets are the unit of communication on point-to-point networks
- Related: OSI Model — Seven Layers — packets are Network Layer (L3) units
- Built from: Layered Architecture in Networking — packets exist because of layering
- Related: Broadcast Links — in broadcast networks, all nodes receive every packet but only process addressed ones
- Out-of-order delivery — packets may arrive in different order than sent; reassembly must handle this
- Packet loss — if a router’s buffer is full, it drops packets; higher layers must detect and retransmit
- Head-of-line blocking — a delayed packet at the front of a queue can block packets behind it
- Not the same as message switching — message switching sends the entire message as one unit; packet switching breaks it into smaller pieces