TCP Congestion Control
TCP Congestion Control
As the network
is the main component in wireless communication, any congestion in a network must be avoided. If
the data sent by the sender is not delivered by the network, it must inform the sender about it. The
network, other than the receiver also helps in determining the sender’s window size.
Before understanding what is TCP congestion control, let’s first understand what you mean by
congestion in the TCP network.
Congestion is an important factor in packet switched network. It refers to the state of a network
where the message traffic becomes so heavy that the network response time slows down leading to
the failure of the packet. It leads to packet loss.
Due to this, it is necessary to control the congestion in the network, however, it cannot be avoided.
TCP congestion control refers to the mechanism that prevents congestion from happening or
removes it after congestion takes place.
When congestion takes place in the network, TCP handles it by reducing the size of the sender’s
window. The window size of the sender is determined by the following two factors:
It shows how much data can a receiver receive in bytes without giving any acknowledgment.
1. The sender should not send data greater than that of the size of receiver window.
2. If the data sent is greater than that of the size of the receiver’s window, then it
causes retransmission of TCP due to the dropping of TCP segment.
3. Hence sender should always send data that is less than or equal to the size of the receiver’s
window.
4. TCP header is used for sending the window size of the receiver to the sender.
Congestion Window
It is the state of TCP that limits the amount of data to be sent by the sender into the network even
before receiving the acknowledgment.
1. To calculate the size of the congestion window, different variants of TCP and methods are
used.
2. Only the sender knows the congestion window and its size and it is not sent over the link or
network.
The formula for determining the sender’s window size is:
Sender window size = Minimum (Receiver window size, Congestion window size)
• Excessive consumption of bandwidth– There might be certain devices that require more
bandwidth as compared to other devices. This can sometimes put a strain on the network
and its components like routers etc and can cause congestion of the network.
• Improper subnet management– In order to manage a larger network efficiently, the network
is divided into different subnets. If these subnets are not scaled and managed effectively
then network congestion takes place.
• Outdated hardware– Transmission of data might get hampered if old routers, switches, or
servers are used for communication.
• Border gateway protocol– All traffic in a network is routed by BGP by using the shortest
path. While routing, it doesn’t consider the amount of traffic present at a route. In a
situation like this, there can be a possibility that the packet is routed via the same route and
can cause congestion in the network.
1. Slow Start
2. Congestion Avoidance
3. Congestion Detection
In the slow start phase, the sender sets congestion window size = maximum segment size (1 MSS) at
the initial stage. The sender increases the size of the congestion window by 1 MSS after receiving the
ACK (acknowledgment).
The size of the congestion window increases exponentially in this phase.
The formula for determining the size of the congestion window is
Congestion window size = Congestion window size + Maximum segment size
Congestion
Round
window result
trip time
size
After a
round trip (2)1 2 MSS
of 1
After a
round trip (2)2 4 MSS
of 2
After a
round trip (2)3 8 MSS
of 3
This is how you calculate the size of the congestion window and it goes on for n number of values.
The general formula for determining the size of the congestion window is (2)round trip time
This phase continues until window size reaches its slow start threshold.
Threshold = Maximum number of TCP segments that the receiver window can accommodate / 2
The formula for determining the size of the congestion window in this phase is
Congestion window size = Congestion window size + 1
This phase continues until the size of the window becomes equal to that of the receiver window size.
In this phase, the sender identifies the segment loss and gives acknowledgment depending on the
type of loss detected.
1. In this, the timer time-out expires even before receiving acknowledgment for a segment.
3. In this, there are chances that a segment has been dropped in the network
• Setting the threshold to start at half of the current size of the window
This case suggests the weaker possibility of congestion in the network. In this, the sender receives
three duplicate acknowledgments for a network segment. The chances are that fewer segments have
dropped while the one sent later might have reached.
• Setting the threshold to start at half of the current size of the window
• Decreasing the size of the congestion window to that of the slow start threshold
The fairness metric in networking is used to determine whether the application or user is receiving a
fair share of the system’s resources. In congestion control, the mechanism for transmission using the
new protocol must be well aligned with the TCP protocol. TCP fairness determines that the new
protocol receiver has a no larger share of the network as compared to TCP flow. This is an important
factor because if a new protocol acquires unfair capacity then it leads to congestion in the network.
From protocols to architecture, our Free Computer Networks course covers it all. Join now and
learn Computer Networks from industry experts!
Conclusion
This was all about TCP congestion control. Here are a few key takeaways from this article:
• TCP congestion control refers to the mechanism that prevents congestion from happening or
removes it after congestion takes place.
• Receiver window size shows how much data can a receiver receive in bytes without giving
any acknowledgment
• Congestion window state of TCP that limits the amount of data to be sent by the sender into
the network even before receiving the acknowledgment.
3. Multicasting
4. Outdated hardware
1. Slow start
2. Congestion avoidance
3. Congestion detection
• Fairness metric in networking is used to determine whether the application or users are
receiving a fair share of the system’s resources.