Congestion Avoidance
Congestion avoidance is a mechanism used to control service flows. A system configured with congestion avoidance monitors network resource usage such as queues and memory buffers. When congestion occurs or aggravates, the system starts to discard packets.
Congestion avoidance uses tail drop and WRED to discard packets.
Traditional tail drop policy
The traditional packet drop policy uses the tail drop method. When the length of a queue reaches the maximum value, all the packets last added to the queue (at the tail of the queue) are discarded.
This packet drop policy may cause global TCP synchronization. As a result, TCP connections cannot be set up. The three colors represent three TCP connections. When packets from multiple TCP connections are discarded, these TCP connections enter the congestion avoidance and slow start state. Traffic reduces, and then reaches the peak. The volume of traffic varies greatly.
Figure 6-1 Tail drop policy
WRED
To avoid global TCP synchronization, Random Early Detection (RED) is used. The RED mechanism randomly discards packets so that the transmission speed of multiple TCP connections is not reduced simultaneously. In this manner, global TCP synchronization is prevented. The rate of TCP traffic and network traffic becomes stable.
Figure 6-2 RED
The device provides Weighted Random Early Detection (WRED) based on RED technology. When a drop profile is applied to an interface queue, packets are discarded according to the drop profile. The drop profile defines the upper drop threshold, lower drop threshold, and drop probability. When the length of a queue is smaller than the lower drop threshold, no packets are discarded. When the length of a queue exceeds the upper drop threshold, all new packets in the queue are discarded. When the length of a queue is between the upper drop threshold and the lower drop threshold, new packets are discarded randomly. A longer queue means higher drop probability, but the drop probability has a maximum value.
Figure 6-3 shows the curve of the WRED drop probability.