Chapter 3.2. Retransmission in TCP

INTRODUCTION

In the last exercise, we examined the basics of the Transmission Control Protocol (TCP). We discussed how TCP provides reliable data transmission over an unreliable network by relying on feedback from the receiver to detect loss. We said that TCP responds to indications of packet loss by retransmitting. However, in the traces we looked at, all the packets were received correctly the first time and thus there was no retransmission. In this exercise, we are going to examine traces of TCP connections in which retransmission does occur.

When a TCP sender transmits a segment, it also sets a timer called a retransmission timer. When an acknowledgment arrives, the timer is cancelled. If the timer expires before an acknowledgement of the data arrives, the data will be retransmitted.

The retransmission timer is set adaptively. Initially, TCP bases the retransmission timer on the time between the initial SYN and the SYN ACK. It actually sets the retransmission timer to several times this value to prevent unnecessary retransmission. Throughout the connection, TCP notes the time between each segment sent and its corresponding acknowledgement. A running average of these times is computed in which more weight is given to the accumulated average than the most recent sample.

TCP does not always wait for a retransmission timer to expire before retransmitting data. TCP will also interpret a series of duplicate acknowledgements as an early sign of packet ...

Get Computer Networking: Internet Protocols in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.