color

Function

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.

Format

color { green | yellow | red } low-limit low-limit-percentage high-limit high-limit-percentage discard-percentage discard-percentage

undo color { green | yellow | red }

Parameters

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.

Views

Flow queue WRED view, Port queue WRED view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
qos write

Usage Guidelines

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.

  • When the percentage of the actual length of a queue over the length of a FQ is less than the low limit percentage, the system does not drop packets.
  • When the percentage of the actual length of a queue over the length of a FQ is between the low limit percentage and the high limit percentage, the system drops packets through the WRED mechanism. The longer the queue length, the higher the drop probability.
  • When the percentage of the actual length of a queue over the length of a FQ is greater than the high limit percentage, the system drops all subsequent packets.

    By default, the system uses a template with the upper threshold being 100, the lower threshold being 100, and the drop percentage being 100. The default template is called a tail-drop template.

    It is recommended that you configure a WRED object for a flow queue of a different service type.

    NOTE:

    If the WRED threshold is too low, packets may be discarded because the configured queuing buffer is insufficient when burst traffic occurs. The WRED threshold needs to be consistent with the bandwidth configured by users. Using the default configuration of the system is recommended.

Example

# Set the lower threshold to 20, the upper threshold to 60, and the drop percentage to 30 for green packets.
<HUAWEI> system-view
[~HUAWEI] flow-wred test
[*HUAWEI-flow-wred-test] color green low-limit 20 high-limit 60 discard-percentage 30
# Set·the·lower·threshold·to·20,·the·upper·threshold·to·60,·and·the·drop·percentage·to·30·for·green·packets.
<HUAWEI> system-view
[~HUAWEI] port-wred test
[*HUAWEI-port-wred-test] color green low-limit 20 high-limit 60 discard-percentage 30
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >