Congestion Avoidance

Congestion Avoidance
WRED solves two major problems with TCP and tail drop:
■ TCP Synchronization occurs when all TCP packets exiting an interface
are repeatedly dropped. At each tail drop, each session goes into slow
start, and then ramps up its sending rate. When the interface queue fills,
all packets are dropped again, and all sessions reduce their sending
again. Eventually this results in waves of increased and decreased
transmission, causing underutilization of the interface.
■ TCP Starvation results when large flows, with increased window sizes,
fill the interface queue. Packets from smaller or less aggressive flows
are then dropped. This can cause jitter for those smaller flows due to a
lack of a differentiated dropping strategy.
Random Early Detection (RED) attempts to avoid tail drops by preventing
the interface from becoming totally congested. Once the queue fills above a
threshold level, it drops random packets from the interface queue, dropping a
higher percentage of packets as the queue fills. TCP sessions experience a
packet loss at different times, and so they go into slow start at different
times, thus preventing TCP synchronization.
You need to understand three RED concepts:
■ Minimum threshold—The queue depth at which RED begins dropping
packets.
■ Maximum threshold—The queue depth at which the maximum number
of packets are being dropped.
■ Mark probability denominator—Controls how many packets are
dropped when the maximum threshold is reached. The probability of a
packet being dropped equals 1/max-prob-denom.
RED has three packet-dropping modes:
■ No drop—When the queue depth is between zero and the minimum
threshold.
■ Random drop—When the queue depth is between the minimum and
the maximum thresholds.
■ Tail drop—When the queue depth is above the maximum threshold.
Basic RED does not distinguish between flows or types of traffic. Weighted
RED, on the other hand, drops traffic differently depending on its IP precedence
or DSCP value. WRED is combined with CBWFQ to implement
DiffServ’s Assured Forwarding PHB. Each PHB has a unique WRED
profile, identifying a minimum threshold, maximum threshold, and mark
probability denominator for that profile. There are default profiles for each
PHB, but they can also be manually configured.
Configure WRED under a physical interface, a VC, or a class within a policy
map with the command random-detect [dscp-based]. Packet drop decisions
are based on IP precedence value unless the dscp-based option is configured.
To change the default profile for a specific DSCP value, use the random-detect
dscp dscp-value min-threshold max-threshold mark-probability-denominator
command.