Guest

Cisco IOS Software Releases 12.1 T

DiffServ Compliant Weighted Random Early Detection

Table Of Contents

DiffServ Compliant Weighted Random Early Detection

Feature Overview

Usage Scenarios

WRED at the Interface Level

WRED at the per-VC Level

WRED at the Class Level

Usage Points to Note

Benefits

Restrictions

Supported Platforms

Supported Standards, MIBs, and RFCs

Configuration Tasks

Configuring WRED to Use the DSCP Value

WRED at the Interface Level

WRED at the per-VC Level

WRED at the Class Level

Verifying the DSCP Value Configuration

Configuration Examples

WRED Configured to Use the DSCP Value Example

DSCP Value Configuration Verification Example

Command Reference

dscp

random-detect dscp

random-detect (interface)

random-detect-group


DiffServ Compliant Weighted Random Early Detection


This feature module describes the DiffServ Compliant Weighted Random Early Detection feature and includes the following sections:

Feature Overview

Supported Platforms

Supported Standards, MIBs, and RFCs

Configuration Tasks

Configuration Examples

Command Reference

Feature Overview

The feature enables Weighted Random Early Detection (WRED) to use the differentiated services code point (DSCP) value when it calculates the drop probability for a packet. The DSCP value is the first six bits of the IP type of service (ToS) byte.

This feature adds two new commands, random-detect dscp and dscp. It also adds two new arguments, dscp-based and prec-based, to two existing WRED-related commands—the random-detect (interface) command and the random-detect-group command.

The dscp-based argument enables WRED to use the DSCP value of a packet when it calculates the drop probability for the packet. The prec-based argument enables WRED to use the IP Precedence value of a packet when it calculates the drop probability for the packet.

These arguments are optional (you need not use any of them to use the commands) but they are also mutually exclusive. That is, if you use the dscp-based argument, you cannot use the prec-based argument with the same command.

After enabling WRED to use the DSCP value, you can then use the new random-detect dscp command to change the minimum and maximum packet thresholds for that DSCP value.

Three scenarios for using these arguments are provided.

Usage Scenarios

The new dscp-based and prec-based arguments can be used whether you are using WRED at the interface level, at the per-virtual circuit (VC) level, or at the class level (as part of class-based weighted fair queueing (CBWFQ) with policy maps).

WRED at the Interface Level

At the interface level, if you want to have WRED use the DSCP value when it calculates the drop probability, you can use the dscp-based argument with the random-detect (interface) command to specify the DSCP value. Then use the random-detect dscp command to specify the minimum and maximum thresholds for the DSCP value.

WRED at the per-VC Level

At the per-VC level, if you want to have WRED use the DSCP value when it calculates the drop probability, you can use the dscp-based argument with the random-detect-group command. Then use the dscp command to specify the minimum and maximum thresholds for the DSCP value or the mark-probability denominator.

This configuration can then be applied to each VC in the network.

WRED at the Class Level

If you are using WRED at the class level (with CBWFQ), the dscp-based and prec-based arguments can be used within the policy map.

First, specify the policy map, the class, and the bandwidth. Then, if you want WRED to use the DSCP value when it calculates the drop probability, use the dscp-based argument with the random-detect (interface) command to specify the DSCP value. Then use the random-detect dscp command to modify the default minimum and maximum thresholds for the DSCP value.

This configuration can then be applied wherever policy maps are attached (for example, at the interface level, the per-VC level, or the shaper level).

Usage Points to Note

Remember the following points when using the new commands and the new arguments:

If you use the dscp-based argument, WRED will use the DSCP value to calculate the drop probability.

If you use the prec-based argument, WRED will use the IP Precedence value to calculate the drop probability.

The dscp-based and prec-based arguments are mutually exclusive.

If you do not specify either argument, WRED will use the IP Precedence value to calculate the drop probability (the default method).

The random-detect dscp command must be used in conjunction with the random-detect (interface) command.

The random-detect dscp command can only be used if you use the dscp-based argument with the random-detect (interface) command.

The dscp command must be used in conjunction with the random-detect-group command.

The dscp command can only be used if you use the dscp-based argument with the random-detect-group command.

Benefits

This feature extends the functionality of WRED to enable support for Differentiated Services (DiffServ) and Assured Forwarding (AF) Per Hop Behavior (PHB). This feature enables WRED to be compliant with the DiffServ standard and the AF PHB standard being developed by the Internet Engineering Task Force (IETF).

This feature enables customers to implement AF PHB by coloring packets according to DSCP values and then assigning preferential drop probabilities to those packets.

Restrictions

This feature can be used with IP packets only. It is not intended for use with Multiprotocol Label Switching (MPLS)-encapsulated packets.

Supported Platforms

This feature runs on any platform that runs Cisco IOS WRED software, including the following platforms:

Cisco 800 series

Cisco 1700 series

Cisco 2600 series

Cisco 3600 series

Cisco 4500 series

Cisco 7200

Cisco 7500-RSP

Supported Standards, MIBs, and RFCs

Standards

The Differentiated Services and the Assured Forwarding Per-Hop Behavior standards are supported by this feature.

MIBs

The Class-Based Quality of Service MIB supports this feature. This MIB is actually the following two MIBs:

CISCO-CLASS-BASED-QOS-MIB

CISCO-CLASS-BASED-QOS-CAPABILITY-MIB

For descriptions of supported MIBs and how to use MIBs, see the Cisco MIB web site on Cisco.com at http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml.

RFCs

RFC 2474, Definition of the Differentiated Services Field in IPv4 and IPv6 Headers

RFC 2475, An Architecture for Differentiated Services Framework

RFC 2597, Assured Forwarding PHB

RFC 2598, An Expedited Forwarding PHB

Configuration Tasks

See the following sections for configuration tasks for the DiffServ Compliant Weighted Random Early Detection feature. Each task in the list is identified as optional or required.

Configuring WRED to Use the DSCP Value (Required)

Verifying the DSCP Value Configuration (Optional)

Configuring WRED to Use the DSCP Value

The commands used to configure WRED to use the DSCP value vary according to whether WRED is used at the interface level, the per-VC level, or the class level.

WRED at the Interface Level

To configure WRED to use the DSCP value when it calculates the drop probability, use the following commands beginning in interface configuration mode:

 
Command
Purpose

Step 1 

Router(config-if)# random-detect dscp-based

Indicates that WRED is to use the DSCP value when it calculates the drop probability for the packet.

Step 2 

Router(config-if)# random-detect dscp dscpvalue min-threshold max-threshold [mark-probability-denominator]

Specifies the minimum and maximum thresholds, and, optionally, the mark-probability denominator for the specified DSCP value.

WRED at the per-VC Level

To configure WRED to use the DSCP value when it calculates the drop probability, use the following command beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router(config-if)# random-detect-group group-name dscp-based

Indicates that WRED is to use the DSCP value when it calculates the drop probability for the packet.

Step 2 

Router(cfg-red-grp)# dscp dscpvalue min-threshold max-threshold [mark-probability-denominator]

Specifies the DSCP value, the minimum and maximum packet thresholds and, optionally, the mark-probability denominator for the DSCP value.

Step 3 

Router(config-atm-vc)# random-detect [attach group-name]

Enables per-VC WRED or per-VC VIP-Distributed Weighted Random Early Detection (DWRED).

WRED at the Class Level

To configure WRED to use the DSCP value when it calculates the drop probability, use the following commands beginning in interface configuration mode. These are the commands to use at the class level, within policy maps.

 
Command
Purpose

Step 1 

Router(config-if)# class-map class-map-name

Creates a class map to be used for matching packets to a specified class.

Step 2 

Router(config-cmap)# match match-criterion

Configures the match criteria for a class map. For additional information on the Modular Quality of Service Command-Line Interface (Modular QoS CLI), including information on match criteria in class maps, see the Modular QoS CLI document on Cisco.com.

Step 3 

Router(config-if)# policy-map policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.

Step 4 

Router(config-pmap)# class class-map-name

Specifies the quality of service (QoS) actions for the default class.

Step 5 

Router(config-pmap-c)# bandwidth {bandwidth-kbps | percent percent}

Specifies or modifies the bandwidth allocated for a class belonging to a policy map.

Step 6 

Router(config-pmap-c)# random-detect dscp-based

Indicates that WRED is to use the DSCP value when it calculates the drop probability for the packet.

Step 7 

Router(config-pmap-c)# random-detect dscp dscpvalue min-threshold max-threshold [mark-probability-denominator]

Specifies the minimum and maximum packet thresholds and, optionally, the mark-probability denominator for the DSCP value.

Step 8 

Router(config-if)# service-policy output policy-map

Attaches a policy map to an output interface or VC to be used as the service policy for that interface or VC.

Verifying the DSCP Value Configuration

To verify the DSCP value configuration, use either of the following commands in global configuration mode:

Command
Purpose

Router# show queueing interface

Displays the queueing statistics of an interface or VC.

Router# show policy-map interface

Displays the configuration of classes configured for service policies on the specified interface or permanent virtual circuit (PVC).


Configuration Examples

This section provides the following configuration examples:

WRED Configured to Use the DSCP Value Example

DSCP Value Configuration Verification Example

WRED Configured to Use the DSCP Value Example

The following example configures WRED to use the DSCP value 8. The minimum threshold for the DSCP value 8 is 24 and the maximum threshold is 40. This configuration was performed at the interface level.

(config-if)# interface seo/0
(config-if)# random-detect dscp-based
(config-if)# random-detect dscp 8 24 40

The following example enables WRED to use the DSCP value 9. The minimum threshold for the DSCP value 9 is 20 and the maximum threshold is 50. This configuration can be attached to other VCs, as required.

(config)# random-detect-group sanjose dscp-based
(cfg-red-grp)# dscp 9 20 50
(config-subif-vc)# random-detect attach sanjose

The following example enables WRED to use the DSCP value 8 for class c1. The minimum threshold for the DSCP value 8 is 24 and the maximum threshold is 40. The last line attaches the service policy to the output interface or VC p1.

(config-if)# class-map c1
(config-cmap)# match access-group 101
(config-if)# policy-map p1
(config-pmap)# class c1
(config-pmap-c)# bandwidth 48
(config-pmap-c)# random-detect dscp-based
(config-pmap-c)# random-detect dscp 8 24 40
(config-if)# service-policy output p1

DSCP Value Configuration Verification Example

When WRED has been configured to use the DSCP value when it calculates the drop probability of a packet, all 64 entries of the DSCP table are initialized with the appropriate default values. The examples in the following section are samples of the show queueing interface command (for WRED at either the interface or per-VC level) and the show policy interface command (for WRED at the class level).

These examples display packet statistics along with the 64 entries of the DSCP table, confirming that WRED has been enabled to use the DSCP value when it calculates the drop probability for a packet.


WRED at the interface :
 ------------------------
 router# show queueing interface s2/1

 Interface Serial2/1 queueing strategy: random early detection (WRED)
     Exp-weight-constant: 9 (1/512)
     Mean queue depth: 36
     Dscp     Random drop       Tail drop        Minimum   Maximum     Mark
     (Prec)    pkts/bytes        pkts/bytes      threshold threshold probability
       0(0)     160/39360            8/1968          20        40       1/10
       1          0/0                0/0             22        40       1/10
       2          0/0                0/0             24        40       1/10
       3          0/0                0/0             26        40       1/10
       4          0/0                0/0             28        40       1/10
       5          0/0                0/0             30        40       1/10
       6          0/0                0/0             32        40       1/10
       7          0/0                0/0             34        40       1/10
       8(1)     156/38376            8/1968          22        40       1/10
       9          0/0                0/0             22        40       1/10
      10          0/0                0/0             24        40       1/10
      11          0/0                0/0             26        40       1/10
      12          0/0                0/0             28        40       1/10
      13          0/0                0/0             30        40       1/10
      14          0/0                0/0             32        40       1/10
      15          0/0                0/0             34        40       1/10
      16(2)     164/40344           24/5904          24        40       1/10
      17          0/0                0/0             22        40       1/10
      18          0/0                0/0             24        40       1/10
      19          0/0                0/0             26        40       1/10
      20          0/0                0/0             28        40       1/10
      21          0/0                0/0             30        40       1/10
      22          0/0                0/0             32        40       1/10
      23          0/0                0/0             34        40       1/10
      24(3)     203/49938            8/1968          26        40       1/10
      25          0/0                0/0             22        40       1/10
      26          0/0                0/0             24        40       1/10
      27          0/0                0/0             26        40       1/10
      28          0/0                0/0             28        40       1/10
      29          0/0                0/0             30        40       1/10
      30          0/0                0/0             32        40       1/10
      31          0/0                0/0             34        40       1/10
      32(4)       0/0                0/0             28        40       1/10
      33          0/0                0/0             22        40       1/10
      34          0/0                0/0             24        40       1/10
      35          0/0                0/0             26        40       1/10
      36          0/0                0/0             28        40       1/10
      37          0/0                0/0             30        40       1/10
      38          0/0                0/0             32        40       1/10
      39          0/0                0/0             34        40       1/10
      40(5)       0/0                0/0             30        40       1/10
      41          0/0                0/0             22        40       1/10
      42          0/0                0/0             24        40       1/10
      43          0/0                0/0             26        40       1/10
      44          0/0                0/0             28        40       1/10
      45          0/0                0/0             30        40       1/10
      46          0/0                0/0             36        40       1/10
      47          0/0                0/0             34        40       1/10
      48(6)       0/0                0/0             32        40       1/10
      49          0/0                0/0             22        40       1/10
      50          0/0                0/0             24        40       1/10
      51          0/0                0/0             26        40       1/10
      52          0/0                0/0             28        40       1/10
      53          0/0                0/0             30        40       1/10
      54          0/0                0/0             32        40       1/10
      55          0/0                0/0             34        40       1/10
      56(7)       0/0                0/0             34        40       1/10
      57          0/0                0/0             22        40       1/10
      58          0/0                0/0             24        40       1/10
      59          0/0                0/0             26        40       1/10
      60          0/0                0/0             28        40       1/10
      61          0/0                0/0             30        40       1/10
      62          0/0                0/0             32        40       1/10
      63          0/0                0/0             34        40       1/10
      rsvp        0/0                0/0             36        40       1/10
 WRED at the vc :
 -----------------
 router# show queueing interface atm3/0

 Interface ATM3/0.1 VC 0/101
   Queueing strategy: random early detection (WRED)
     Exp-weight-constant: 9 (1/512)
     Mean queue depth: 0
     Total output drops per VC: 0
      Dscp     Random drop       Tail drop        Minimum   Maximum     Mark
     (Prec)    pkts/bytes        pkts/bytes      threshold threshold probability
       0(0)       0/0                0/0             20        40       1/10
       1          0/0                0/0             22        40       1/10
       2          0/0                0/0             24        40       1/10
       3          0/0                0/0             26        40       1/10
       4          0/0                0/0             28        40       1/10
       5          0/0                0/0             30        40       1/10
       6          0/0                0/0             32        40       1/10
       7          0/0                0/0             34        40       1/10
       8(1)       0/0                0/0             22        40       1/10
       9          0/0                0/0             22        40       1/10
      10          0/0                0/0             24        40       1/10
      11          0/0                0/0             26        40       1/10
      12          0/0                0/0             28        40       1/10
      13          0/0                0/0             30        40       1/10
      14          0/0                0/0             32        40       1/10
      15          0/0                0/0             34        40       1/10
      16(2)       0/0                0/0             24        40       1/10
      17          0/0                0/0             22        40       1/10
      18          0/0                0/0             24        40       1/10
      19          0/0                0/0             26        40       1/10
      20          0/0                0/0             28        40       1/10
      21          0/0                0/0             30        40       1/10
      22          0/0                0/0             32        40       1/10
      23          0/0                0/0             34        40       1/10
      24(3)       0/0                0/0             26        40       1/10
      25          0/0                0/0             22        40       1/10
      26          0/0                0/0             24        40       1/10
      27          0/0                0/0             26        40       1/10
      28          0/0                0/0             28        40       1/10
      29          0/0                0/0             30        40       1/10
      30          0/0                0/0             32        40       1/10
      31          0/0                0/0             34        40       1/10
      32(4)       0/0                0/0             28        40       1/10
      33          0/0                0/0             22        40       1/10
      34          0/0                0/0             24        40       1/10
      35          0/0                0/0             26        40       1/10
      36          0/0                0/0             28        40       1/10
      37          0/0                0/0             30        40       1/10
      38          0/0                0/0             32        40       1/10
      39          0/0                0/0             34        40       1/10
      40(5)       0/0                0/0             30        40       1/10
      41          0/0                0/0             22        40       1/10
      42          0/0                0/0             24        40       1/10
      43          0/0                0/0             26        40       1/10
      44          0/0                0/0             28        40       1/10
      45          0/0                0/0             30        40       1/10
      46          0/0                0/0             36        40       1/10
      47          0/0                0/0             34        40       1/10
      48(6)       0/0                0/0             32        40       1/10
      49          0/0                0/0             22        40       1/10
      50          0/0                0/0             24        40       1/10
      51          0/0                0/0             26        40       1/10
      52          0/0                0/0             28        40       1/10
      53          0/0                0/0             30        40       1/10
      54          0/0                0/0             32        40       1/10
      55          0/0                0/0             34        40       1/10
      56(7)       0/0                0/0             34        40       1/10
      57          0/0                0/0             22        40       1/10
      58          0/0                0/0             24        40       1/10
      59          0/0                0/0             26        40       1/10
      60          0/0                0/0             28        40       1/10
      61          0/0                0/0             30        40       1/10
      62          0/0                0/0             32        40       1/10
      63          0/0                0/0             34        40       1/10
      rsvp        0/0                0/0             36        40       1/10
 WRED inside a class
 -------------------- 
 The examples illustrate the one when service-policy is attached to the interface
 but the same display and default values will be seen if WRED is configured inside
 a policy-map that is attached at the vc or within the map-class :

 qos4-72c# show policy interface s2/1
  Serial2/1
  output : p1
   Class c1
    Weighted Fair Queueing
        Output Queue: Conversation 265
          Bandwidth 20 (%)
          (pkts matched/bytes matched) 168174/41370804
          (pkts discards/bytes discards/tail drops) 20438/5027748/0
          mean queue depth: 39
     Dscp     Random drop       Tail drop        Minimum   Maximum     Mark
     (Prec)    pkts/bytes        pkts/bytes      threshold threshold probability
       0(0)    2362/581052        1996/491016        20        40       1/10
       1          0/0                0/0             22        40       1/10
       2          0/0                0/0             24        40       1/10
       3          0/0                0/0             26        40       1/10
       4       2159/531114         196/48216         28        40       1/10
       5       2114/520044        1185/291510        30        40       1/10
       6       1972/485112         318/78228         32        40       1/10
       7       1912/470352         344/84624         34        40       1/10
       8(1)    2428/597288         619/152274        22        40       1/10
       9       2423/596058         438/107748        22        40       1/10
      10          0/0                0/0             24        40       1/10
      11          0/0                0/0             26        40       1/10
      12          0/0                0/0             28        40       1/10
      13          0/0                0/0             30        40       1/10
      14          0/0                0/0             32        40       1/10
      15          0/0                0/0             34        40       1/10
      16(2)       0/0                0/0             24        40       1/10
      17          0/0                0/0             22        40       1/10
      18          0/0                0/0             24        40       1/10
      19          0/0                0/0             26        40       1/10
      20          0/0                0/0             28        40       1/10
      21          0/0                0/0             30        40       1/10
      22          0/0                0/0             32        40       1/10
      23          0/0                0/0             34        40       1/10
      24(3)       0/0                0/0             26        40       1/10
      25          0/0                0/0             22        40       1/10
      26          0/0                0/0             24        40       1/10
      27          0/0                0/0             26        40       1/10
      28          0/0                0/0             28        40       1/10
      29          0/0                0/0             30        40       1/10
      30          0/0                0/0             32        40       1/10
      31          0/0                0/0             34        40       1/10
      32(4)       0/0                0/0             28        40       1/10
      33          0/0                0/0             22        40       1/10
      34          0/0                0/0             24        40       1/10
      35          0/0                0/0             26        40       1/10
      36          0/0                0/0             28        40       1/10
      37          0/0                0/0             30        40       1/10
      38          0/0                0/0             32        40       1/10
      39          0/0                0/0             34        40       1/10
      40(5)       0/0                0/0             30        40       1/10
      41          0/0                0/0             22        40       1/10
      42          0/0                0/0             24        40       1/10
      43          0/0                0/0             26        40       1/10
      44          0/0                0/0             28        40       1/10
      45          0/0                0/0             30        40       1/10
      46          0/0                0/0             36        40       1/10
      47          0/0                0/0             34        40       1/10
      48(6)       0/0                0/0             32        40       1/10
      49          0/0                0/0             22        40       1/10
      50          0/0                0/0             24        40       1/10
      51          0/0                0/0             26        40       1/10
      52          0/0                0/0             28        40       1/10
      53          0/0                0/0             30        40       1/10
      54          0/0                0/0             32        40       1/10
      55          0/0                0/0             34        40       1/10
      56(7)       0/0                0/0             34        40       1/10
      57          0/0                0/0             22        40       1/10
      58          0/0                0/0             24        40       1/10
      59          0/0                0/0             26        40       1/10
      60          0/0                0/0             28        40       1/10
      61          0/0                0/0             30        40       1/10
      62          0/0                0/0             32        40       1/10
      63          0/0                0/0             34        40       1/10
      rsvp        0/0                0/0             36        40       1/10

Command Reference

This section documents the following new or modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.1 command reference publications.

dscp

random-detect dscp

random-detect (interface)

random-detect-group

dscp

To change the minimum and maximum packet thresholds for the differentiated services code point (DSCP) value, use the dscp command in cfg-red-grp configuration mode. To return the minimum and maximum packet thresholds to the default for the DSCP value, use the no form of this command.

dscp dscpvalue min-threshold max-threshold [mark-probability-denominator]

no dscp dscpvalue min-threshold max-threshold [mark-probability-denominator]

Syntax Description

dscpvalue

Specifies the DSCP value. The DSCP value can be a number from 0 to 63, or it can be one of the following keywords: ef, af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, or cs7.

min-threshold

Minimum threshold in number of packets. The value range of this argument is 1 to 4096. When the average queue length reaches the minimum threshold, Weighted Random Early Detection (WRED) randomly drops some packets with the specified DSCP value.

max-threshold

Maximum threshold in number of packets. The value range of this argument is the value of the min-threshold argument to 4096. When the average queue length exceeds the maximum threshold, WRED drops all packets with the specified DSCP value.

mark-probability-denominator

(Optional) Denominator for the fraction of packets dropped when the average queue depth is at the maximum threshold. For example, if the denominator is 512, one out of every 512 packets is dropped when the average queue is at the maximum threshold. The value range is 1 to 65536. The default is 10; one out of every ten packets is dropped at the maximum threshold.


Defaults

If WRED is using the DSCP value to calculate the drop probability of a packet, all 64 entries of the DSCP table are initialized with the default settings shown in Table 1.

Table 1 dscp Default Settings 

DSCP
(Precedence)
Minimum Threshold
Maximum Threshold
Mark Probability

0(0)

20

40

1/10

1

22

40

1/10

2

24

40

1/10

3

26

40

1/10

4

28

40

1/10

5

30

40

1/10

6

32

40

1/10

7

34

40

1/10

8(1)

22

40

1/10

9

22

40

1/10

10

24

40

1/10

11

26

40

1/10

12

28

40

1/10

13

30

40

1/10

14

32

40

1/10

15

34

40

1/10

16(2)

24

40

1/10

17

22

40

1/10

18

24

40

1/10

19

26

40

1/10

20

28

40

1/10

21

30

40

1/10

22

32

40

1/10

23

34

40

1/10

24(3)

26

40

1/10

25

22

40

1/10

26

24

40

1/10

27

26

40

1/10

28

28

40

1/10

29

30

40

1/10

30

32

40

1/10

31

34

40

1/10

32(4)

28

40

1/10

33

22

40

1/10

34

24

40

1/10

35

26

40

1/10

36

28

40

1/10

37

30

40

1/10

38

32

40

1/10

39

34

40

1/10

40(5)

30

40

1/10

41

22

40

1/10

42

24

40

1/10

43

26

40

1/10

44

28

40

1/10

45

30

40

1/10

46

36

40

1/10

47

34

40

1/10

48(6)

32

40

1/10

49

22

40

1/10

50

24

40

1/10

51

26

40

1/10

52

28

40

1/10

53

30

40

1/10

54

32

40

1/10

55

34

40

1/10

56(7)

34

40

1/10

57

22

40

1/10

58

24

40

1/10

59

26

40

1/10

60

28

40

1/10

61

30

40

1/10

62

32

40

1/10

63

34

40

1/10

rsvp

36

40

1/10


Command Modes

cfg-red-grp configuration

Command History

Release
Modification

12.1(5)T

This command was introduced.


Usage Guidelines

This command must be used in conjunction with the random-detect-group command.

Additionally, the dscp command is available only if you specified the dscp-based argument when using the random-detect-group command.

Examples

The following example enables WRED to use the DSCP value 8. The minimum threshold for the DSCP value 8 is 20, the maximum threshold is 40, and the mark probability is 10.

dscp 8 20 40 10

Related Commands

Command
Description

random-detect-group

Enables per-VC WRED or per-VC DWRED.

show queueing

Lists all or selected configured queueing strategies.

show queueing interface

Displays the queueing statistics of an interface or VC.


random-detect dscp

To change the minimum and maximum packet thresholds for the differentiated services code point (DSCP) value, use the random-detect dscp interface configuration command. To return the minimum and maximum packet thresholds to the default for the DSCP value, use the no form of this command.

random-detect dscp dscpvalue min-threshold max-threshold [mark-probability-denominator]

no random-detect dscp dscpvalue min-threshold max-threshold [mark-probability-denominator]

Syntax Description

dscpvalue

Specifies the DSCP value. The DSCP value can be a number from 0 to 63, or it can be one of the following keywords: ef, af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, or cs7.

min-threshold

Minimum threshold in number of packets. The value range of this argument is 1 to 4096. When the average queue length reaches the minimum threshold, Weighted Random Early Detection (WRED) randomly drops some packets with the specified DSCP value.

max-threshold

Maximum threshold in number of packets. The value range of this argument is the value of the min-threshold argument to 4096. When the average queue length exceeds the maximum threshold, WRED drops all packets with the specified DSCP value.

mark-probability-denominator

(Optional) Denominator for the fraction of packets dropped when the average queue depth is at the maximum threshold. For example, if the denominator is 512, one out of every 512 packets is dropped when the average queue is at the maximum threshold. The value range is 1 to 65536. The default is 10; one out of every ten packets is dropped at the maximum threshold.


Defaults

If WRED is using the DSCP value to calculate the drop probability of a packet, all 64 entries of the DSCP table are initialized with the default settings shown in Table 2.

Table 2 random-detect dscp Default Settings

DSCP
(Precedence)
Minimum Threshold
Maximum Threshold
Mark Probability

0(0)

20

40

1/10

1

22

40

1/10

2

24

40

1/10

3

26

40

1/10

4

28

40

1/10

5

30

40

1/10

6

32

40

1/10

7

34

40

1/10

8(1)

22

40

1/10

9

22

40

1/10

10

24

40

1/10

11

26

40

1/10

12

28

40

1/10

13

30

40

1/10

14

32

40

1/10

15

34

40

1/10

16(2)

24

40

1/10

17

22

40

1/10

18

24

40

1/10

19

26

40

1/10

20

28

40

1/10

21

30

40

1/10

22

32

40

1/10

23

34

40

1/10

24(3)

26

40

1/10

25

22

40

1/10

26

24

40

1/10

27

26

40

1/10

28

28

40

1/10

29

30

40

1/10

30

32

40

1/10

31

34

40

1/10

32(4)

28

40

1/10

33

22

40

1/10

34

24

40

1/10

35

26

40

1/10

36

28

40

1/10

37

30

40

1/10

38

32

40

1/10

39

34

40

1/10

40(5)

30

40

1/10

41

22

40

1/10

42

24

40

1/10

43

26

40

1/10

44

28

40

1/10

45

30

40

1/10

46

36

40

1/10

47

34

40

1/10

48(6)

32

40

1/10

49

22

40

1/10

50

24

40

1/10

51

26

40

1/10

52

28

40

1/10

53

30

40

1/10

54

32

40

1/10

55

34

40

1/10

56(7)

34

40

1/10

57

22

40

1/10

58

24

40

1/10

59

26

40

1/10

60

28

40

1/10

61

30

40

1/10

62

32

40

1/10

63

34

40

1/10

rsvp

36

40

1/10


Command Modes

Interface configuration

Command History

Release
Modification

12.1(5)T

This command was introduced.


Usage Guidelines

The random-detect dscp command allows you to specify the DSCP value. The DSCP value can be a number from 0 to 63, or it can be one of the following keywords: ef, af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, or cs7.

This command must be used in conjunction with the random-detect (interface) command.

Additionally, the random-detect dscp command is available only if you specified the dscp-based argument when using the random-detect (interface) command.

Examples

The following example enables WRED to use the DSCP value 8. The minimum threshold for the DSCP value 8 is 20, the maximum threshold is 40, and the mark probability is 10.

random-detect dscp 8 20 40 10

Related Commands

Command
Description

random-detect (interface)

Enables WRED or DWRED.

show queueing

Lists all or selected configured queueing strategies.

show queueing interface

Displays the queueing statistics of an interface or VC.


random-detect (interface)

To enable Weighted Random Early Detection (WRED) or VIP-Distributed WRED (DWRED), use the random-detect interface configuration command. To configure WRED as class policy in a policy map, use the random-detect interface and policy-map class configuration command. To disable WRED or DWRED, use the no form of this command.

random-detect [dscp-based | prec-based]

no random-detect [dscp-based | prec-based]

Syntax Description

dscp-based

(Optional) Specifies that WRED is to use the differentiated services code point (DSCP) value when it calculates the drop probability for a packet.

prec-based

(Optional) Specifies that WRED is to use the IP Precedence value when it calculates the drop probability for a packet.


Defaults

WRED and DWRED are disabled by default.

If you choose not to use either the dscp-based or the prec-based argument, WRED uses the IP Precedence value (the default method) to calculate drop probability for the packet.

Command Modes

Interface configuration when used on an interface.

Policy-map class configuration when used to specify class policy in a policy map.

Command History

Release
Modification

11.1 CC

This command was introduced.

12.1(5)T

Arguments were added to support Differentiated Services (DiffServ) and Assured Forwarding (AF) Per-Hop Behavior (PHB).


Usage Guidelines

This command includes two optional arguments, dscp-based and prec-based, that determine the method WRED uses to calculate the drop probability of a packet.

Note the following points when deciding which method to instruct WRED to use:

With the dscp-based argument, WRED uses the DSCP value (that is, the first six bits of the IP type of service (ToS) byte) to calculate the drop probability.

With the prec-based argument, WRED will use the IP Precedence value to calculate the drop probability.

The dscp-based and prec-based arguments are mutually exclusive.

If neither argument is specified, WRED uses the IP Precedence value to calculate the drop probability (the default method).

Examples

The following example enables WRED to use the DSCP value 8. The minimum threshold for the DSCP value 8 is 24 and the maximum threshold is 40. This configuration was performed at the interface level.

(config-if)# interface seo/0
(config-if)# random-detect dscp-based
(config-if)# random-detect dscp 8 24 40

The following example enables WRED to use the DSCP value 8 for class c1. The minimum threshold for DSCP value 8 is 24 and the maximum threshold is 40. The last line attaches the service policy to the output interface or virtual circuit (VC) p1.

(config-if)# class-map c1
(config-cmap)# match access-group 101
(config-if)# policy-map p1
(config-pmap)# class c1
(config-pmap-c)# bandwidth 48
(config-pmap-c)# random-detect dscp-based
(config-pmap-c)# random-detect dscp 8 24 40
(config-if)# service-policy output p1

Related Commands

Command
Description

random-detect dscp

Configures the minimum and maximum packet thresholds, and optionally, the mark-probability denominator for the DSCP value.

random-detect exponential-weighting-constant

Configures the WRED and DWRED exponential weight factor for the average queue size calculation.

random-detect flow

Enables flow-based WRED.

random-detect precedence

Configures WRED and DWRED parameters for a particular IP Precedence.

show interfaces

Displays statistics for all interfaces configured on the router or access server.

show queueing

Lists all or selected configured queueing strategies.

show tech-support rsvp

Generates a report of all RSVP-related information.


I

random-detect-group

To define the Weighted Random Early Detection (WRED) or VIP-Distributed WRED (DWRED) parameter group, use the random-detect-group global configuration command. To delete the WRED or DWRED parameter group, use the no form of this command.

random-detect-group group-name [dscp-based | prec-based]

no random-detect-group group-name [dscp-based | prec-based]

Syntax Description

group-name

Name for the WRED or DWRED parameter group.

dscp-based

(Optional) Specifies that WRED is to use the differentiated services code point (DSCP) value when it calculates the drop probability for a packet.

prec-based

(Optional) Specifies that WRED is to use the IP Precedence value when it calculates the drop probability for a packet.


Defaults

No WRED or DWRED parameter group exists.

If you choose not to use either the dscp-based or the prec-based argument, WRED uses the IP Precedence value (the default method) to calculate drop probability for the packet.

Command Modes

Global configuration

Command History

Release
Modification

11.1(22)CC

This command was introduced.

12.1(5)T

Arguments were added to support Differentiated Services (DiffServ) and Assured Forwarding (AF) Per-Hop Behavior (PHB).


Usage Guidelines

This command includes two optional arguments, dscp-based and prec-based, that determine the method WRED uses to calculate the drop probability of a packet.

Note the following points when deciding which method to instruct WRED to use:

With the dscp-based argument, WRED uses the DSCP value (that is, the first six bits of the IP type of service (ToS) byte) to calculate the drop probability.

With the prec-based argument, WRED will use the IP Precedence value to calculate the drop probability.

The dscp-based and prec-based arguments are mutually exclusive.

If neither argument is specified, WRED uses the IP Precedence value to calculate the drop probability (the default method).

Examples

The following example defines the WRED parameter group called sanjose:

random-detect-group sanjose
  dscp 0 10 100
  dscp 4 20 100
  dscp 5 22 100
  dscp 10 10 100
  dscp 12 20 100
  dscp 14 30 100

The following example enables WRED to use the DSCP value 9. The minimum threshold for the DSCP value 9 is 20 and the maximum threshold is 50. This configuration can be attached to other VCs, as required.

(config)# random-detect-group sanjose dscp-based
(cfg-red-grp)# dscp 9 20 50
(config-subif-vc)# random-detect attach sanjose

Related Commands

Command
Description

dscp

Configures the minimum and maximum packet thresholds, and optionally, the mark-probability denominator for the DSCP value.

exponential-weighting-constant

Configures the exponential weight factor for the average queue size calculation for a WRED parameter group.

precedence (WRED group)

Configures a WRED group for a particular IP Precedence.

random-detect-group

Enables per-VC WRED or per-VC DWRED.

show queueing

Lists all or selected configured queueing strategies.

show queueing interface

Displays the queueing statistics of an interface or VC.