Configuration example
Network requirements
Apply a WRED table to , so that the packets are dropped as follows when congestion occurs:
For the interface to preferentially forward higher-priority traffic, set a lower drop probability for a queue with a greater queue number. Set different drop parameters for queue 0, queue 3, and queue 7.
Drop packets according to their colors.
In queue 0, set the drop probability to 25%, 50%, and 75% for green, yellow, and red packets, respectively.
In queue 3, set the drop probability to 5%, 10%, and 25% for green, yellow, and red packets, respectively.
In queue 7, set the drop probability to 1%, 5%, and 10% for green, yellow, and red packets, respectively.
Enable ECN for queue 7.
Configuration procedure
# Configure a queue-based WRED table, and set different drop parameters for packets with different drop levels in different queues.
<Sysname> system-view [Sysname] qos wred queue table queue-table1 [Sysname-wred-table-queue-table1] queue 0 drop-level 0 low-limit 128 high-limit 512 discard-probability 25 [Sysname-wred-table-queue-table1] queue 0 drop-level 1 low-limit 128 high-limit 512 discard-probability 50 [Sysname-wred-table-queue-table1] queue 0 drop-level 2 low-limit 128 high-limit 512 discard-probability 75 [Sysname-wred-table-queue-table1] queue 3 drop-level 0 low-limit 256 high-limit 640 discard-probability 5 [Sysname-wred-table-queue-table1] queue 3 drop-level 1 low-limit 256 high-limit 640 discard-probability 10 [Sysname-wred-table-queue-table1] queue 3 drop-level 2 low-limit 256 high-limit 640 discard-probability 25 [Sysname-wred-table-queue-table1] queue 7 drop-level 0 low-limit 512 high-limit 1024 discard-probability 1 [Sysname-wred-table-queue-table1] queue 7 drop-level 1 low-limit 512 high-limit 1024 discard-probability 5 [Sysname-wred-table-queue-table1] queue 7 drop-level 2 low-limit 512 high-limit 1024 discard-probability 10 [Sysname-wred-table-queue-table1] queue 7 ecn [Sysname-wred-table-queue-table1] quit
# Apply the queue-based WRED table to .
[Sysname] interface [Sysname-] qos wred apply queue-table1 [Sysname-] quit