The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
To configure weighted random early detection (WRED) on both ingress and egress queues by setting aggregate minimum and maximum packet drop threshold default values for specific class of service (CoS) values, use the random-detect command. To remove a WRED configuration, use the no form of this command.
random-detect cos cos-list [minimum-threshold] { min-threshold [ packets | bytes | kbytes | mbytes | ms | us ] | percent min-percent-of-qsize } [maximum-threshold] { max-threshold [ packets | bytes | kbytes | mbytes | ms | us ] | percent max-percent-of-qsize }
no random-detect cos cos-list [minimum-threshold] { min-threshold [ packets | bytes | kbytes | mbytes | ms | us ] | percent min-percent-of-qsize } [maximum-threshold] { max-threshold [ packets | bytes | kbytes | mbytes | ms | us ] | percent max-percent-of-qsize }
cos cos-list |
Specifies the CoS values where the software applies thresholds. Valid values are from 0 to 7. |
minimum-threshold |
(Optional) Specifies the minimum threshold. |
min-threshold |
Minimum threshold. Valid values are from 1 to 52428800. |
packets |
(Optional) Specifies that thresholds are in packets. |
bytes |
(Optional) Specifies that thresholds are in bytes. |
kbytes |
(Optional) Specifies that thresholds are in kilobytes. |
mbytes |
(Optional) Specifies that thresholds are in megabytes. |
ms |
(Optional) Specifies that thresholds are in milliseconds at the underlying interface minimum guaranteed link rate |
us |
(Optional) Specifies that thresholds are in microseconds at the underlying interface minimum guaranteed link rate. |
percent |
Specifies the percentage of the threshold. |
min-percent-of-qsize |
Minimum percentage of the buffer memory used by the queue. Valid values are from 1 to 100. |
maximum-threshold |
(Optional) Specifies the maximum threshold. |
max-threshold |
Maximum threshold. Valid values are from 1 to 52428800. |
max-percent-of-qsize |
(Optional) Maximum percentage of the buffer memory used by the queue. Valid values are from 1 to 100. |
Thresholds are in packets by default.
The random-detect cos-based command must be specified for a queue to establish default thresholds for any CoS values that are not specified in random-detect commands for the same queue.
Policy map type queuing class configuration
Release |
Modification |
---|---|
4.0 |
This command was introduced. |
Note | You must enter the random-detect cos-based command before you enter the random-detect command. |
The minimum and maximum threshold units must match.
The system drops packets that exceed the minimum threshold at an increasing rate as the maximum threshold is reached. By default, the units are in packets,
WRED and tail drop cannot be configured in the same class. For information about configuring tail drop, see the queue-limit command.
You cannot configure WRED on ingress on the 10-Gigabit Ethernet ports.
For CoS lists, you can use the following:
This command does not require a license.
This example shows how to configure WRED for a queue by setting the default WRED thresholds followed by thresholds that apply to CoS values 5 and 7:
switch(config)# policy-map type queuing match-first my_queue switch(config-pmap-que)# class type queuing 1p3q4t-out-pq1 switch(config-pmap-c-que)# random-detect cos-based aggregate 10 mbytes 20 mbytes switch(config-pmap-c-que)# random-detect cos 5,7 15 mbytes 20 mbytes switch(config-pmap-c-que)#
This example shows how to configure WRED for a queue by setting the default WRED thresholds followed by queue buffer size thresholds that apply to CoS value 5:
switch(config)# policy-map type queuing match-first my_queue switch(config-pmap-que)# class type queuing 1p3q4t-out-pq1 switch(config-pmap-c-que)# random-detect cos-based aggregate 10 mbytes 20 mbytes switch(config-pmap-c-que)# random-detect cos 5 percent 5 percent 15 switch(config-pmap-c-que)#
This example shows how to remove a WRED configuration from a policy map queuing class:
switch(config)# policy-map type queuing match-first my_queue switch(config-pmap-que)# class type queuing 1p3q4t-out-pq1 switch(config-pmap-c-que)# no random-detect cos-based aggregate 10 mbytes 20 mbytes switch(config-pmap-c-que)# no random-detect cos 5 percent 5 percent 15 switch(config-pmap-c-que)#
Command |
Description |
---|---|
random-detect cos-based |
Configures WRED. |
queue limit |
Configures tail drop. |
show policy-map |
Displays policy maps and statistics. |
To configure weighted random early detection (WRED) on both ingress and egress queues by setting minimum and maximum packet drop thresholds, use the random-detect cos-based command. To remove a WRED configuration, use the no form of this command.
random-detect cos-based [ aggregate [minimum-threshold] { min-threshold [ packets | bytes | kbytes | mbytes | ms | us ] | percent min-percent-of-qsize } [maximum-threshold] { max-threshold [ packets | bytes | kbytes | mbytes | ms | us ] | percent max-percent-of-qsize } ]
no random-detect cos-based [ aggregate [minimum-threshold] { min-threshold [ packets | bytes | kbytes | mbytes | ms | us ] | percent min-percent-of-qsize } [maximum-threshold] { max-threshold [ packets | bytes | kbytes | mbytes | ms | us ] | percent max-percent-of-qsize } ]
aggregate |
(Optional) Specifies where the software applies aggregate thresholds for CoS values that are not specified in the random-detect command. |
minimum-threshold |
(Optional) Specifies the minimum threshold. |
min-threshold |
Minimum threshold. Valid values are from 1 to 52428800. |
packets |
(Optional) Specifies that thresholds are in packets. |
bytes |
(Optional) Specifies that thresholds are in bytes. |
kbytes |
(Optional) Specifies that thresholds are in kilobytes. |
mbytes |
(Optional) Specifies that thresholds are in megabytes. |
ms |
(Optional) Specifies that thresholds are in milliseconds at the underlying interface minimum guaranteed link rate |
us |
(Optional) Specifies that thresholds are in microseconds at the underlying interface minimum guaranteed link rate. |
percent |
Specifies the percentage of the threshold. |
min-percent-of-qsize |
(Optional) Minimum percentage of the buffer memory used by the queue. Valid values are from 1 to 100. |
maximum-threshold |
Specifies the maximum threshold. |
max-threshold |
Maximum threshold. Valid values are from 1 to 52428800. |
max-percent-of-qsize |
(Optional) Maximum percentage of the buffer memory used by the queue. Valid values are from 1 to 100. |
Thresholds are in packets by default.
Policy map type queuing class configuration
Release |
Modification |
---|---|
4.0 |
This command was introduced. |
The random-detect cos-based command is required when you configure WRED to establish default thresholds for class of service (CoS) values for which you do not define specific thresholds.
The minimum and maximum threshold units must match.
The system drops packets that exceed the minimum threshold at an increasing rate as the maximum threshold is reached. By default, the units are in packets,
WRED and tail drop cannot be configured in the same class. For information about configuring tail drop, see the queue-limit command.
Note | You cannot configure WRED on ingress 10-Gigabit Ethernet ports. |
This command does not require a license.
This example shows how to configure WRED for a queue by setting the default WRED thresholds followed by thresholds that apply to CoS values 5 and 7:
switch(config)# policy-map type queuing match-first my_queue switch(config-pmap-que)# class type queuing 1p3q4t-out-pq1 switch(config-pmap-c-que)# random-detect cos-based aggregate 10 mbytes 20 mbytes switch(config-pmap-c-que)# random-detect cos 5,7 15 mbytes 20 mbytes switch(config-pmap-c-que)#
This example shows how to configure WRED for a queue by setting the default WRED thresholds followed by queue buffer size thresholds that apply to CoS value 5:
switch(config)# policy-map type queuing match-first my_queue switch(config-pmap-que)# class type queuing 1p3q4t-out-pq1 switch(config-pmap-c-que)# random-detect cos-based aggregate 10 mbytes 20 mbytes switch(config-pmap-c-que)# random-detect cos 5 percent 5 percent 15 switch(config-pmap-c-que)#
This example shows how to remove a WRED configuration from a policy map queuing class:
switch(config)# policy-map type queuing match-first my_queue switch(config-pmap-que)# class type queuing 1p3q4t-out-pq1 switch(config-pmap-c-que)# no random-detect cos-based aggregate 10 mbytes 20 mbytes switch(config-pmap-c-que)# no random-detect cos 5 percent 5 percent 15 switch(config-pmap-c-que)#
Command |
Description |
---|---|
random-detect |
Configures WRED. |
queue limit |
Configures tail drop. |
show policy-map |
Displays policy maps and statistics. |