Congestion Controll Algorithms

Protocol

TCP Reno

Reno Description

TCP Reno is a widely used congestion control algorithm for the Transmission Control Protocol (TCP), which is the standard communication protocol used on the Internet. It is designed to manage network congestion and ensure reliable and efficient data transmission.

TCP Reno operates by using a combination of packet loss and acknowledgment (ACK) information to adjust the sending rate of data. It employs a mechanism known as "Additive Increase, Multiplicative Decrease" (AIMD) to regulate the flow of data. Initially, TCP Reno increases its sending rate linearly until it detects packet loss or congestion through the absence of ACKs. When packet loss occurs, it interprets it as a sign of network congestion and reduces its sending rate by halving the congestion window size. This reduction prevents further congestion and allows the network to recover.

Upon successful transmission and reception of packets, TCP Reno gradually increases its sending rate, adding a fixed amount to the congestion window for every ACK received. This incremental increase allows TCP Reno to probe the network for available bandwidth and maximize its utilization while avoiding congestion.

TCP Reno's adaptive nature and conservative approach make it a robust congestion control algorithm suitable for various network conditions and congestion scenarios. It has been widely deployed and forms the basis for many TCP implementations used today.

In summary, TCP Reno is a congestion control algorithm for TCP that aims to maintain efficient and reliable data transmission by dynamically adjusting the sending rate based on network conditions. Its additive increase and multiplicative decrease mechanisms help prevent congestion and optimize network performance.

Reno Test Results

Start (Slow Start): TCP Reno's slow start is an initial phase where the sender gradually increases its transmission rate, probing the network for available bandwidth.

Congestion Avoidance: TCP Reno uses additive increase to gradually raise the sending rate, allowing for optimal bandwidth utilization while avoiding network congestion.

Fast Recovery: In the event of packet loss, TCP Reno quickly recovers by reducing the congestion window and retransmitting lost packets, without entering a full slow start phase again.

TCP New Reno

New Reno Description

TCP New Reno is a modification of TCP Reno that improves its performance in the event of multiple packet losses. It is designed to address the problem of "retransmission ambiguity" in TCP Reno, where the sender cannot distinguish between a timeout and multiple packet losses. This ambiguity causes TCP Reno to enter a full slow start phase, which can significantly reduce network performance.

TCP New Reno solves this problem by using a mechanism known as "Fast Recovery" to quickly recover from multiple packet losses. It does this by maintaining a "partial ACK" counter that tracks the number of ACKs received for the same sequence number. When the counter reaches three, TCP New Reno assumes that the receiver has received all packets up to that sequence number and retransmits the next packet. This allows TCP New Reno to recover from multiple packet losses without entering a full slow start phase.

New Reno Test Results

Start (Slow Start): TCP New Reno's slow start is an initial phase where the sender gradually increases its transmission rate, probing the network for available bandwidth.

Congestion Avoidance: TCP New Reno uses additive increase to gradually raise the sending rate, allowing for optimal bandwidth utilization while avoiding network congestion.

Fast Recovery: In the event of packet loss, TCP New Reno quickly recovers by retransmitting lost packets, without entering a full slow start phase again.

More test results is shown in the following images.

BBR

BBR Description

BBR is a congestion control algorithm for TCP that aims to maximize network utilization and minimize queuing delay. It is designed to address the problem of "bufferbloat", where large buffers cause excessive queuing delay and reduce network performance.

BBR uses a combination of packet loss and round-trip time (RTT) information to adjust the sending rate of data. It employs a mechanism known as "Model-Based Control" to regulate the flow of data. Initially, BBR increases its sending rate linearly until it detects packet loss or congestion through the absence of ACKs. When packet loss occurs, it interprets it as a sign of network congestion and reduces its sending rate by halving the congestion window size. This reduction prevents further congestion and allows the network to recover.

Upon successful transmission and reception of packets, BBR gradually increases its sending rate, adding a fixed amount to the congestion window for every ACK received. This incremental increase allows BBR to probe the network for available bandwidth and maximize its utilization while avoiding congestion.

BBR Test Results

Initialization: BBR's initialization phase is an initial phase where the sender gradually increases its transmission rate, probing the network for available bandwidth.

Startup Phase: BBR's startup phase is an initial phase where the sender gradually increases its transmission rate, probing the network for available bandwidth.

Drain Phase: BBR's drain phase is an initial phase where the sender gradually increases its transmission rate, probing the network for available bandwidth.

Probe Bandwidth: BBR's probe bandwidth phase is an initial phase where the sender gradually increases its transmission rate, probing the network for available bandwidth.

Questions

Question 1

Congestion control and flow control are two distinct concepts in networking that aim to manage data transmission within a network. Here's a summary of the differences between them:

  1. Congestion Control: Congestion control is a mechanism used to regulate the flow of data when the network becomes overloaded or congested. It prevents network congestion by ensuring that the amount of traffic sent into the network does not exceed its capacity to handle it effectively. Congestion control algorithms monitor the network conditions, such as packet loss and delays, and adjust the transmission rate accordingly to maintain optimal network performance. The objective of congestion control is to prevent or minimize congestion-related issues, such as packet loss, increased delays, and degraded network performance.

  2. Flow Control: Flow control, on the other hand, deals with regulating the data flow between a sender and receiver to ensure that the receiver can handle the incoming data at a rate it can process. It is typically implemented at the receiving end to prevent overwhelming the receiver with data that it cannot handle. Flow control mechanisms utilize techniques like buffering, acknowledgments, and sliding window protocols to manage the rate at which data is transmitted. The goal of flow control is to maintain a balance between the sender and receiver, preventing data loss and avoiding overflow or underflow of data at the receiving end.

In summary, congestion control focuses on managing network congestion by adjusting transmission rates based on network conditions, while flow control focuses on regulating the data flow between a sender and receiver to prevent overwhelming the receiver. Both mechanisms play crucial roles in optimizing network performance and ensuring reliable data transmission.

Question 2

Already described in TCP New Reno section.

Question 3

Already described in BBR section.

Question 4

Reno and New Reno are traditional TCP congestion control algorithms that rely on packet loss and timeouts to detect and respond to network congestion. New Reno improves upon Reno's slow recovery by introducing a fast recovery mechanism. On the other hand, BBR is a newer algorithm that focuses on maximizing throughput and minimizing delays by estimating bandwidth and RTT. BBR's model-based approach allows it to be more aggressive in utilizing network capacity while maintaining low latency.

Question 5

It can be said that NewReno is always better than Reno, but we cannot say anything seriously about comparing BBR with Reno, and we have to consider different criteria. And in different situations, one is superior to the other and is not fixed. For example, in the following images, we can see that BBR is better than Reno in terms of throughput, but in terms of delay, Reno is better than BBR.

Question 6

  1. Binary Increase Congestion control (BIC): BIC is optimized for high-speed networks with high latency, also known as long fat networks (LFNs). It was the default congestion control algorithm in Linux kernels 2.6.8 through 2.6.18 en.wikipedia.org.
  2. CUBIC: This is the default congestion control algorithm in the Linux kernel starting from version 2.6.19. CUBIC is a less aggressive and more systematic derivative of BIC, making it more suitable for networks with high bandwidth and high latency en.wikipedia.org.
  3. Token Bucket Algorithm: It is a control algorithm that indicates when traffic should be sent. This order comes based on the display of tokens in the bucket. When tokens are shown, a flow to transmit traffic appears in the display of tokens geeksforgeeks.org.
  4. TCP Vegas: This algorithm emphasizes packet delay, rather than packet loss, as the signal to help detect congestion. It's designed to be more efficient and fair than algorithms that rely solely on packet loss en.wikipedia.org.
  5. TCP Tahoe: This algorithm was one of the first congestion control algorithms implemented in TCP. It uses three primary mechanisms to handle congestion: slow start, congestion avoidance, and fast retransmit. When packet loss occurs, TCP Tahoe reduces the congestion window size and enters the slow start phase, effectively reducing the sending rate en.wikipedia.org.

How to use?

To create the .out files, you can run the following command in your terminal:

make

To run the Reno simulation, execute the following command in the terminal:

./renosimulation.out

This command runs the Reno simulation program, which simulates the behavior of the Reno congestion control algorithm.

To run the New Reno simulation, use the following command:

./newrenosimulation.out

This command executes the New Reno simulation program, which simulates the behavior of the New Reno congestion control algorithm.

To run the BBR simulation, enter the following command:

./bbrsimulation.out

This command runs the BBR simulation program, which simulates the behavior of the BBR congestion control algorithm.

Make sure to compile the corresponding source code and have the executable file (renosimulation.out, newrenosimulation.out, or bbrsimulation.out) in the current directory before running these commands.