random-detect queue-parms

This command is used to configure WRED parameters for each drop precedence level supported by a queue. It is used only when per-COS queue configuration is enabled (using the cos-queue random-detect command).

Format random-detect queue-parms queue-id [queue-id] … [units {KB|percentage}] min-thresh minthresh-green minthresh-yellow minthresh-red minthresh-nontcp max-thresh max-thresh-green max-thresh-yellow max-thresh-red maxthresh-nontcp drop-prob-scale drop-scale-green drop-scale-yellow drop-scale-red drop-scale-nontcp [ ecn ]
Mode
  • Interface Config
  • Global Config

Each parameter is specified for each possible drop precedence color of TCP traffic). The last precedence applies to all non- TCP traffic. For example, in a 3-color system, four of each parameter specified: green TCP, yellow TCP, red TCP, and non- TCP, respectively.

Parameter Definition
queue-id The internal class of service queue. Range 0 to 6. This is the internal CoS queue number, which is not the same as the CoS or DSCP value received in the packet. Use the show classofservice dot1p-mapping command to display the CoS value to CoS queue mapping.
units Minimum and maximum threshold values can be configured in KB or percentage.
min-thresh The minimum congestion threshold (in terms of percentage of queue depth) at which to begin dropping or ECN marking packets at 1/Sth of the configured drop probability. At or below the minimum threshold, no packets are dropped. The range between the minimum and maximum thresholds is divided equally into 8 increasing levels of drop probability.
max-thresh The maximum congestion threshold to end dropping at the configured maximum drop probability and to begin dropping at 100%.
drop-prob The maximum drop probability. Range 0-100. This is the drop probability for a packet when the maximum threshold is reached. Above the maximum threshold, 100% of matching packets are dropped.
ecn Enable ECN marking on the selected CoS queues. When EC N is enabled, packets not marked as ECN capable are dropped when selected for discard by WRED.

Default Configuration

The default WRED thresholds are listed below. By default WRED is not enabled for any CoS queue and ECN is not enabled for any CoS queue. By default, minimum and maximum threshold units are percentage. The thresholds for each color and CoS queue are configured independently and may overlap.

Usage Guidelines for ECN-Capable Systems

ECN capability is an end-to-end feedback mechanism. Both ends of the TCP connection must participate. When ECN is enabled, packets marked as ECN-capable and exceeding the upper WRED threshold are marked CE and are not dropped. In cases of extreme congestion, ECN-capable packets may be dropped.

Use the show interfaces traffic command to see color aware drops, ECN Tx counts, and congestion levels. ECN capability can be enabled in Windows Server 2008 and later releases using the following command:

netsh interface tcp set global ecncapability=enabled

Example: The following example configures simple meter and a trTCM meter.

! Define a class-map so that all traffic will be in the set of traffic cos-any
class-map match-all cos-any ipv4
match any
exit
! Define a class-map such that all traffic with a Cos value of 1
! will be in the set of traffic cos1.
! We will use this as a conform color class map. Conform-color class
! maps must be one of cos, secondary cos,
! dscp, or ip precedence.
class-map match-all cos1 ipv4
match cos 1
exit
! Define a class-map such that all ipv4 traffic with a Cos value of 0
! will be in the set of traffic cos0.
! We will use this as a conform color class map. Conform-color class
! maps must be one of cos, secondary cos, dscp, or ip precedence.
class-map match-all cos0 ipv4
match cos 0
exit
! Define a class-map such that all TCP will be in the set of traffic TCP.
! We will use this as a base color class for metering traffic.
class-map match-all tcp ipv4
match protocol tcp
exit
!
! Define a policy-map to include packets matching class cos-any (IPv4).
! Ingress IPv4 traffic arriving at a port participating this policy will
! be assigned red or green coloring based on the metering.
!
policy-map simple-policy in
class cos-any
!
! Create a simple policer in color blind mode. Packets below the committed information
! rate (CIR) or committed burst size (CBS) are assigned drop precedence green.
! Packets that exceed the CIR (in Kbps) or CBS (in Kbytes) are colored red.
! Both the conform and violate actions are set to transmit as WRED is
! used to drop packets when congested.
!
police-simple 10000000 64 conform-action transmit violate-action transmit
exit
exit
!
! Define a policy-map in color aware mode matching class cos-any (IPv4).
! Ingress IPv4 traffic arriving at a port participating in this policy will be
! assigned green, yellow or red coloring based on the meter.
!
policy-map two-rate-policy in
class tcp
!
! Create a two-rate policer per RFC 2698. The CIR value is 800 Kbps and
! the CBS is set to 96 Kbytes. The PIR is set to 950 Kbps and the PBS is
! set to 128 Kbytes. Color-aware processing is enabled via the conform-color
! command, i.e. any packets not in cos 0 or 1 are pre-colored red. Packets in
! cos 0 are pre-colored yellow. Packets in cos 1 are pre-colored green.
! Pre-coloring gives greater bandwidth to CoS 1 as they are initially
! subject to the CIR/CBS limits. Packets in CoS 0 are subject to the PIR limits.
! Based on the CIR/CBD, the PIR/PBS, and the conform, exceed, and
! violate actions specified below:
!
! TCP packets with rates less than or equal to the CIR/CBS in class cos1
! are conforming to the rate (green).
! These packets will be dropped randomly at an increasing rate between 0-3%
! when the outgoing interface is congested between 80 and 100%.
!
! TCP packets with rates above the CIR/CBS and less than or equal to
! PIR/PBS in either class cos1 or class cos2 are policed as exceeding the
! CIR (yellow). These packets will be dropped randomly at an increasing rate
! between 0-5% when the outgoing interface is congested between 70 and 100%.
! TCP packets with rates higher than the PIR/PBS or which belong to neither
! class cos1 or class cos2 are violating the rate (red). These packets will be
! dropped randomly at an increasing rate between 0-10% when the outgoing
! interface is congested between 50 and 100%.
!
! Non TCP packets in CoS queue 0 or 1 will be dropped randomly at an increasing
! rate between 0-15% when the outgoing interface is congested between 50 and 100%.
!
police-two-rate 800 96 950 128 conform-action transmit exceed-action transmit violate-action transmit
conform-color cos1 exceed-color cos0
exit
exit
!
!Enable WRED drop on traffic classes 0 and 1
!
cos-queue random-detect 0 1
!
! Set the exponential-weighting-constant. The exponential weighting constant smooths
! the result of the average queue depth calculation by the function:
! average depth = (previous queue depth * (1-1/2^n)) + (current queue depth * 1/2^n).
! Because the instantaneous queue depth fluctuates rapidly, larger values will cause
! the average queue depth value to respond to changes more slowly than smaller values.
! The average depth is used in calcuating the amount of congestion on a queue.
!
random-detect exponential-weighting-constant 4
!
! Configure the queue parameters for traffic class 0 and 1. We set the minimum threshold and maximum
! thresholds to 80-100% for green traffic, 70-100% for yellow traffic and 50-100% for red traffic.
! Non-TCP traffic drops in the 50-100% congestion range. Green traffic is dropped
! at a very low rate to slowly close the TCP window. Yellow and red traffic
! are dropped more aggresively.
!
random-detect queue-parms 0 1 min-thresh 80 70 50 50 max-thresh 100 100 100 100 drop-prob-scale 3 5 10 15
!
! Assign the color policies to ports. The metering policies are applied on ingress ports.
!
interface 0/22
service-policy in simple-policy
exit
interface 0/23
service-policy in two-rate-policy
exit

Example: The following example enables WRED discard for non-color aware traffic. Since a color-aware policer is not enabled, the traffic is treated as if it were colored green. This means that only the green TCP and non-TCP WRED thresholds are active.

!
! Configure the thresholds for TCP traffic on COS queue 1. The other thresholds are kept at their default values.
! The minimum threshold of 50% and maximum threshold of 100% with
! a drop probability of 2% are a good starting point for tuning the WRED
! parameters for a particular network.
!
random-detect queue-parms 1 min-thresh 50 30 20 100 max-thresh 100 90 80 100 drop-prob-scale 2 10 10 10
!
! Enable WRED on cos-queue 1 (the default cos queue).
!
cos-queue random-detect 1

Example: This example globally configures the switch to utilize ECN marking of packets queued for egress on CoS queues 0 and 1 using the DCTCP threshold as it appears in "DCTCP: Efficient Packet Transport for the Commoditized Data Center".

The first threshold parameter configures Congestion Enabled TCP packets in CoS queues 0 and 1 that exceed the WRED threshold given below (13%) to be marked as Congestion Experienced in conjunction with the first ECN parameter. TCP packets without ECN capability bits are dropped according to the normal WRED processing. Packets on other CoS queues are handled in the standard manner, i.e. tail dropped when insufficient buffer is available. Yellow and red packet configuration (second and third threshold parameters) is kept at the defaults as no metering to reclassify packets from green to yellow or red is present. The last threshold parameter configures non-TCP packets in CoS queues 0 and 1 to be processed with the WRED defaults. The ecn keyword configures CoS queues 0 and 1 for ECN marking. The weighting constant is set to 0 in the second line of the configuration as described in the DCTCP paper cited above. Finally, CoS queues 0 and 1 are configured for WRED as shown in the last line of the configuration.

console(config)#random-detect queue-parms 0 1 min-thresh 13 30 20 100 max-thresh 13 90 80 drop-probscale 100 10 10 10 ecn
console(config)#random-detect exponential-weighting-constant 0
console(config)#cos-queue random-detect 0 1

Example: Enable WRED and ECN on queues 0 and 1, enable WRED on queues 2 and 3.

random-detect queue-parms 0 1 min-thresh 13 30 20 100 max-thresh 13 90 80 drop-prob-scale 100 10 10 10 ecn
random-detect queue-parms 2 3 min-thresh 13 30 20 100 max-thresh 13 90 80 drop-prob-scale 100 10 10 10 cos-queue random-detect 0 1 2 3

Example: Set the WRED parameters to their default values on queues 0 and 1

no random-detect queue-parms 0 1

www.lancom-systems.com

LANCOM Systems GmbH | A Rohde & Schwarz Company | Adenauerstr. 20/B2 | 52146 Wuerselen | Germany | E‑Mail info@lancom.de

LANCOM Logo