0% found this document useful (0 votes)
2 views5 pages

TCP Congestion PDF

TCP congestion control is a mechanism that manages network congestion by adjusting the sender's window size based on the receiver's window size and the congestion window size. It operates through three phases: Slow Start, Congestion Avoidance, and Congestion Detection, each with specific rules for increasing or decreasing the congestion window size. Causes of congestion include excessive bandwidth consumption, improper subnet management, multicasting, outdated hardware, and routing protocols that do not consider traffic load.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

TCP Congestion PDF

TCP congestion control is a mechanism that manages network congestion by adjusting the sender's window size based on the receiver's window size and the congestion window size. It operates through three phases: Slow Start, Congestion Avoidance, and Congestion Detection, each with specific rules for increasing or decreasing the congestion window size. Causes of congestion include excessive bandwidth consumption, improper subnet management, multicasting, outdated hardware, and routing protocols that do not consider traffic load.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

What is TCP Congestion Control?

Congestion is an important factor in packet-switched networks. 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 occurs in the network, TCP handles it by reducing the size of the sender’s
window. The following two factors determine the window size of the sender:

• Receiver window size


• Congestion window size

Receiver Window Size


It shows how much data can a receiver receive in bytes without giving any acknowledgment.
Things to remember for receiver window size:
1. The sender should not send data greater than that of the size of the 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 the TCP segment.
3. Hence, the 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 receiver's window size 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.
Following are the things to remember for the congestion window:
1. Different variants of TCP and methods are used to calculate the size of the congestion
window.
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)
Causes of Congestion
The following are the causes of congestion in a network:

• Excessive consumption of bandwidth– Certain devices might require more bandwidth


compared to other devices. This can sometimes strain the network and its components
like routers, etc, and can cause network congestion.
• Improper subnet management– 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.
• Multicasting– Multicasting is when a network allows several computers to use and
communicate using that network simultaneously. If two packets are sent simultaneously,
a collision can occur, and if these collisions occur frequently, the network gets congested.
• Outdated hardware– Data transmission might get hampered if old routers, switches, or
servers are used for communication.
• Border gateway protocol– BGP routes all traffic in a network 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.

Approaches for Congestion Control

Congestion in TCP is handled by using these three phases:

1. Slow Start
2. Congestion Avoidance
3. Congestion Detection
1. Slow Start Phase

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

Round Trip Time (RTT) Congestion Window Size Result

After a round trip of 1 (2)1 2 MSS

After a round trip of 2 (2)2 4 MSS

After a round trip of 3 (2)3 8 MSS


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 the window size reaches its slow start threshold.

The formula for determining the threshold is given:

Threshold = Maximum number of TCP segments that the receiver window can accommodate / 2

= (Receiver window size / Maximum Segment Size) / 2

2. Congestion Avoidance Phase


Additive Increment: This phase starts after the threshold value, denoted as ssthresh. The size
of CWND (Congestion Window) increases additive. After each RTT cwnd = cwnd + 1.

[In this phase, after the threshold is reached, the size of the congestion window is increased by
the sender linearly to avoid congestion. Each time an acknowledgment is received, the sender
increments the congestion window size by 1.]
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.

For example, if the congestion window size is 20 segments and all 20 segments are successfully acknowledged
within an RTT, the congestion window size would be increased to 21 segments in the next RTT. If all 21
segments are again successfully acknowledged, the congestion window size will be increased to 22 segments,
and so on.

3. Congestion Detection Phase


Multiplicative Decrement: If congestion occurs, the congestion window size is decreased. The
only way a sender can guess that congestion has happened is the need to retransmit a segment.
Retransmission is needed to recover a missing packet that is assumed to have been dropped by a
router due to congestion. Retransmission can occur in one of two cases: when the RTO timer
times out or when three duplicate ACKs are received.

Case 1: Retransmission due to Timeout – The congestion possibility is high in this case.

(a) ssthresh is reduced to half of the current window size.


(b) set cwnd = 1
(c) start with the slow start phase again.

Case 2: Retransmission due to 3 Acknowledgement Duplicates – Less congestion is


possible.
(a) ssthresh value reduces to half of the current window size.
(b) set cwnd= ssthresh
(c) start with congestion avoidance phase

You might also like