Telecommunications Tutorials

Tutorial: How Packets Get "Lost"

How Packets Get "Lost"

Packet networks can be prone to packet loss. Packet loss can attributed to many reasons such as contention and collisions on a LAN, physical link errors, and congestion at routers and switches due to high traffic volumes, traffic policing and enforcement on WAN services.

Perhaps the most common mechanism for packets disappearing is due to buffer overwriting on routers.

packet loss
Click the illustration to watch a short video illustrating packet loss due to buffer overwriting

A typical router or switch can only process one packet at a time. For each of multiple high-speed (LAN) inputs to the router, a small amount of memory called a buffer is provided. Packets arriving on each input are stored in that input's buffer.

The router's processor services each buffer in turn (if there is no prioritization), extracting a packet, making a routing decision and sending it on its way. If prioritization is implemented, the processor services the buffers in the order dictated by the prioritization or queuing algorithm.

As packets are stored into the buffer, the pointer for where the next new packet should be written into the buffer is moved down. When it hits the end of the memory space which is the buffer, the pointer cycles back to the top. Sometimes they are called circular buffers for this reason.

The problem happens when the router's processor can't service all the buffers fast enough and a buffer fills up with unread packets, then the pointer for where to write the next new incoming packet moves to point to a slot already occupied by the oldest unread packet, and writes the newest packet in that slot. Poof! The oldest packet in the buffer disappears, never to be heard from again.

Here's a short video illustrating the effect.

If the packet was part of a file transfer, TCP will retransmit the missing part of the file in a new packet. If the packet was part of a live telephone conversation or live streaming video, UDP will let the receiver know a piece is missing... but the receiver will have to guess what the missing information is, as there is no time to retransmit it.


Source: