L14. Describe slow start and fast retransmit mechanisms in TCP Reno. Flashcards
What is TCP Reno?
A TCP congestion control algorithm, based on TCP Tahoe
What is Slow Start?
A congestion control algorithm used in TCP to manage the rate of data transmission and avoid overwhelming the network.
What is the goal of Slow Start?
The primary goal of slow start is to find an appropriate transmission rate without causing network congestion.
How does Slow Start work?
- When a TCP connection is established, the sender starts with a small congestion window (cwnd), typically set to one maximum segment size (MSS). This conservative starting point helps prevent overwhelming the network.
- For each acknowledgment (ACK) received, the cwnd increases by one MSS. Since multiple ACKs can be received within a single round-trip time (RTT), this results in an exponential increase in cwnd. This continues until a packet loss is detected or the congestion window reaches a threshold known as the slow start threshold (ssthresh).
- Once the cwnd surpasses the ssthresh, TCP shifts from slow start to congestion avoidance mode. In congestion avoidance, the increase in the cwnd is linear rather than exponential, growing by one MSS per RTT. This more gradual increase helps to balance the network load and reduce the risk of congestion.
What is ssthresh?
ssthresh stands for “slow start threshold” and is the maximum value of the congestion window for slow start; once the cwnd surpasses the sshtresh TCP shifts from slow start to congestion avoidance mode
What is cwnd?
cwnd stands for “congestion window” and represents the maximum amount of data a TCP sender can transmit without receiving an ACK from the receiver
What is the original size of the cwnd?
One MSS
How does the cwnd increase during Slow Start?
One MSS per ACK, effectively doubling the cwnd
How does the cwnd increase during Congestion Avoidance?
One MSS per RTT, which means the cwnd increases linearly instead of exponentially
What is Fast Retransmit?
Fast retransmit is a mechanism designed to quickly recover from packet loss without waiting for a timeout to occur. It works in conjunction with another mechanism called fast recovery.
How does Fast Retransmit work?
- When a packet is lost, the receiver detects the missing segment and continues to acknowledge the last correctly received segment, causing the sender to receive duplicate ACKs. In TCP Reno, receiving three duplicate ACKs (indicating that three subsequent packets have arrived out of order) triggers the fast retransmit mechanism.
- Upon receiving the third duplicate ACK, the sender immediately retransmits the lost packet without waiting for the retransmission timeout (RTO) to expire. This prompt retransmission reduces the idle time and helps maintain the flow of data.
- When fast retransmit is triggered, TCP Reno sets the ssthresh to half of the current cwnd (to reflect the reduced network capacity) and temporarily reduces the cwnd. This action signals the onset of congestion and prepares for the fast recovery phase.
How does TCP Reno detect packet loss?
From receiving three duplicate ACKs (indicating that three subsequent packets have arrived out of order) or RTO
What does TCP Reno do upon receiving three duplicate ACKs?
Employs Fast Retransmit, immediately retransmitting the lost packet without waiting for the retransmission timeout (RTO) to expire.
How does TCP Reno adjust the ssthresh and cwnd when fast retransmit has been triggered?
It sets ssthresh to half of the current cwnd (to reflect the reduced network capacity) and temporarily reduces the cwnd.
What phase does TCP Reno enter after Fast Retransmit?
Following the fast retransmit, TCP enters the fast recovery phase to quickly recover from the detected packet loss and resume efficient data transmission.