The color command sets the upper threshold, lower threshold (both in percentage), and drop percentage in WRED for packets in different colors.
The undo color command restores the default settings.
By default, the lower and upper thresholds percentage and discarding percentage are 100 percent, which means the tail drop.
Parameter | Description | Value |
---|---|---|
green |
Indicates the packets colored green. |
- |
yellow |
Indicates the packets colored yellow. |
- |
red |
Indicates the packets colored red. |
- |
low-limit low-limit-percentage |
Specifies the lower threshold (in percentage) for WRED dropping. It is the proportion of the value of the lower threshold for packet discarding to the length of the flow queue. |
The value is an integer that ranges from 0 to 100 (in percentage). The default value is 100. |
high-limit high-limit-percentage |
Specifies the upper threshold (in percentage) for WRED dropping. It is the proportion of the value of the upper threshold for packet discarding to the length of the flow queue. |
The value is an integer that ranges from 0 to 100 (in percentage). It must be greater than or equal to the lower threshold. The default value is 100. |
discard-percentage discard-percentage |
Specifies the maximum discard percentage when the queue length is between the lower threshold and the upper threshold. |
The value is an integer that ranges from 1 to 100. The default value is 100. |
Usage Scenario
Severe congestion is extremely harmful to network resources and therefore it must be solved. When traffic congestion intensifies, WRED can be used to proactively drop packets to prevent network overload.
When traffic congestion occurs, queues start to buffer packets. Red packets are first dropped due to low lower threshold and high drop probability. As the queue length increases, the device drops green packets at last. If the queue length reaches the upper threshold of a color, packets of this color start to be tail dropped. WFQ queues share bandwidth based on the weight and are prone to traffic congestion. Using WRED for WFQ queues effectively resolves TCP global synchronization when traffic congestion occurs.Precautions
A WRED template can process packets of a maximum of three colors, namely, red, yellow, and green. The drop percentage of green packets is usually set to a small value whereas the upper threshold and the lower threshold are usually set to larger values. The drop percentage of red packets is set to a larger value whereas the upper threshold and lower threshold are set to small values. The values of yellow packets are between those of the preceding colors of packets.
<HUAWEI> system-view [~HUAWEI] flow-wred test [*HUAWEI-flow-wred-test] color green low-limit 20 high-limit 60 discard-percentage 30
<HUAWEI> system-view [~HUAWEI] port-wred test [*HUAWEI-port-wred-test] color green low-limit 20 high-limit 60 discard-percentage 30