Header Ads Widget

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 = 21 = 2 MSS
  • After 2 round trip time, congestion window size =22 = 4 MSS
  • After 3 round trip time, congestion window size = 23 = 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.

Discuss the quality of service parameters in computer network.

The various Quality of Service (QoS) parameters in Computer Network are as follows:

  1. Cell Loss Rate (CLR)

    It is the fraction of cells that are lost during transmission.

    CLR = Cell Lost / Total cells transmitted

  2. Cell Delay Variation (CDV)

    It defines the difference between the maximum and the minimum cell transfer delay.

  3. Cell Transfer Delay (CTD)

  4. It is the average time required for cell to travel from source to destination.

  5. Cell transfer delay is affected by segmentation reassembly and transmission delay.

  6. Cell Error Ratio (CER)

    This parameter defines the fraction of cells that contained errors.

    CER = Error cells delivered / Total cells delivered

  7. Cell Mis-insertion Ratio (CMR)

    It is the number of cells inserted per second that are meant for some other destination.

  8. It is the ratio of severely error cell blocks to the total transmitted cell blocks.

    SECBR = Severely Error Cell Blocks / Total transmitted cell blocks

The factors affecting the QoS parameters are:

  • Propagation Delay

  • Capacity of Buffer

  • Traffic Load

  • Allocation of resources

  • Architecture of switch present in network

  • Media error statistics

The QoS is determined by four parameters:

i. Reliability

ii. Delay

iii. Jitter

iv. Bandwidth

Technique to achieve Good QoS:

  1. Over Provisioning: Excess of router capacity, buffer space and bandwidth is provided so that packets fly through easily.
  2. Buffering: It smooths out jitter and does not affect reliability or bandwidth. It increases delay.
  3. Traffic Shaping: It forces bursty traffic to be transmitted at a uniform rate.
  4. Resource Reservation: In this bandwidth, buffer space and CPU cycles needed for successful transmission are reserved beforehand.
  5. Admission Control: In this a router decides, depending on its current load, whether it should accept or reject a new job.
  6. Proportional Routing: In this, traffic is divided equally amongst all routers so that no single router gets overburdened.

Packet Scheduling: Queuing is used so that an aggressive sender does not block all the lines.

Post a Comment

0 Comments