I am developing a TCP implementation and could not find a clarification to this in the relevant RFCs (793, 1122, 5681, 6298). When the retransmission timer expires, the first segment which has once been sent but has not yet been acknowledged is retransmitted, and CWND is set to one segment. Then slow-start is supposed to be used, which will increase CWND by one segment for each new ACK.
The question is whether the other already sent segments are effectively re-queued for transmission as if they had never been sent. Particularly, suppose an ACK is received which increases CWND sufficiently to allow sending one of the remaining already-sent segments, but does not acknowledge it. Should such a segment be transmitted now, or only upon the next expiration of the retransmission timer?
- The following segments are sent for the first time (represented by their sequence numbers): 1000, 2000, 3000, 4000. Both CWND (congestion window) and SND_WND (receiver window) were large enough for these segments to be sent.
- The retransmission timer expires before any ACK is received. Segment 1000 is retransmitted. Slow-start begins and hence CWND is reduced to 1000 (=MSS).
- An ACK num 2000 is received, acknowledging the first but not any other segments. CWND is increased to 2000 as per the slow-start algorithm.
- At this point, the CWND permits transmission of segments 2000 and 3000. Are segments 2000 and 3000 transmitted now, or would it take another expiration of the retransmission timer to transmit segment 2000?