TCP Congestion Control | Congestion in Network

Spread the love

Congestion in Network-

 

Congestion refers to a network state where-

The message traffic becomes so heavy that it slows down the network response time.

 

  • Congestion is an important issue that can arise in Packet Switched Network.
  • Congestion leads to the loss of packets in transit.
  • So, it is necessary to control the congestion in network.
  • It is not possible to completely avoid the congestion.

 

Congestion Control-

 

Congestion control refers to techniques and mechanisms that can-

  • Either prevent congestion before it happens
  • Or remove congestion after it has happened

 

Now, let us discuss how congestion is handled at TCP.

 

TCP Congestion Control-

 

TCP reacts to congestion by reducing the sender window size.

 

The size of the sender window is determined by the following two factors-

  1. Receiver window size
  2. Congestion window size

 

1. Receiver Window Size-

 

Receiver window size is an advertisement of-

“How much data (in bytes) the receiver can receive without acknowledgement?”

 

  • Sender should not send data greater than receiver window size.
  • Otherwise, it leads to dropping the TCP segments which causes TCP Retransmission.
  • So, sender should always send data less than or equal to receiver window size.
  • Receiver dictates its window size to the sender through TCP Header.

 

2. Congestion Window-

 

  • Sender should not send data greater than congestion window size.
  • Otherwise, it leads to dropping the TCP segments which causes TCP Retransmission.
  • So, sender should always send data less than or equal to congestion window size.
  • Different variants of TCP use different approaches to calculate the size of congestion window.
  • Congestion window is known only to the sender and is not sent over the links.

 

So, always-

 

Sender window size = Minimum (Receiver window size, Congestion window size)

 

TCP Congestion Policy-

 

TCP’s general policy for handling congestion consists of following three phases-

 

 

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

 

1. Slow Start Phase-

 

  • Initially, sender sets congestion window size = Maximum Segment Size (1 MSS).
  • After receiving each acknowledgment, sender increases the congestion window size by 1 MSS.
  • In this phase, the size of congestion window increases exponentially.

 

The followed formula is-

 

Congestion window size = Congestion window size + Maximum segment size

 

This is shown below-

 

 

  • After 1 round trip time, congestion window size = (2)1 = 2 MSS
  • After 2 round trip time, congestion window size = (2)2 = 4 MSS
  • After 3 round trip time, congestion window size = (2)3 = 8 MSS and so on.

 

This phase continues until the congestion window size reaches the slow start threshold.

 

Threshold

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

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

 

2. Congestion Avoidance Phase-

 

After reaching the threshold,

  • Sender increases the congestion window size linearly to avoid the congestion.
  • On receiving each acknowledgement, sender increments the congestion window size by 1.

 

The followed formula is-

 

Congestion window size = Congestion window size + 1

 

This phase continues until the congestion window size becomes equal to the receiver window size.

 

 

3. Congestion Detection Phase-

 

When sender detects the loss of segments, it reacts in different ways depending on how the loss is detected-

 

Case-01: Detection On Time Out-

 

  • Time Out Timer expires before receiving the acknowledgement for a segment.
  • This case suggests the stronger possibility of congestion in the network.
  • There are chances that a segment has been dropped in the network.

 

Reaction-

 

In this case, sender reacts by-

  • Setting the slow start threshold to half of the current congestion window size.
  • Decreasing the congestion window size to 1 MSS.
  • Resuming the slow start phase.

 

Case-02: Detection On Receiving 3 Duplicate Acknowledgements-

 

  • Sender receives 3 duplicate acknowledgements for a segment.
  • This case suggests the weaker possibility of congestion in the network.
  • There are chances that a segment has been dropped but few segments sent later may have reached.

 

Reaction-

 

In this case, sender reacts by-

  • Setting the slow start threshold to half of the current congestion window size.
  • Decreasing the congestion window size to slow start threshold.
  • Resuming the congestion avoidance phase.

 

Next Article- Practice Problems On TCP Congestion Control

 

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Summary
TCP Congestion Control | Congestion in Network
Article Name
TCP Congestion Control | Congestion in Network
Description
TCP Congestion Control is meant for handling Congestion in Network. TCP Congestion Control Policy consists of three phases- Slow start phase, Congestion Avoidance Phase, Congestion Detection Phase. Congestion refers to a network state where the message traffic becomes so heavy that it slows down network response time.
Author
Publisher Name
Gate Vidyalay
Publisher Logo

Spread the love