ExampleDifficulty: Intermediate1 min

Retransmission Example: One Segment Is Lost

Segment two of five vanishes; follow the duplicate acknowledgements until it is sent again.

TCP notices a lost segment from repeated acknowledgements, and sends it again. A client sends five segments of 100 bytes, starting at sequence number 1001, and the second is lost on the way. The numbers are illustrative, and each segment is acknowledged on its own to keep the picture clear.

Five segments with one lost, three duplicate acknowledgements and the retransmission

Three things are worth noticing.

The receiver keeps asking for the same byte. Segments 3, 4 and 5 arrive, but byte 1101 is still missing, so every acknowledgement names 1101. The server holds those later segments in its buffer; it does not discard them.

Three duplicates trigger the resend. One duplicate acknowledgement may only mean segments arrived out of order, so TCP waits for three before deciding the segment is lost. It then sends it again at once, without waiting for a timer. This is fast retransmit. If too few later segments are in flight to produce three duplicates, the sender falls back on a retransmission timer instead, which waits at least a second for its first try, a much longer stall.

The acknowledgement jumps. Once the missing segment arrives, the server has every byte up to 1500, so its next acknowledgement is 1501, covering the resent segment and the three it was already holding. Nothing after the loss is sent twice.

The cost is visible too: the data in segments 3 to 5 reached the server early but could not be handed to the program until the gap was filled.