telecom • networking • design

an EventHelix.com blog


1 Comment

TCP fast retransmit and recovery

TCP Slow Start and Congestion Avoidance lower the data throughput drastically when segment loss is detected. Fast Retransmit and Fast Recovery have been designed to speed up the recovery of the connection, without compromising its congestion avoidance characteristics.

Fast Retransmit and Recovery detect a segment loss via duplicate acknowledgements. When a segment is lost, TCP at the receiver will keep sending ack segments indicating the next expected sequence number. This sequence number would correspond to the lost segment. If only one segment is lost, TCP will keep generating acks for the following segments. This will result in the transmitter getting duplicate acks (i.e. acks with the same ack sequence number)

Click here for TCP fast retransmit and recovery sequence diagrams

TCP fast retransmit

The transmitter acts on duplicate acks and retransmits the packet, without waiting for the segment timer expiry

TCP fast recovery

TCP maintains the current data flow

Click here for TCP fast retransmit and recovery sequence diagrams

Advertisements


Leave a comment

TCP congestion avoidance flow

We have already seen that TCP connection starts up in slow start mode, geometrically increasing the congestion window (cwnd) until it crosses the slow start threshold (ssthresh). Once cwnd is greater that ssthresh, TCP enters the congestion avoidance mode of operation. In this mode, the primary objective is to maintain high throughput without causing congestion. If TCP detects segment loss, it assumes that congestion has been detected over the internet. As a corrective action, TCP reduces its data flow rate by reducing cwnd. After reducing cwnd, TCP goes back to slow start.

We examine congestion avoidance in detail. We examine in detail how TCP reacts to the loss of a segment. The changes to the congestion window and the transition into slow start are covered in detail.

TCP congestion avoidance sequence diagram


1 Comment

TCP slow start sequence diagrams

TCP is an end to end protocol which operates over the heterogeneous Internet. TCP has no advance knowledge of the network characteristics, thus it has to adjust its behavior according to the current state of the network. TCP has built in support for congestion control. Congestion control ensures that TCP does not pump data at a rate higher than what the network can handle.

In this sequence diagram we will analyze “Slow start”, an important part of the congestion control mechanisms built right into TCP. As the name suggests, “Slow Start” starts slowly, increasing its window size as it gains confidence about the networks throughput.

TCP slow start overview

An overview of TCP slow start.

TCP slow start with socket level details

A detailed look at TCP slow start with socket level state transition details.

Analyze TCP slow start from the server point of view

A sequence diagram describing the slow start with a focus on server end interactions.

Client focused view of the slow start

A final look at slow start. This time with a focus on the client side.