Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

TCP Congestion Control in Computer Networks, Slides of Computer Networks

The concept of TCP congestion control in computer networks. It describes how TCP determines the available capacity in the network and limits the number of packets in transit to avoid congestion. It also explains the additive increase multiplicative decrease (AIMD) mechanism used by TCP to increase or decrease the congestion window. Additionally, the document discusses the slow start mechanism used to increase the congestion window rapidly from a cold start and the fast retransmit and fast recovery mechanisms added to TCP to avoid long periods of connection dead time.

Typology: Slides

2022/2023

Available from 07/13/2023

sunny-singh-13
sunny-singh-13 🇮🇳

22 documents

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Program Name :B.Tech
Semester :ECE 6th Sem
Course Name: Computer Network
Course Code:EC 602
Facilitator Name: Megha Dewan
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download TCP Congestion Control in Computer Networks and more Slides Computer Networks in PDF only on Docsity!

Program Name :B.Tech

Semester :ECE 6th Sem

Course Name: Computer Network

Course Code:EC 602

Facilitator Name: Megha Dewan

Module:-

TCP Congestion Control

Chapter Outline  TCP Congestion Control  Congestion Avoidance Mechanism  Quality of Service

TCP Congestion Control  TCP congestion control was introduced into the Internet in the late 1980s by Van Jacobson, roughly eight years after the TCP/IP protocol stack had become operational.  Immediately preceding this time, the Internet was suffering from congestion collapse—  hosts would send their packets into the Internet as fast as the advertised window would allow, congestion would occur at some router (causing packets to be dropped), and the hosts would time out and retransmit their packets, resulting in even more congestion

TCP Congestion Control  Additive Increase Multiplicative Decrease  TCP maintains a new state variable for each connection, called CongestionWindow , which is used by the source to limit how much data it is allowed to have in transit at a given time.  The congestion window is congestion control’s counterpart to flow control’s advertised window.  TCP is modified such that the maximum number of bytes of unacknowledged data allowed is now the minimum of the congestion window and the advertised window

TCP Congestion Control  Additive Increase Multiplicative Decrease  TCP’s effective window is revised as follows:  MaxWindow = MIN(CongestionWindow, AdvertisedWindow)  EffectiveWindow = MaxWindow − (LastByteSent − LastByteAcked).  That is, MaxWindow replaces AdvertisedWindow in the calculation of EffectiveWindow.  Thus, a TCP source is allowed to send no faster than the slowest component—the network or the destination host—can accommodate.

TCP Congestion Control  Additive Increase Multiplicative Decrease  The key question, then, is how does the source determine that the network is congested and that it should decrease the congestion window?  The answer is based on the observation that the main reason packets are not delivered, and a timeout results, is that a packet was dropped due to congestion. It is rare that a packet is dropped because of an error during transmission.  (^) Therefore, TCP interprets timeouts as a sign of congestion and reduces the rate at which it is transmitting.  (^) Specifically, each time a timeout occurs, the source sets CongestionWindow to half of its previous value. This halving of the CongestionWindow for each timeout corresponds to the “multiplicative decrease” part of AIMD.

TCP Congestion Control  Additive Increase Multiplicative Decrease  Although CongestionWindow is defined in terms of bytes, it is easiest to understand multiplicative decrease if we think in terms of whole packets.  For example, suppose the CongestionWindow is currently set to 16 packets. If a loss is detected, CongestionWindow is set to 8.  (^) Additional losses cause CongestionWindow to be reduced to 4, then 2, and finally to 1 packet.  (^) CongestionWindow is not allowed to fall below the size of a single packet, or in TCP terminology, the maximum segment size (MSS).

TCP Congestion Control  Additive Increase Multiplicative Decrease Packets in transit during additive increase, with one packet being added each RTT.

TCP Congestion Control  Additive Increase Multiplicative Decrease  (^) Note that in practice, TCP does not wait for an entire window’s worth of ACKs to add 1 packet’s worth to the congestion window, but instead increments CongestionWindow by a little for each ACK that arrives.  (^) Specifically, the congestion window is incremented as follows each time an ACK arrives:  (^) Increment = MSS × (MSS/CongestionWindow)  (^) CongestionWindow+= Increment  (^) That is, rather than incrementing CongestionWindow by an entire MSS bytes each RTT, we increment it by a fraction of MSS every time an ACK is received.  (^) Assuming that each ACK acknowledges the receipt of MSS bytes, then that fraction is MSS/CongestionWindow.

TCP Congestion Control  Slow Start  Specifically, the source starts out by setting CongestionWindow to one packet.  When the ACK for this packet arrives, TCP adds 1 to CongestionWindow and then sends two packets.  Upon receiving the corresponding two ACKs, TCP increments CongestionWindow by 2—one for each ACK—and next sends four packets.  The end result is that TCP effectively doubles the number of packets it has in transit every RTT.

TCP Congestion Control  Slow Start Packets in transit during slow start.

TCP Congestion Control  Slow Start  There are actually two different situations in which slow start runs.  The second situation in which slow start is used is a bit more subtle; it occurs when the connection goes dead while waiting for a timeout to occur.  (^) Recall how TCP’s sliding window algorithm works—when a packet is lost, the source eventually reaches a point where it has sent as much data as the advertised window allows, and so it blocks while waiting for an ACK that will not arrive.  (^) Eventually, a timeout happens, but by this time there are no packets in transit, meaning that the source will receive no ACKs to “clock” the transmission of new packets.  (^) The source will instead receive a single cumulative ACK that reopens the entire advertised window, but as explained above, the source then uses slow start to restart the flow of data rather than dumping a whole window’s worth of data on the network all at once.

TCP Congestion Control  Slow Start  Although the source is using slow start again, it now knows more information than it did at the beginning of a connection.  Specifically, the source has a current (and useful) value of CongestionWindow; this is the value of CongestionWindow that existed prior to the last packet loss, divided by 2 as a result of the loss.  We can think of this as the “target” congestion window.  Slow start is used to rapidly increase the sending rate up to this value, and then additive increase is used beyond this point.