Table Of Contents
DiffServ Compliant Weighted Random Early Detection
Supported Standards, MIBs, and RFCs
Configuring WRED to Use the DSCP Value
Verifying the DSCP Value Configuration
WRED Configured to Use the DSCP Value Example
DSCP Value Configuration Verification Example
DiffServ Compliant Weighted Random Early Detection
This feature module describes the DiffServ Compliant Weighted Random Early Detection feature and includes the following sections:
•
Supported Standards, MIBs, and RFCs
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:
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:
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.
Verifying the DSCP Value Configuration
To verify the DSCP value configuration, use either of the following commands in global configuration mode:
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 40The 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 sanjoseThe 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 p1DSCP 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/1Interface Serial2/1 queueing strategy: random early detection (WRED)Exp-weight-constant: 9 (1/512)Mean queue depth: 36Dscp Random drop Tail drop Minimum Maximum Mark(Prec) pkts/bytes pkts/bytes threshold threshold probability0(0) 160/39360 8/1968 20 40 1/101 0/0 0/0 22 40 1/102 0/0 0/0 24 40 1/103 0/0 0/0 26 40 1/104 0/0 0/0 28 40 1/105 0/0 0/0 30 40 1/106 0/0 0/0 32 40 1/107 0/0 0/0 34 40 1/108(1) 156/38376 8/1968 22 40 1/109 0/0 0/0 22 40 1/1010 0/0 0/0 24 40 1/1011 0/0 0/0 26 40 1/1012 0/0 0/0 28 40 1/1013 0/0 0/0 30 40 1/1014 0/0 0/0 32 40 1/1015 0/0 0/0 34 40 1/1016(2) 164/40344 24/5904 24 40 1/1017 0/0 0/0 22 40 1/1018 0/0 0/0 24 40 1/1019 0/0 0/0 26 40 1/1020 0/0 0/0 28 40 1/1021 0/0 0/0 30 40 1/1022 0/0 0/0 32 40 1/1023 0/0 0/0 34 40 1/1024(3) 203/49938 8/1968 26 40 1/1025 0/0 0/0 22 40 1/1026 0/0 0/0 24 40 1/1027 0/0 0/0 26 40 1/1028 0/0 0/0 28 40 1/1029 0/0 0/0 30 40 1/1030 0/0 0/0 32 40 1/1031 0/0 0/0 34 40 1/1032(4) 0/0 0/0 28 40 1/1033 0/0 0/0 22 40 1/1034 0/0 0/0 24 40 1/1035 0/0 0/0 26 40 1/1036 0/0 0/0 28 40 1/1037 0/0 0/0 30 40 1/1038 0/0 0/0 32 40 1/1039 0/0 0/0 34 40 1/1040(5) 0/0 0/0 30 40 1/1041 0/0 0/0 22 40 1/1042 0/0 0/0 24 40 1/1043 0/0 0/0 26 40 1/1044 0/0 0/0 28 40 1/1045 0/0 0/0 30 40 1/1046 0/0 0/0 36 40 1/1047 0/0 0/0 34 40 1/1048(6) 0/0 0/0 32 40 1/1049 0/0 0/0 22 40 1/1050 0/0 0/0 24 40 1/1051 0/0 0/0 26 40 1/1052 0/0 0/0 28 40 1/1053 0/0 0/0 30 40 1/1054 0/0 0/0 32 40 1/1055 0/0 0/0 34 40 1/1056(7) 0/0 0/0 34 40 1/1057 0/0 0/0 22 40 1/1058 0/0 0/0 24 40 1/1059 0/0 0/0 26 40 1/1060 0/0 0/0 28 40 1/1061 0/0 0/0 30 40 1/1062 0/0 0/0 32 40 1/1063 0/0 0/0 34 40 1/10rsvp 0/0 0/0 36 40 1/10WRED at the vc :-----------------router# show queueing interface atm3/0Interface ATM3/0.1 VC 0/101Queueing strategy: random early detection (WRED)Exp-weight-constant: 9 (1/512)Mean queue depth: 0Total output drops per VC: 0Dscp Random drop Tail drop Minimum Maximum Mark(Prec) pkts/bytes pkts/bytes threshold threshold probability0(0) 0/0 0/0 20 40 1/101 0/0 0/0 22 40 1/102 0/0 0/0 24 40 1/103 0/0 0/0 26 40 1/104 0/0 0/0 28 40 1/105 0/0 0/0 30 40 1/106 0/0 0/0 32 40 1/107 0/0 0/0 34 40 1/108(1) 0/0 0/0 22 40 1/109 0/0 0/0 22 40 1/1010 0/0 0/0 24 40 1/1011 0/0 0/0 26 40 1/1012 0/0 0/0 28 40 1/1013 0/0 0/0 30 40 1/1014 0/0 0/0 32 40 1/1015 0/0 0/0 34 40 1/1016(2) 0/0 0/0 24 40 1/1017 0/0 0/0 22 40 1/1018 0/0 0/0 24 40 1/1019 0/0 0/0 26 40 1/1020 0/0 0/0 28 40 1/1021 0/0 0/0 30 40 1/1022 0/0 0/0 32 40 1/1023 0/0 0/0 34 40 1/1024(3) 0/0 0/0 26 40 1/1025 0/0 0/0 22 40 1/1026 0/0 0/0 24 40 1/1027 0/0 0/0 26 40 1/1028 0/0 0/0 28 40 1/1029 0/0 0/0 30 40 1/1030 0/0 0/0 32 40 1/1031 0/0 0/0 34 40 1/1032(4) 0/0 0/0 28 40 1/1033 0/0 0/0 22 40 1/1034 0/0 0/0 24 40 1/1035 0/0 0/0 26 40 1/1036 0/0 0/0 28 40 1/1037 0/0 0/0 30 40 1/1038 0/0 0/0 32 40 1/1039 0/0 0/0 34 40 1/1040(5) 0/0 0/0 30 40 1/1041 0/0 0/0 22 40 1/1042 0/0 0/0 24 40 1/1043 0/0 0/0 26 40 1/1044 0/0 0/0 28 40 1/1045 0/0 0/0 30 40 1/1046 0/0 0/0 36 40 1/1047 0/0 0/0 34 40 1/1048(6) 0/0 0/0 32 40 1/1049 0/0 0/0 22 40 1/1050 0/0 0/0 24 40 1/1051 0/0 0/0 26 40 1/1052 0/0 0/0 28 40 1/1053 0/0 0/0 30 40 1/1054 0/0 0/0 32 40 1/1055 0/0 0/0 34 40 1/1056(7) 0/0 0/0 34 40 1/1057 0/0 0/0 22 40 1/1058 0/0 0/0 24 40 1/1059 0/0 0/0 26 40 1/1060 0/0 0/0 28 40 1/1061 0/0 0/0 30 40 1/1062 0/0 0/0 32 40 1/1063 0/0 0/0 34 40 1/10rsvp 0/0 0/0 36 40 1/10WRED inside a class--------------------The examples illustrate the one when service-policy is attached to the interfacebut the same display and default values will be seen if WRED is configured insidea policy-map that is attached at the vc or within the map-class :qos4-72c# show policy interface s2/1Serial2/1output : p1Class c1Weighted Fair QueueingOutput Queue: Conversation 265Bandwidth 20 (%)(pkts matched/bytes matched) 168174/41370804(pkts discards/bytes discards/tail drops) 20438/5027748/0mean queue depth: 39Dscp Random drop Tail drop Minimum Maximum Mark(Prec) pkts/bytes pkts/bytes threshold threshold probability0(0) 2362/581052 1996/491016 20 40 1/101 0/0 0/0 22 40 1/102 0/0 0/0 24 40 1/103 0/0 0/0 26 40 1/104 2159/531114 196/48216 28 40 1/105 2114/520044 1185/291510 30 40 1/106 1972/485112 318/78228 32 40 1/107 1912/470352 344/84624 34 40 1/108(1) 2428/597288 619/152274 22 40 1/109 2423/596058 438/107748 22 40 1/1010 0/0 0/0 24 40 1/1011 0/0 0/0 26 40 1/1012 0/0 0/0 28 40 1/1013 0/0 0/0 30 40 1/1014 0/0 0/0 32 40 1/1015 0/0 0/0 34 40 1/1016(2) 0/0 0/0 24 40 1/1017 0/0 0/0 22 40 1/1018 0/0 0/0 24 40 1/1019 0/0 0/0 26 40 1/1020 0/0 0/0 28 40 1/1021 0/0 0/0 30 40 1/1022 0/0 0/0 32 40 1/1023 0/0 0/0 34 40 1/1024(3) 0/0 0/0 26 40 1/1025 0/0 0/0 22 40 1/1026 0/0 0/0 24 40 1/1027 0/0 0/0 26 40 1/1028 0/0 0/0 28 40 1/1029 0/0 0/0 30 40 1/1030 0/0 0/0 32 40 1/1031 0/0 0/0 34 40 1/1032(4) 0/0 0/0 28 40 1/1033 0/0 0/0 22 40 1/1034 0/0 0/0 24 40 1/1035 0/0 0/0 26 40 1/1036 0/0 0/0 28 40 1/1037 0/0 0/0 30 40 1/1038 0/0 0/0 32 40 1/1039 0/0 0/0 34 40 1/1040(5) 0/0 0/0 30 40 1/1041 0/0 0/0 22 40 1/1042 0/0 0/0 24 40 1/1043 0/0 0/0 26 40 1/1044 0/0 0/0 28 40 1/1045 0/0 0/0 30 40 1/1046 0/0 0/0 36 40 1/1047 0/0 0/0 34 40 1/1048(6) 0/0 0/0 32 40 1/1049 0/0 0/0 22 40 1/1050 0/0 0/0 24 40 1/1051 0/0 0/0 26 40 1/1052 0/0 0/0 28 40 1/1053 0/0 0/0 30 40 1/1054 0/0 0/0 32 40 1/1055 0/0 0/0 34 40 1/1056(7) 0/0 0/0 34 40 1/1057 0/0 0/0 22 40 1/1058 0/0 0/0 24 40 1/1059 0/0 0/0 26 40 1/1060 0/0 0/0 28 40 1/1061 0/0 0/0 30 40 1/1062 0/0 0/0 32 40 1/1063 0/0 0/0 34 40 1/10rsvp 0/0 0/0 36 40 1/10Command 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
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
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.
Command Modes
cfg-red-grp configuration
Command History
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 10Related Commands
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
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.
Command Modes
Interface configuration
Command History
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 10Related Commands
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
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 Modification11.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 40The 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 p1Related Commands
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
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 Modification11.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 sanjosedscp 0 10 100dscp 4 20 100dscp 5 22 100dscp 10 10 100dscp 12 20 100dscp 14 30 100The 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 sanjoseRelated Commands
