Lost in transit
Networks drop packets. TCP guarantees delivery anyway, so it must notice when a segment never arrives and send it again. It uses two signals to decide.
Timers and duplicates
- The retransmission timeout, the RTO, fires when an acknowledgment has not arrived in time, and TCP resends the unacknowledged segment.
- Duplicate ACKs arrive when later segments get through but one is missing, and three of them trigger a fast retransmit without waiting for the timer.
The RTO is not a fixed number. TCP measures the round trip time continuously and computes a smoothed estimate plus a variance margin, so the timeout tracks the real network. When a retransmission still fails, the timer backs off exponentially, doubling on each attempt.
Why two mechanisms
Waiting for the timer alone would be slow, since the RTO is conservative to avoid needless resends. Fast retransmit reacts in a fraction of that time when later data confirms a single gap, giving TCP both safety and speed.
Key idea
TCP resends lost segments using an adaptive retransmission timeout, and accelerates with fast retransmit after three duplicate acknowledgments.