TCP is known as a connection-oriented protocol, which ensures reliability and is also responsible for congestion control mechanisms in the network. TCP Tahoe and TCP Reno are two techniques of TCP congestion control, these are used when the sender receives three duplicate acknowledgments.
TCP Tahoe where Tahoe is a lake in the USA. This particular TCP was designed around that lake and hence it was named TCP Tahoe. It was the first TCP variant with in-built congestion control algorithms. When TCP was first designed in 1981, congestion control was not an integral part of it.
TCP Tahoe = Slow Start + AIMD + Fast Retransmit
Slow Start phase: It lasts until the congestion window size reaches up to “Slow Start Threshold (ssthresh)“. The slow start algorithm doubles the congestion window size(cwnd) in one RTT. Initially, ssthresh is set to infinite(∞). Subsequently, it adapts depending on the packet loss events. When cwnd becomes equal to ssthresh, slow start stops. After that AIMD phase takeovers.
AIMD phase: It starts when the slow start stops. Additive Increase increases cwnd by 1 and Multiplicative Decrease reduces ssthresh to 50% of cwnd. Note that cwnd is ‘not’ reduced by 50% but ssthresh. This is the point to note that cwnd again resets to the initial window size (10 in Linux kernel).
Fast Retransmit phase: It is the loss detection algorithm. It is triggered by 3 duplicate acknowledgments. On packet loss detection, it resets cwnd to initcwnd.
Suppose cwnd = 200 and packet loss occurs, then
ssthresh=cwnd/2= 100; cwnd will be reset to initcwnd value that is 10.
Again slow start will begin.
Now say cwnd increases to 20, 40, 80 and 100 in 5th RTT.
Once cwnd reached ssthresh, AIMD starts.
AIMD increases cwnd by 1 per RTT, so if packet drop occurs at cwnd = 125
then cwnd=10 and ssthresh=62 and Slow Start Restarts.
Note: Packet loss can be detected either by RTO algorithm or Fast Retransmit. In both cases, cwnd will be reset to 10 and ssthresh=cwnd/2 and Slow Start restarts again.
It is the extension of TCP Tahoe.
TCP Reno = TCP Tahoe + Fast Recovery
Since TCP Reno is the extension of TCP Tahoe, the slow start and AIMD phase are the same.
Fast Recovery phase
It makes use of both RTO and Fast Retransmit. If the packet loss detection is triggered by 3 duplicate acknowledgments then it is a fast retransmit algorithm in action. On packet loss detection through Fast Retransmit, cwnd is reduced by 50% (cwnd = cwnd/2). 3 duplicate ACKs are received that means network is performing well because ACKs are being received which means packets are getting delivered to the receiver. So, cwnd is reduced by 50% in order to allow the network to come out of congested state. On packet loss detection through RTO, reset cwnd to initcwnd. If the RTO timer expires that means the network is badly congested. So, the cwnd has to be reduced to the initial value in order to recover the network from congestion.
1) packet loss detected using 3-duplicate ACK (aka Fast Retransmit).
cwnd will be reduced to 50%, cwnd=60
ssthresh will be new cwnd, ssthresh=60
Now Reno has entered Fast Recovery Phase, it skips the slow start and AIMD takes over. Whereas in Tahoe
Slow Start restarts when packet loss is detected. This is the difference between these two.
2) Now say cwnd is reached to 70 in 10 more RTT from cwnd=60, after AIMD started.
packet drop occurs at cwnd=70, cwnd becomes 35 and ssthresh=35.
3) now cwnd increases to 50, and packet loss detected using RTO.
then cwnd=initial cwnd= 10, ssthresh=cwnd/2=25
Whenever packet loss detected, Reno never uses Slow Start again, it skip it.
Here are a portion of the critical contrasts between TCP Tahoe and TCP Reno:
1.Congestion Control: TCP Reno incorporates upgrades to the clog control calculation, for example, quick retransmit and quick recuperation, that permit it to answer all the more rapidly and proficiently to arrange blockage.
2.Speed: TCP Reno is for the most part quicker than TCP Tahoe in fast organizations since it can all the more rapidly recuperate from parcel misfortunes and increment the clog window size.
3.Robustness: TCP Reno is for the most part more powerful than TCP Tahoe within the sight of organization blockage since it can distinguish clog all the more rapidly and recuperate all the more effectively.
4.Complexity: TCP Reno is more mind boggling than TCP Tahoe in light of the fact that it incorporates extra highlights and improvements.
Comparison image for TCP Tahoe and Reno:
TCP Tahoe and Reno
Unlock the Power of Placement Preparation!
Feeling lost in OS, DBMS, CN, SQL, and DSA chaos? Our Complete Interview Preparation
Course is the ultimate guide to conquer placements. Trusted by over 100,000+ geeks, this course is your roadmap to interview triumph.
Ready to dive in? Explore our Free Demo Content and join our Complete Interview Preparation