2.2.2. Packet Loss

The loss of a data packet is handled by introducing acknowledgements. The recipient is expected to acknowledge the delivery of a data packet by sending an acknowledgement packet to the sender of the data packet. When the recipient does not acknowledge the data packet within a timeout, the sender concludes that the packet has been lost and sends it again.

An important issue is the choice of timeout. With a timeout too short, the sender will needlessly resend data packets even when no loss occurs. With a timeout too long, the recipient will needlessly wait for data packets when a loss occurs. The issue is resolved by having an adaptive timeout that grows exponentially when a loss occurs to avoid causing network congestion.

To minimize waiting when damage to a packet is detected, positive and negative acknowledgement packets, denoted as ACK and NAK, can be distinguished. The recipient uses ACK to indicate a correct packet and NAK to indicate a damaged packet. With the timeout necessarily longer than the roundtrip time of the data and acknowledgement packets, sender will sooner get NAK than timeout waiting for ACK.

Given that an acknowledgement packet can be lost same as a data packet, the introduction of acknowledgements can lead to a situation where the data packet is delivered but the corresponding acknowledgement packet is lost. To the sender, this looks the same as if the data packet was lost and the corresponding acknowledgement packet was never sent. Eventually, this leads to a duplication of the data packet.