The color command configures upper and lower drop thresholds and maximum drop probability in a flow queue WRED drop profile based on the packet color.
The undo color command restores default parameters in a flow queue WRED drop profile.
By default, the upper and lower drop thresholds and maximum drop probability for green, yellow, and red packets are 100.
color { green | yellow | red } low-limit low-limit-percentage high-limit high-limit-percentage discard-percentage discard-percentage
undo color { green | yellow | red }
Parameter |
Description |
Value |
---|---|---|
green |
Indicates WRED parameters for green packets. |
- |
yellow |
Indicates WRED parameters for yellow packets. |
- |
red |
Indicates WRED parameters for red packets. |
- |
low-limit low-limit-percentage |
Specifies the lower drop threshold, in percentage. When the percentage of the packet length to the queue length reaches this value, the device discards packets based on the drop probability. |
The value is an integer that ranges from 0 to 100. The default value is 100. |
high-limit high-limit-percentage |
Specifies the upper drop threshold, in percentage. When the percentage of the packet length to the queue length reaches this value, the device starts to discard all subsequent packets. |
The value is an integer that ranges from low-limit-percentage to 100. The default value is 100. |
discard-percentage discard-percentage |
Specifies the maximum drop probability. |
The value is an integer that ranges from 1 to 100. The default value is 100. |
Usage Scenario
When packets enter queues, the device colors packets based on the mapping defined in a DiffServ domain. The device processes packets entering flow queues based on parameters in a flow queue WRED drop profile. When the percentage of the packet length to the queue length reaches the lower drop threshold, the device discards packets based on the drop probability. When the percentage of the packet length to the queue length reaches the upper drop threshold, the device discards all subsequent packets.
Prerequisites
A flow queue WRED drop profile has been created and the flow queue WRED drop profile view has been displayed.
# Configure flow queue WRED drop profile wred1, set the lower drop threshold, upper drop threshold, and maximum drop probability for green packets to 80%, 100%, and 10%, set the lower drop threshold, upper drop threshold, and maximum drop probability for yellow packets to 60%, 80%, and 20%, and set the lower drop threshold, upper drop threshold, and maximum drop probability for red packets to 40%, 60%, and 40%.
<HUAWEI> system-view [HUAWEI] flow-wred-profile wred1 [HUAWEI-flow-wred-wred1] color green low-limit 80 high-limit 100 discard-percentage 10 [HUAWEI-flow-wred-wred1] color yellow low-limit 60 high-limit 80 discard-percentage 20 [HUAWEI-flow-wred-wred1] color red low-limit 40 high-limit 60 discard-percentage 40