random-detect discard-class
To configure the Weighted Random Early Detection (WRED) thresholds for packets with a specific discard class value, use the random-detect discard-class command in policy map class configuration mode. To return the thresholds to the default for the discard class, use the no form of this command.
random-detect discard-class discard-value min-threshold [units] max-threshold [units]
no random-detect discard-class discard-value min-threshold [units] max-threshold [units]
Syntax Description
discard-value |
Discard class value. Valid values are from 0 to 7. Up to eight values can be entered separated by commas. |
min-threshold |
Minimum threshold in number of packets. The value range of this argument is from 0 to 1073741823 in bytes. |
max-threshold |
Maximum threshold in number of packets. The value range of this argument is from the value of the min-threshold argument to 1073741823. When the average queue length exceeds the maximum threshold, WRED drops all packets with the specified discard class value. |
units |
(Optional) Units for the threshold values. Values can be:
|
Command Default
Default unit for max-threshold and min-threshold is packets .
Command Modes
Policy map class configuration
Command History
Release |
Modification |
---|---|
Release 3.7.2 |
This command was introduced. |
Usage Guidelines
WRED is a congestion avoidance mechanism that slows traffic by randomly dropping packets when congestion exists. WRED is most useful with protocols like TCP that respond to dropped packets by decreasing the transmission rate.
When you configure the random-detect discard-class command on an interface, packets are given preferential treatment based on the discard class of the packet.
When the value of the units argument is packets, packets are assumed to be 256 bytes in size.
Task ID
Task ID |
Operations |
---|---|
qos |
read, write |
Examples
This example shows how to set the discard class values for discard class 3 to a minimum byte threshold of 1000000 and a maximum byte threshold of 2000000:
RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# random-detect discard-class 3 1000000 2000000