Table Of Contents
Quality of Service Commands on Cisco IOS XR Software
bandwidth (QoS)
bandwidth remaining
class (policy-map)
class-map
clear qos counters
conform-action
description
exceed-action
hw-module qos account layer2 encapsulation
hw-module qos multicast
hw-module qos multicast priorityq disable
hw-module qos queue-auto-defrag
match access-group
match cos
match destination-address
match discard-class
match dscp
match frame-relay dlci
match mpls experimental topmost
match packet length
match precedence
match protocol
match qos-group
match source-address
match vlan
police rate
policy-map
priority (QoS)
queue-limit
random-detect
random-detect cos
random-detect discard-class
random-detect dscp
random-detect exp
random-detect precedence
service-policy (interface)
service-policy (policy map class)
set atm-clp
set cos
set discard-class
set dscp
set mpls experimental
set precedence
set qos-group
set srp-priority
shape average
show fmgr interface
show hw-module multicast qos
show policy-map interface
show qos interface
switch-fabric service-policy
violate-action
Quality of Service Commands on Cisco IOS XR Software
This document lists QoS commands in alphabetical order. For detailed information about QoS concepts, configuration tasks, and examples, see Cisco IOS XR Modular Quality of Service Configuration Guide.
bandwidth (QoS)
To specify the minimum bandwidth allocated to a class belonging to a policy map, use the bandwidth command in policy map class configuration mode. To remove the bandwidth specified for a class, use the no form of this command.
bandwidth {rate [units] | percent percentage}
no bandwidth {rate [units] | percent percentage}
Syntax Description
rate
|
Minimum bandwidth, in the units specified, to be assigned to the class. Range is from 1 to 4294967295.
|
units
|
Specifies the units for the bandwidth. Values can be:
• bps—bits per second
• gbps—gigabits per second
• kbps—kilobits per second (default)
• mbps—megabits per second
|
percent percentage
|
Amount of guaranteed bandwidth, based on an absolute percentage of available bandwidth. Range is from 1 to 100.
|
Defaults
The default units is kbps.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
The ability to select the units for the bandwidth was added.
The range of bandwidth values was changed from 8 to 4000000 to 1 to 4294967295.
|
Release 3.3.1
|
Minimum rate value changed from 128 kbps to 256 kbps.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The bandwidth command is used to specify the minimum guaranteed bandwidth allocated for traffic matching a particular class. Bandwidth may be defined as a specific value or may be set as a percentage of the interface bandwidth.
The actual bandwidth used is calculated in multiples of 256 kbps, the minimum bandwidth rate. The configured value is rounded to the nearest multiple of 256 kbps. The value shown in the output of the running-configuration shows the configured value as entered by the user.
If a percentage value is set, the accuracy that can be expected is 1 percent.
The bandwidth command can be used only within egress service policies. Use within an ingress policy is not supported.
Note that the bandwidth value takes into account the Layer 2 encapsulation that will be applied to traffic leaving the interface. For POS/SDH transmission, the encapsulation is considered to be 4 bytes. For Ethernet, the encapsulation is 14 bytes; whereas for 802.1q, the encapsulation is 18 bytes. The actual bandwidth assigned to a class can be seen in the output of the show qos interface command.
Be careful when specifying bandwidth guarantees close to 100 percent, because the Layer 2 encapsulation considered does not include the entire Layer 2 header. This can lead to oversubscription, particularly in the case of small packet sizes.
A policy map can have a single bandwidth statement per class. Both percentage and actual value bandwidth configurations can be used within a policy map.
The bandwidth command does not specify how the bandwidth is to be shared. Instead it specifies how much bandwidth is guaranteed per class, by setting the number of tokens that are assigned to the token bucket of a particular class. For configured behavior to work correctly, you must ensure that the sum of the bandwidths plus any priority traffic is not greater than the bandwidth of the interface itself. If the interface is oversubscribed, unpredictable behavior results.
The bandwidth of the interface is set to be that of the physical interface, unless a hierarchical policy is defined that reduces the bandwidth available to the traffic. The following example shows a hierarchical policy being used to shape traffic to the specified value. The child policy then determines how the shaped bandwidth should be apportioned between the specified classes:
Note the presence of the bandwidth command within the parent policy. In this instance, the bandwidth command not only sets the minimum bandwidth for the class but also resets the reference point for the bandwidth percent statements in the child policy.
It is important to note that in a hierarchical configuration, the parent policy must have a bandwidth statement for the bandwidth statements in the child policy to take effect. If the bandwidth statement is not present in the parent policy, even if bandwidth statements are present in the child policy, no minimum bandwidth is reserved for the class.
Because the parent policy is applied to the interface, the bandwidth percentage values used in the child policy are in respect to the bandwidth value present in the parent policy rather than the supported physical interface traffic rate.
When the percent keyword is used with the bandwidth command, the bandwidth of the interface is defined as being the Layer 2 capacity excluding the POS/GE encapsulation but including the HDLC flags, FCS, and so on. These have to be included because they are applied per packet, and the system cannot predict how many packets of a particular packet size are being sent out.
For example, the following policy is applied to an OC-192 interface:
The resulting bandwidth reservation for class c1 is 4,792,320 kbps. This equates to 50 percent of the OC-192 bandwidth excluding the POS overhead.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to guarantee 50 percent of the interface bandwidth to a class called class1 and 10 percent of the interface bandwidth to a class called class2:
RP/0/RP1/CPU0:router(config)# policy-map policy1
RP/0/RP1/CPU0:router(config-pmap)# class class1
RP/0/RP1/CPU0:router(config-pmap-c)# bandwidth percent 50
RP/0/RP1/CPU0:router(config-pmap-c)# exit
RP/0/RP1/CPU0:router(config-pmap)# class class2
RP/0/RP1/CPU0:router(config-pmap-c)# bandwidth percent 10
Related Commands
Command
|
Description
|
class (policy-map)
|
Specifies the name of the class whose policy you want to create or change.
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
queue-limit
|
Specifies or modifies the maximum number of packets the queue can hold for a class policy configured in a policy map.
|
random-detect precedence
|
Configures WRED parameters for a particular IP precedence for a class policy in a policy map.
|
show policy-map interface
|
Displays policy configuration information for all classes configured for all service policies on the specified interface.
|
show qos interface
|
Displays QoS information for a specific interface.
|
bandwidth remaining
To specify how to allocate leftover bandwidth to various classes, use the bandwidth remaining command in policy map class configuration mode. To return to the system defaults, use the no form of this command.
bandwidth remaining percent percentage
no bandwidth remaining percent percentage
Syntax Description
percent percentage
|
Amount of guaranteed bandwidth, based on an absolute percentage of the available bandwidth. Range is from 1 to 100.
|
Defaults
No bandwidth is specified.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The bandwidth remaining command is used to set the Modified Deficit Round Robin (MDRR) weight for the particular class.
When applied within an egress service policy, the command is used to define how any unallocated bandwidth should be apportioned. It typically is used in conjunction with the bandwidth command. In such a combination, if the minimum bandwidth guarantees are met, the remaining bandwidth is shared in the ratio defined by the bandwidth remaining command in the class configuration in the policy-map.
If there is more bandwidth remaining and minimum bandwidth guarantees are met, the remaining bandwidth is shared equally by the classes, with no minimum bandwidth guarantee in the class configuration in the policy-map.
Note that on egress, the actual bandwidth of the interface is determined to be the Layer 2 capacity excluding the Layer 2 encapsulation, but including the HDLC flags, FCS, and so on. These have to be included because they are applied per packet, and the system cannot predict how many packets of a particular packet size are being sent out.
On ingress, you cannot use the bandwidth command to set the minimum bandwidth guarantee. Therefore, the bandwidth remaining command is used to proportionally allocate bandwidth to the particular classes, but there is no reserved bandwidth capacity.
Note that on ingress, the interface reference value is the Layer 3 capacity of the interface.
On both ingress and egress, if the bandwidth remaining command is not present, then bandwidth is shared equally between the configured classes present in the policy-map. When attempting precise calculations of expected MDRR behavior, you must bear in mind that because you are dealing with the bandwidth remaining on the link, you must convert the values to the bandwidth remaining percentages on the link, based upon the packet sizes of the traffic within the class. If the packet sizes are the same in all the classes, then the defined ratio is enforced precisely and predictably on the link.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
In the following example, a class called class1 is guaranteed 50 percent of the interface bandwidth and a class called class2 is guaranteed 10 percent of the interface bandwidth. The remaining bandwidth of 40 percent is shared by classes class1 and class2 in a 20:80 ratio: class class1 receives 20 percent of the 40 percent, and class class2 receives 80 percent of the 40 percent.
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth percent 50
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth remaining percent 20
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# class class2
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth percent 10
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth remaining percent 80
class (policy-map)
To specify the name of the class whose policy you want to create or change, use the class command in policy map configuration mode. To remove a class from the policy map, use the no form of this command.
class {class-name | class-default}
no class {class-name | class-default}
Syntax Description
class-name
|
Name of the class for which you want to configure or modify policy.
|
class-default
|
Configures the default class.
|
Defaults
No class is specified.
Command Modes
Policy map configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Policy Map Configuration Mode
Within a policy map, the class (policy-map) command can be used to specify the name of the class whose policy you want to create or change. The policy map must be identified first.
To identify the policy map (and enter the required policy map configuration mode), use the policy-map command before you use the class (policy-map) command. After you specify a policy map, you can configure the policy for new classes or modify the policy for any existing classes in that policy map.
Class Characteristics
The class name that you specify in the policy map ties the characteristics for that class—that is, its policy—to the class map and its match criteria, as configured using the class-map command.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to create a policy map called policy1, which is defined to shape class1 traffic at 30 percent and default class traffic at 20 percent.
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match precedence ipv4 3
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# shape average percent 30
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# class class-default
RP/0/RP0/CPU0:router(config-pmap-c)# shape average percent 20
The default class is used for packets that do not satisfy configured match criteria for class1. Class1 must be defined before it can be used in policy1, but the class default can be used in a policy map without defining it explicitly.
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
class-map
To define a traffic class and the associated rules that match packets to the class, use the class-map command in global configuration mode. To remove an existing class map from the router, use the no form of this command.
class-map [match-any] class-map-name
no class-map [match-any] class-map-name
Syntax Description
match-any
|
(Optional) Specifies a match on any of the match criteria. This is the default.
|
class-map-name
|
Name of the class for the class map. The class name is used for the class map and to configure policy for the class in the policy map. The name can be a maximum of 40 characters, must start with an alphanumeric character, and in addition to alphanumeric characters, can contain any of the following characters: . _ @ $ % + | # : ; -
|
Defaults
No default behavior or values
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The class-map command specifies the name of the class for which you want to create or modify class map match criteria. Use of this command enables class map configuration mode in which you can enter any match command to configure the match criteria for this class. Packets arriving on the interface are checked against the match criteria configured for a class map to determine if the packet belongs to that class.
The following commands can be used in a class map:
•
match access-group
•
match cos
•
match destination-address
•
match discard-class
•
match dscp
•
match mpls experimental topmost
•
match not
•
match precedence
•
match protocol
•
match qos-group
•
match source-address
•
match vlan
In a class map, if you specify more than one match command of the same type, only the last command entered applies.
The maximum number of class maps supported is 4000.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to specify class101 as the name of a class and defines a class map for this class. The packets that match the access list 101 are matched to class class101.
RP/0/RP0/CPU0:router(config)# class-map class101
RP/0/RP0/CPU0:router(config-cmap)# match access-group 101
Related Commands
Command
|
Description
|
class (policy-map)
|
Specifies the name of the class whose policy you want to create or change, and the default class called class-default before you configure its policy.
|
match access-group
|
Configures the match criteria for a class map based on the specified ACL number.
|
match cos
|
Configures a CoS value as a match criterion.
|
match destination-address
|
Configures a destination address as a match criterion to specify the destination MAC address explicitly.
|
match discard-class
|
Configures a discard class value as a match criterion.
|
match dscp
|
Configures a DSCP value as a match criterion.
|
match mpls experimental topmost
|
Configures a precedence value as a match criterion.
|
match packet length
|
Configures a packet length as a match criterion.
|
match precedence
|
Configures an IP precedence value as a match criterion.
|
match protocol
|
Configures a protocol value as a match criterion.
|
match qos-group
|
Configures a QoS group as a match criterion.
|
match source-address
|
Configures a source address as a match criterion to specify the source MAC address explicitly.
|
match vlan
|
Configures a VLAN value as a match criterion.
|
clear qos counters
To clear QoS counters for a specified interface, use the clear qos counters command in EXEC mode.
clear qos counters type instance [input | output]
Syntax Description
type
|
Interface type. For more information, use the question mark (?) online help function.
|
instance
|
Either a physical interface instance or a virtual interface instance as follows:
• Physical interface instance. Naming notation is rack/slot/module/port and a slash between values is required as part of the notation.
– rack: Chassis number of the rack.
– slot: Physical slot number of the modular services card or line card.
– module: Module number. A physical layer interface module (PLIM) is always 0.
– port: Physical port number of the interface.
Note In references to a Management Ethernet interface located on a route processor card, the physical slot number is alphanumeric (RP0 or RP1) and the module is CPU0. Example: interface MgmtEth0/RP1/CPU0/0.
• Virtual interface instance. Number range varies depending on interface type.
For more information about the syntax for the router, use the question mark (?) online help function.
|
input
|
(Optional) Clears input QoS counters that are attached to the specified interface.
|
output
|
(Optional) Clears output QoS counters that are attached to the specified interface.
|
Defaults
No default behavior or values
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
The pre-decrypt, post-decrypt, pre-encrypt, and post-encrypt keywords were added for IPSec on the Cisco XR 12000 Series Router.
|
Release 3.5.0
|
The pre-decrypt, post-decrypt, pre-encrypt, and post-encrypt keywords were removed for IPSec on the Cisco XR 12000 Series Router.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The clear qos counters command clears all input and output QoS counters that are attached to a specified interface, unless the input or output keyword is specified. If the input or output keyword is specified, only counters attached to the interface in a specified direction are cleared.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to clear QoS counters attached to Packet-over-SONET/SDH (POS) interface 0/7/0/3:
RP/0/RP0/CPU0:router# clear qos counters pos 0/7/0/3
The following example shows how to clear output QoS counters attached to POS interface 0/7/0/3:
RP/0/RP0/CPU0:router# clear qos counters pos 0/7/0/3 output
conform-action
To configure the action to take on packets that conform to the rate limit, use the conform-action command in policy map police configuration mode. To remove a conform action from the policy-map, use the no form of this command.
conform-action {drop | set options | transmit}
no conform-action {drop | set options | transmit}
Syntax Description
drop
|
Drops the packet.
|
set options
|
Configures the specified packet properties. Replace options with one of the following keywords or keyword arguments:
• atm-clp value—Sets the cell loss priority (CLP) bit.
• cos value—Sets the class of service value. Range is 0 to 7.
• discard-class value—Sets the discard class value. Range is 0 to 7.
• dscp [tunnel] value—Sets the differentiated services code point (DSCP) value and sends the packet. See Table 2 for a list of valid values. With the tunnel keyword, the DSCP is set in the outer header.
• mpls experimental {topmost | imposition} value—Sets the experimental (EXP) value of the Multiprotocol Label Switching (MPLS) packet topmost label or imposed label. Range is 0 to 7.
• precedence [tunnel] precedence—Sets the IP precedence and sends the packet. See Table 3 for a list of valid values. With the tunnel keyword, the precedence is set in the outer header.
• qos-group value—Sets the QoS group value.
|
transmit
|
Transmits the packets.
|
Defaults
No default behavior or values
Command Modes
Policy map police configuration
Command History
Release
|
Modification
|
Release 3.4.0
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.4.1
|
The set qos-group keyword was added.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The atm-clp keyword is available on the Cisco XR 12000 Series Router only.
For more information regarding the traffic policing feature, see police rate.
The conform-action command can set the DSCP, the precedence, or the discard class for IP packets, and experimental and discard class values for MPLS packets.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
In the following example for MPLS, traffic policing is configured to set the MPLS experimental bit for packets that conform to the rate limit:
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 0
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# police rate 250 kbps burst 50
RP/0/RP0/CPU0:router(config-pmap-c-police)# conform-action set mpls experimental topmost 4
RP/0/RP0/CPU0:router(config-pmap-c-police)# exit
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/5/0/0
RP/0/RP0/CPU0:router(config-if) service-policy input policy1
Related Commands
Command
|
Description
|
police rate
|
Configures traffic policing and enters policy map police configuration mode.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
show policy-map interface
|
Displays statistics and configurations of all input and output service policies that are attached to an interface.
|
description
To enter a comment string under a class map, use the description command in class map configuration mode. To remove a comment string from the class map, use the no form of this command.
description line
no description
Syntax Description
line
|
Description or comment string for the class-map.
|
Defaults
No default behavior or values
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 3.5.0
|
This command was introduced on the Cisco XR 12000 Series Router.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
In the following example, the comment string "hello world" is entered under a the class map called class1:
RP/0/0/CPU0:router(config)# class-map class1
RP/0/0/CPU0:router(config-cmap)# description hello world
exceed-action
To configure the action to take on packets that exceed the rate limit, use the exceed-action command in policy map police configuration mode. To remove an exceed action from the policy-map, use the no form of this command.
exceed-action {drop | set options | transmit}
no exceed-action {drop | set options | transmit}
Syntax Description
drop
|
Drops the packet.
|
set options
|
Configures the specified packet properties. Replace options with one of the following keywords or keyword arguments:
• cos value—Sets the class of service value. Range is 0 to 7.
• discard-class value—Sets the discard class value. Range is 0 to 7.
• dscp [tunnel] value—Sets the differentiated services code point (DSCP) value and sends the packet. See Table 2 for a list of valid values. With the tunnel keyword, the DSCP is set in the outer header.
• mpls experimental {topmost | imposition} value—Sets the experimental (EXP) value of the Multiprotocol Label Switching (MPLS) packet topmost label or imposed label. Range is 0 to 7.
• precedence [tunnel] precedence—Sets the IP precedence and sends the packet. See Table 3 for a list of valid values. With the tunnel keyword, the precedence is set in the outer header.
• qos-group value—Sets the QoS group value.
|
transmit
|
Transmits the packets.
|
Defaults
No default behavior or values
Command Modes
Policy map police configuration
Command History
Release
|
Modification
|
Release 3.4.0
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.4.1
|
The set qos-group keyword was added.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The atm-clp keyword is available on the Cisco XR 12000 Series Router only.
For more information regarding the traffic policing feature, see police rate.
The exceed-action command can set the DSCP, the precedence, or the discard class for IP packets, and experimental and discard-class values for MPLS packets.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
In the following example for MPLS, traffic policing is configured to drop traffic that exceeds the rate limit:
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 0
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# police rate 250 kbps burst 50
RP/0/RP0/CPU0:router(config-pmap-c-police)# exceed-action drop
RP/0/RP0/CPU0:router(config-pmap-c-police)# exit
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/5/0/0
RP/0/RP0/CPU0:router(config-if) service-policy input policy1
Related Commands
Command
|
Description
|
police rate
|
Configures traffic policing and enters policy map police configuration mode.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
show policy-map interface
|
Displays statistics and configurations of all input and output service policies that are attached to an interface.
|
hw-module qos account layer2 encapsulation
To configure Layer 2 encapsulation header lengths on a node, use the hw-module qos account layer2 encapsulation command in global configuration mode. To disable this functionality, use the no form of this command.
hw-module qos account layer2 encapsulation {arpa | dot1q | length value} location node-id
no hw-module qos account layer2 encapsulation {arpa | dot1q | length value} location node-id
Syntax Description
arpa
|
ARPA encapsulation size (14 bytes).
|
dot1q
|
EEE 802.1q encapsulation size (18 bytes).
|
length value
|
Layer 2 encapsulation length in bytes. Range is 1-50.
|
location node-id
|
The node-id argument is entered in the rack/slot/module notation.
|
Defaults
No default behavior or values
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 3.3.0
|
This command was introduced on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Note
This command is available only on the Cisco XR 12000 Series Router.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
root-lr
|
read, write
|
Examples
The following example shows how to configure Layer 2 encapsulation header lengths to 25 on 0/1/CPU0:
RP/0/RP0/CPU0:router# config
RP/0/RP0/CPU0:router(config)# hw-module qos account layer2 encapsulation length 25
0/1/CPU0
Related Commands
hw-module qos multicast
To enable multicast egress quality of service (QoS) on a node, use the hw-module qos multicast command in global configuration mode. To disable this functionality, use the no form of this command.
hw-module qos multicast [location node-id]
no hw-module qos multicast [location node-id]
Syntax Description
location node-id
|
(Optional) Enables egress QoS for the designated node. The node-id argument is entered in the rack/slot/module notation.
|
Defaults
All multicast traffic is routed through the default queue.
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 3.3.0
|
This command was introduced on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
The enable keyword was deleted from the command syntax.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The hw-module qos multicast command enables multicast QoS, which means that general, system wide QoS applies to multicast traffic as well.
Note
The following commands apply to Cisco XR 12000 Series Router Engine 3 line cards only: hw-module qos multicast, hw-module qos multicast priorityq, and show hw-module qos multicast. For Engine 5 line cards, there is no requirement for a command to enable QoS. On Engine 5 line cards, multicast QoS behaves like unicast QoS (when a policy is attached to an interface).
If multicast QoS is disabled (which is the default value), all multicast traffic travels to the default queue. When multicast routes are configured with QoS enabled, there may be insufficient resources (PLU/TLU, MGIDs, and so on.) to support multicast QoS for all routes. In such cases, some multicast routes are unchanged and associated multicast traffic is routed to the default queue.
For complete information about QoS in Cisco IOS XR software, see Cisco IOS XR Modular Quality of Service Command Reference and Cisco IOS XR Modular Quality of Service Configuration Guide.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
root-lr
|
read, write
|
Examples
The following example shows how to enable multicast QoS on 0/1/CPU0:
RP/0/RP0/CPU0:router# config
RP/0/RP0/CPU0:router(config)# hw-module qos multicast location 0/1/CPU0
Related Commands
hw-module qos multicast priorityq disable
To divert multicast traffic slated for the priority queue to the default queue, use the hw-module qos multicast priorityq disable command in global configuration mode. To disable this functionality, use the no form of this command.
hw-module qos multicast priorityq disable {location node-id}
no hw-module qos multicast priorityq disable {location node-id}
Syntax Description
location node-id
|
Assigns a QoS priority value for the designated node. The node-id argument is entered in the rack/slot/module notation.
|
Defaults
By default, all multicast traffic is routed to the priority queue (as defined by the QoS policy).
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 3.3.0
|
This command was introduced on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Note
The following commands apply to Cisco XR 12000 Series Router Engine 3 line cards only: hw-module qos multicast, hw-module qos multicast priorityq disable, and show hw-module qos multicast. For Engine 5 line cards, there is no requirement for a command to enable QoS. On Engine 5 line cards, multicast QoS behaves like unicast QoS (when a policy is attached to an interface).
For complete information about QoS in Cisco IOS XR software, see Cisco IOS XR Modular Quality of Service Command Reference and Cisco IOS XR Modular Quality of Service Configuration Guide.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
root-lr
|
read, write
|
Examples
The following example shows how to divert multicast traffic slated for the priority queue to the default queue on 0/1/CPU0:
RP/0/RP0/CPU0:router# hw-module qos multicast priorityq disable 0/1/CPU0
Related Commands
hw-module qos queue-auto-defrag
To disable automatic QoS queue defragmentation on a node, use the hw-module qos queue-auto-defrag command in global configuration mode. To disable this functionality, use the no form of this command.
hw-module qos queue-auto-defrag disable location node-id
no hw-module qos queue-auto-defrag disable location node-id
Syntax Description
disable
|
If enabled, disables QoS queue auto-defragmentation.
|
location node-id
|
The node-id argument is entered in the rack/slot/module notation.
|
Defaults
No default behavior or values
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 3.3.0
|
This command was introduced on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
The enable keyword was removed.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Note
This command is available only on the Cisco XR 12000 Series Router.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
root-lr
|
read, write
|
Examples
The following example shows how to disable automatic QoS queue defragmentation on 0/1/CPU0:
RP/0/RP0/CPU0:router# config
RP/0/RP0/CPU0:router(config)# hw-module qos queue-auto-defrag disable location 0/1/CPU0
Related Commands
match access-group
To identify a specified access control list (ACL) number as the match criteria for a class map, use the match access-group command in class map configuration mode. To remove ACL match criteria from a class map, use the no form of this command.
match access-group [ipv4 | ipv6] access-group-name
no match access-group [ipv4 | ipv6] access-group-name
Syntax Description
ipv4
|
(Optional) Specifies the name of the IPv4 access group to be matched. IPv4 addressing is the default.
|
ipv6
|
(Optional) Specifies the name of the IPv6 access group to be matched.
|
access-group-name
|
ACL whose contents are used as the match criteria against which packets are checked to determine if they belong to this class.
|
Defaults
No match criteria are configured.
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.2.2
|
Support for IPv6 ACLs with source port matching was added in MQC policy maps.
|
Release 3.3.0
|
No modification.
|
Release 3.3.1
|
Support for IPv4 ACLs with source port matching was added in MQC policy maps.
|
Release 3.4.0
|
No modification
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
For class-based features (such as marking, Modified Deficit Round Robin [MDRR], and policing), you define traffic classes based on match criteria, including ACLs and input interfaces. Packets satisfying the match criteria for a class constitute the traffic for that class.
The match access-group command specifies an ACL whose contents are used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.
Note
deny statements in ACLs used in the match access-group command are treated as permit statements.
To use the match access-group command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match access-group command in a class map, only the last command entered applies.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to specify a class map called map1 and configures map1 to be used as the match criteria for this class:
RP/0/RP0/CPU0:router(config)# class-map map1
RP/0/RP0/CPU0:router(config-cmap)# match access-group map1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
match cos
To identify specified class of service (CoS) values as a match criteria in a class map, use the match cos command in class map configuration mode. To remove a specified CoS class value from the matching criteria for a class map, use the no form of this command.
match [not] cos cos-value [cos-value1 ... cos-value7]
no match [not] cos cos-value [cos-value1 ... cos-value7]
Syntax Description
not
|
(Optional) Negates the specified match result.
|
cos-value
|
Class of service identifier that specifies the exact value from 0 to 7. Up to eight CoS identifiers can be specified to match packets.
|
Defaults
No match criteria are specified.
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 3.3.0
|
This command was introduced on the Cisco CRS-1 and the Cisco XR 12000 Series Router.
The not keyword was added on the Cisco CRS-1.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match cos command specifies a class of service that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.
To use the match cos command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match cos command in a class map, only the last command entered applies.
The match cos command is not supported on an output service policy attached to a Layer 3 interface (POS interface or routed VLAN subinterface).
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface. In this example, class map cos146 evaluates all packets entering Packet-over-SONET/SDH (POS) interface 0/1/0/0 for class of service values of 1, 4, or 6. If the incoming packet has been marked with any of these CoS values, the packet is queued to the class queue with the bandwidth setting of 300 kbps.
RP/0/RP0/CPU0:router(config)# class-map cos146
RP/0/RP0/CPU0:router(config-cmap)# match cos 1 4 6
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class cos146
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/1/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy input policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
set cos
|
Sets the Layer 2 CoS value in an outgoing packet.
|
match destination-address
To identify a specific destination MAC address explicitly as a match criterion in a class map, use the match destination-address command in class map configuration mode. To remove a specific destination MAC address from the matching criteria for a class map, use the no form of this command.
match [not] destination-address mac address
no match [not] destination-address mac address
Syntax Description
not
|
(Optional) Negates the specified match result.
|
mac address
|
Specifies the MAC address.
|
Defaults
No default behavior or values
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 3.4.0
|
This command was introduced on the Cisco CRS-1 and the Cisco XR 12000 Series Router.
The not keyword was added on the Cisco CRS-1 only.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match destination-address command specifies a destination address that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.
To use the match destination-address command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match destination-address command in a class map, only the last command entered applies.
The match destination-address command is supported only on an output service policy.
The command is allowed on a policy map that is attached to an Ethernet interface. The command is invalid on a policy that is attached to a Packet-over-SONET/SDH (POS) interface or a routed VLAN subinterface.
The match 48-bit MAC address is specified in xxxx.xxxx.xxxx format on L2VPN PE interfaces.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to match a source MAC address to a destination MAC address:
RP/0/RP0/CPU0:router(config)# class-map match-any A
RP/0/RP0/CPU0:router(config-cmap)# match source-address mac 0800.a0d0.4067
RP/0/RP0/CPU0:router(config-cmap)# match destination-address mac 000.f0d0.2356
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
match discard-class
To identify specific discard class values as a match criteria for a class map, use the match discard-class command in class map configuration mode. To remove specified discard class values from the matching criteria for a class map, use the no form of this command.
match [not] discard-class discard-class-value [discard-class-value1 ... discard-class-value7]
no match [not] discard-class discard-class-value [discard-class-value1 ... discard-class-value7]
Syntax Description
not
|
(Optional) Negates the specified match result.
|
discard-class-value
|
Discard class identifier. You can specify up to eight discard class identifiers to match packets. Class identifiers are separated by white-spaces. Range is 0-7.
|
Defaults
No default behavior or values
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
No modification.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router.
The not keyword was added on the Cisco CRS-1 only.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match discard-class command specifies a discard class that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.
To use the match discard-class command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match discard-class command in a class map, only the last command entered applies.
The match discard-class command sets the match criteria for examining discard classes marked on the packet. Up to seven discard class values can be matched in one match statement. For example, match discard-class 1 2 3 4 5 6 7 returns matches for discard class values 1, 2, 3, 4, 5, 6, and 7. Only one of the seven values is needed to yield a match (OR operation).
The discard class value is used as a matching criterion only. The value has no mathematical significance. For instance, the discard class value 2 is not greater than 1. The value simply indicates that a packet marked with the discard class of 2 should be treated differently than a packet marked with a discard class value of 1.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows a service policy called policy1 attached to an interface. In this example, class map discard class5 is created to evaluate all packets leaving Packet-over-SONET/SDH (POS) interface 0/2/0/1 for a discard-class value of 5. Packets marked with the discard class value of 5 are queued to a class queue with the bandwidth setting 300 kbps.
RP/0/RP0/CPU0:router(config)# class-map discard-class5
RP/0/RP0/CPU0:router(config-cmap)# match discard-class 5
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class discard-class5
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/2/0/1
RP/0/RP0/CPU0:router(config-if)# service-policy output policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
set discard-class
|
Sets the discard class identifiers on an IPv4 or MPLS packet.
|
set qos-group
|
Sets the QoS group value for packets.
|
match dscp
To identify specific IP differentiated services code point (DSCP) values as match criteria for a class map, use the match dscp command in class map configuration mode. To remove a DSCP value from a class map, use the no form of this command.
match [not] dscp [ipv4 | ipv6] dscp-value [dscp-value1 ... dscp-value7]
no match [not] dscp [ipv4 | ipv6] dscp-value [dscp-value1 ... dscp-value7]
Syntax Description
not
|
(Optional) Negates the specified match result.
|
ipv4
|
(Optional) Specifies the IPv4 DSCP value.
|
ipv6
|
(Optional) Specifies the IPv6 DSCP value.
|
dscp-value
|
IP DSCP value identifier that specifies the exact value. Up to 8 IP DSCP values can be specified to match packets. Reserved keywords can be specified instead of numeric values. Table 2 describes the reserved keywords.
|
Defaults
Matching on both IP Version (IPv4) and IPv6 packets is the default.
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router. The ipv6 and ipv4 keywords were added on the Cisco CRS-1.
|
Release 3.3.0
|
The ipv6 and ipv4 keywords were added on the Cisco XR 12000 Series Router.
The not keyword was added on the Cisco CRS-1 only.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match dscp command specifies a DSCP value that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.
To use the match dscp command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match dscp command in a class map, only the last command entered applies.
The match dscp command examines the higher-order six bits in the type of service (ToS) byte of the IP header. Up to eight IP DSCP values can be matched in one match statement. For example, match dscp ipv4 3 10 15 40 48 55 60 63 returns matches for IP DSCP values 3 10 15 40 48 55 60, and 63. Only one of the eight values is needed to yield a match (OR operation).
The IP DSCP value is used as a matching criterion only. The value has no mathematical significance. For instance, the IP DSCP value 2 is not greater than 1. The value simply indicates that a packet marked with the discard class of 2 should be treated differently than a packet marked with a discard class value of 1. The treatment of these marked packets is defined by the user through the setting of QoS policies in policy map class configuration mode.
The reserved keywords listed in Table 2 can be specified instead of numeric values.
Table 2 IP DSCP Reserved Keywords
DSCP Value
|
Reserved Keyword
|
0
|
default
|
10
|
AF11
|
12
|
AF12
|
14
|
AF13
|
18
|
AF21
|
20
|
AF22
|
22
|
AF23
|
26
|
AF31
|
28
|
AF32
|
30
|
AF33
|
34
|
AF41
|
36
|
AF42
|
38
|
AF43
|
46
|
EF
|
8
|
CS1
|
16
|
CS2
|
24
|
CS3
|
32
|
CS4
|
40
|
CS5
|
48
|
CS6
|
56
|
CS7
|
ipv4
|
ipv4 dscp
|
ipv6
|
ipv6 dscp
|
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface. In this example, class map dscp14 evaluates all packets entering Packet-over-SONET/SDH (POS) interface 0/1/0/0 for an IP DSCP value of 14. If the incoming packet has been marked with the IP DSCP value of 14, the packet is queued to the class queue with the bandwidth setting of 300 kbps.
RP/0/RP0/CPU0:router(config)# class-map dscp14
RP/0/RP0/CPU0:router(config-cmap)# match dscp ipv4 14
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class dscp14
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/1/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy input policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
set dscp
|
Marks the IP DSCP value for packets within a traffic class.
|
match frame-relay dlci
To specify a Frame Relay packet data-link connection identifier (DLCI) number or number range as a match criterion in a class map, use the match frame-relay dlci command in class map configuration mode. To remove a previously specified DLCI number as a match criterion, use the no form of this command.
match frame-relay dlci [Dlci | StartDlci-EndDlci]
no match frame-relay dlci [Dlci | StartDlci-EndDlci]
Syntax Description
Dlci
|
A DLCI number associated with the packet. Range is from 16 to 1007.
|
StartDlci-EndDlci
|
A DLCI number range from 16 to 1007. Numbers are separated by a hyphen.
|
Defaults
No DLCI number is specified.
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 3.4.0
|
This command was introduced on the Cisco XR 12000 Series Router.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match criterion for the match frame-relay dlci command can be used only on hierarchical policy maps.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to create the fr-dlci class map, and specify the Frame Relay DLCI number range 100-200 as a match criterion. Packets with DLCIs matching this criterion are placed in fr-dlci. In this example, class map fr-dlci evaluates all packets entering Packet-over-SONET/SDH (POS) interface 0/1/0/0.1 for DLCIs in the range from 100 through 200. If the incoming packet has been marked with the DLCI in the range from 100 through 200, the packet is queued to the class queue with the bandwidth setting of 300 kbps.
RP/0/0/CPU0:router(config)# class-map fr-dlci
RP/0/0/CPU0:router(config-cmap)# match frame relay dlci 100-200
RP/0/0/CPU0:router(config-cmap)# end
RP/0/0/CPU0:router(config)# policy-map policy1
RP/0/0/CPU0:router(config-pmap)# class fr-dlci
RP/0/0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/0/CPU0:router(config-pmap-c)# exit
RP/0/0/CPU0:router(config-pmap)# exit
RP/0/0/CPU0:router(config)# interface pos 0/1/0/0.1
RP/0/0/CPU0:router(config-if)# service-policy input policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
match dscp
|
Identifies discard class values as match criteria for a class map.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
show frame-relay pvc
|
Displays statistics about Frame Relay permanent virtual circuits (PVCs).
|
match mpls experimental topmost
To identify specific three-bit experimental (EXP) field values in the topmost Multiprotocol Label Switching (MPLS) label as match criteria for a class map, use the match mpls experimental topmost command in class map configuration mode. To remove experimental field values from the class map match criteria, use the no form of the command.
match [not] mpls experimental topmost exp-value [exp-value1 ... exp-value7]
no match [not] mpls experimental topmost exp-value [exp-value1 ... exp-value7]
Syntax Description
not
|
(Optional) Negates the specified match result.
|
exp-value
|
Experimental value that specifies the exact value from 0 to 7. Up to eight experimental values can be specified to match MPLS headers.
|
Defaults
No default behavior or values
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
The not keyword was added on the Cisco CRS-1 only.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match mpls experimental topmost command is used by the class map to identify MPLS experimental values matching on a packet.
To use the match mpls experimental topmost command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match mpls experimental topmost command in a class map, only the last command entered applies.
This command examines the three experimental bits contained in the topmost label of an MPLS packet. Up to four experimental values can be matched in one match statement. For example, match mpls experimental topmost 2 4 5 7 returns matches for experimental values of 2, 4, 5, and 7. Only one of the four values is needed to yield a match (OR operation).
The experimental values are used as a matching criterion only. The value has no mathematical significance. For instance, the experimental value 2 is not greater than 1. The value indicates that a packet marked with the experimental value of 2 should be treated differently than a packet marked with the EXP value of 1. The treatment of these different packets is defined by the user through the setting of QoS policies in policy map class configuration mode.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface. In this example, class map mplsmap1 evaluates all packets entering Packet-over-SONET/SDH (POS) interface 0/5/0/0 for an MPLS experimental value of 1. If the incoming packet has been marked with the MPLS experimental value of 1, the packet is queued to the class queue with the bandwidth setting of 300 kbps.
RP/0/RP0/CPU0:router(config)# class-map mplsmap1
RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 1
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class mplsmap1
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/5/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy input policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
match dscp
|
Identifies discard class values as match criteria for a class map.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
show policy-map interface
|
Displays statistics and configurations of all input and output service policies that are attached to an interface.
|
set mpls experimental
|
Sets the specified experimental bits in the MPLS packet label.
|
match packet length
To identify the Layer 3 packet length in the IP header as a match criterion in a class map, use the match packet length command in class map configuration mode. To remove a previously specified Layer 3 packet length as a match criterion, use the no form of this command.
match packet length minimum min-length maximum max-length
no match packet length minimum min-length max-length
Syntax Description
minimum min-length
|
Specifies the minimum length of the Layer 3 packet, in bytes. Values can range from 0 to 4294967295.
|
maximum max-length
|
Specifies the maximum length of the Layer 3 packet, in bytes. Values can range from 0 to 4294967295.
|
Defaults
This command has no default behavior or values.
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 3.4.0
|
This command was introduced on the Cisco XR 12000 Series Router.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match packet length command specifies a Layer 3 length that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.
To use the match packet length command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match cos command in a class map, only the last command entered applies.
This command considers only the Layer 3 packet length in the IP header. It does not consider the Layer 2 packet length in the IP header.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
In the following example a class map called class 1 has been created, and the Layer 3 packet length has been specified as a match criterion. In this example, packets with a minimum Layer 3 packet length of 100 and a maximum Layer 3 packet length of 300 are viewed as meeting the match criteria.
RP/0/RP0/CPU0:router(config)# class map match-any class1
RP/0/RP0/CPU0:router(config-cmap)# match packet length minimum 100 maximum 300
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
match precedence
To identify IP precedence values as match criteria, use the match precedence command in class map configuration mode. To remove precedence values from a class map, use the no form of this command.
match [not] precedence [ipv4 | ipv6] precedence-value [precedence-value1 ... precedence-value7]
no match [not] precedence [ipv4 | ipv6] precedence-value [precedence-value1 ...
precedence-value7]
Syntax Description
not
|
(Optional) Negates the specified match result.
|
ipv4
|
(Optional) Specifies the IPv4 precedence value.
|
ipv6
|
(Optional) Specifies the IPv6 precedence value.
|
precedence-value
|
An IP precedence value identifier that specifies the exact value. Range is from 0 to 7. Reserved keywords can be specified instead of numeric values. Table 3 describes the reserved keywords.
Up to eight precedence values can be matched in one match statement.
|
Defaults
Matching on both IP Version 4 (IPv4) and IPv6 packets is the default.
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
The ipv6 and ipv4 keywords were added.
|
Release 3.3.0
|
This command was supported on the Cisco XR 12000 Series Router.
The not keyword was added on the Cisco CRS-1 only.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match precedence command specifies a precedence value that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.
To use the match precedence command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match precedence command in a class map, only the last command entered applies.
The match precedence command examines the higher-order three bits in the type of service (ToS) byte of the IP header. Up to eight precedence values can be matched in one match statement. For example, match precedence ipv4 0 1 2 3 4 5 6 7 returns matches for IP precedence values of 0, 1, 2, 3, 4, 5, 6, and 7. Only one of the eight values is needed to yield a match (OR operation).
The precedence values are used as a matching criterion only. The value has no mathematical significance. For instance, the precedence value 2 is not greater than 1. The value simply indicates that a packet marked with the precedence value of 2 is different than a packet marked with the precedence value of 1. The treatment of these different packets is defined by the user through the setting of QoS policies in policy map class configuration mode.
Table 3 lists the IP precedence value number and associated name in descending order of importance.
Table 3 IP Precedence Values and Names
Value
|
Name
|
0
|
routine
|
1
|
priority
|
2
|
immediate
|
3
|
flash
|
4
|
flash-override
|
5
|
critical
|
6
|
internet
|
7
|
network
|
ipv4
|
ipv4 precedence
|
ipv6
|
ipv6 precedence
|
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface. In this example, class map ipprec5 evaluates all packets entering Packet-over-SONET/SDH (POS) interface 0/1/0/0 for a precedence value of 5. If the incoming packet has been marked with the precedence value of 5, the packet is queued to the class queue with the bandwidth setting 300 kbps.
RP/0/RP0/CPU0:router(config)# class-map ipprec5
RP/0/RP0/CPU0:router(config-cmap)# match precedence ipv4 5
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class ipprec5
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/1/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy input policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
show policy-map interface
|
Displays statistics and configurations of all input and output service policies that are attached to an interface.
|
set precedence
|
Sets the specified precedence value for packets within a traffic class.
|
match protocol
To identify a specific protocol as the match criterion for a class map, use the match protocol command in class map configuration mode. To remove protocol-based match criteria from a class map, use the no form of this command.
match [not] protocol {number | name}
no match [not] protocol {number | name}
Syntax Description
not
|
(Optional) Negates the specified match result.
|
number
|
Protocol number. Range is from 1 to 255.
|
name
|
Protocol name. Available protocol names are listed in Table 4.
|
Defaults
No default behavior or values
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
No modification.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router.
The not keyword was added on the Cisco CRS-1 only.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Definitions of traffic classes are based on match criteria, including protocols, access control lists (ACLs), input interfaces, QoS labels, and experimental (EXP) field values. Packets satisfying the match criteria for a class constitute the traffic for that class.
The match protocol command specifies the name of a protocol to be used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map. Available protocol names are listed in Table 4.
After you identify the class, you may use the match protocol command to configure its match criteria. If you specify more than one match protocol command in a class map, only the last command entered applies.
Table 4 Protocol Names and Descriptions
Name
|
Description
|
ahp
|
Authentication Header Protocol
|
eigrp
|
Cisco Enhanced Interior Gateway Routing Protocol
|
esp
|
Encapsulation Security Payload
|
gre
|
Cisco Generic Routing Encapsulation Tunneling
|
icmp
|
Internet Control Message Protocol
|
igmp
|
Internet Gateway Message Protocol
|
igrp
|
Cisco IGRP Routing protocol
|
ipinip
|
IP in IP tunneling
|
ipv4
|
Any IPv4 protocol
|
ipv6
|
Any IPv6 protocol
|
mpls
|
Any MPLS packet
|
nos
|
KA9Q NOS Compatible IP over IP Tunneling
|
ospf
|
Open Shortest Path First, Routing Protocol
|
pcp
|
Payload Compression Protocol
|
pim
|
Protocol Independent Multicast
|
sctp
|
Stream Control Transmission Protocol
|
tcp
|
Transport Control Protocol
|
udp
|
User Datagram Protocol
|
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
In the following example, all TCP packets belong to class class1:
RP/0/RP0/CPU0:router(config)# class class1
RP/0/RP0/CPU0:router(config-cmap)# match protocol tcp
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
match access-group
|
Identifies a specific ACL number as the match criteria for a class map.
|
match mpls experimental topmost
|
Identifies specific three-bit experimental (EXP) field values in the topmost Multiprotocol Label Switching (MPLS) label as match criteria for a class map.
|
match qos-group
|
Identifies specific quality of service (QoS) group values as match criteria in a class map.
|
match qos-group
To identify specific quality-of-service (QoS) group values as match criteria in a class map, use the match qos-group command in class map configuration mode. To remove a specific QoS group value from the matching criteria for a class map, use the no form of this command.
match [not] qos-group {qos-group-value1 ... qos-group-value7}
no match [not] qos-group
Syntax Description
not
|
(Optional) Negates the specified match result.
|
qos-group-value
|
A QoS group value identifier that specifies the exact value from 0 to 31. Up to eight values can be entered in one match statement.
|
Defaults
No match criteria are specified.
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
No modification.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router.
The not keyword was added on the Cisco CRS-1 only.
|
Release 3.4.0
|
The qos-group-value argument was deleted from the no match command.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match qos-group command sets the match criteria for examining QoS groups marked on the packet. Up to eight QoS group values can be matched in one match statement. For example, match qos-group 4 9 11 15 16 21 30 31 returns matches for QoS group values of 4 9 11 15 16 21 30, and 31. Only one of the eight values is needed to yield a match (OR operation).
To use the match qos-group command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match qos-group command in a class map, only the last command entered applies.
The QoS group value is used as a matching criterion only. The value has no mathematical significance. For instance, the QoS group value 2 is not greater than 1. The value simply indicates that a packet marked with the QoS group of 2 should be treated differently than a packet marked with a QoS group value of 1. The treatment of these different packets is defined using the service-policy command in policy map class configuration mode.
The QoS group setting is limited in scope to the local router. Typically the QoS group is set on the local router and is used in conjunction with WRED or MDRR to give differing levels of service based on the group identifier.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows a service policy called policy1 attached to an interface. In this example, class map qosgroup5 will evaluate all packets leaving Packet-over-SONET/SDH (POS) interface 1/0/0/1 for a QoS group value of 5. If the packet has been marked with the QoS group value of 5, the packet is queued to the class queue with the bandwidth setting 300 kbps.
RP/0/RP0/CPU0:router(config)# class-map qosgroup5
RP/0/RP0/CPU0:router(config-cmap)# match qos-group 5
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class qosgroup5
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/1/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy output policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
set discard-class
|
Sets the discard class identifiers on an IPv4 or MPLS packet.
|
set qos-group
|
Sets the QoS group value for packets.
|
match source-address
To identify a specific source MAC address as match criterion in a class map, use the match source-address command in class map configuration mode. To remove a specific source MAC address from the matching criteria for a class map, use the no form of this command.
match [not] source-address mac address
no match source-address mac address
Syntax Description
not
|
(Optional) Negates the specified match result.
Note The not keyword is available on the Cisco CRS-1 only.
|
address
|
MAC address.
|
Defaults
No default behavior or values
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 3.4.0
|
This command was introduced on the Cisco CRS-1 and the Cisco XR 12000 Series Router.
The not keyword was added on the Cisco CRS-1 only.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match source-address command specifies a source address that is used as the match criterion against which packets are checked to determine if they belong to the class specified by the class map.
To use the match source-address command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match source-address command in a class map, only the last command entered applies.
This command is supported on an input service policy only.
The match source-address command is allowed on a policy map that is attached to an Ethernet interface. The command is invalid on a policy that is attached to a Packet-over-SONET/SDH (POS) interface or a routed VLAN subinterface.
The match 48-bit MAC address is specified in xxxx.xxxx.xxxx format on L2VPN PE interfaces.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to match a source MAC address to a destination MAC address:
RP/0/RP0/CPU0:router(config)# class-map match-any A
RP/0/RP0/CPU0:router(config-cmap)# match source-address mac 0800.a0d0.4067
RP/0/RP0/CPU0:router(config-cmap)# match destination-address mac 000.f0d0.2356
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
match vlan
To identify selected VLAN IDs as the match criteria for a class map, use the match vlan command in class map configuration mode. To remove vlan ID match criteria from a class map, use the no form of this command.
match [not] vlan {vlanid | beginvlan-endvlan} [{vlanid | beginvlan-endvlan} ...
{vlanid | beginvlan-endvlan}]
no match [not] vlan [vlanid | beginvlan-endvlan] [{vlanid | beginvlan-endvlan} ...
{vlanid | beginvlan-endvlan}]
Syntax Description
not
|
(Optional) Negates the specified match result.
Note The not keyword was added on the Cisco CRS-1 only.
|
vlanid
|
VLAN identifier that specifies the exact value from 1 to 4094.
|
beginvlan-endvlan
|
Range of VLAN identifiers with values from 1 to 4094.
|
Defaults
No match criteria are specified.
Command Modes
Class map configuration
Command History
Release
|
Modification
|
Release 3.3.0
|
This command was introduced on the Cisco CRS-1 and the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
Changed the range value from 0 to 8096. to 1 to 4094.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The match vlan command specifies a VLAN ID that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.
To use the match vlan command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match vlan command in a class map, only the last command entered applies.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface. In this example, class map vlan1 evaluates all packets entering Gigabit Ethernet interface 0/1/0/0 for VLAN IDs of 1234, 1698, and all the VLAN IDs in the range 3000 to 4000. If the incoming packet has been marked with any of these VLAN IDs, the packet is queued to the class queue with the bandwidth setting of 300 kbps.
RP/0/RP0/CPU0:router(config)# class-map vlan1
RP/0/RP0/CPU0:router(config-cmap)# match vlan 1234 1698 3000-4000
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class vlan1
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface gigabitethernet 0/1/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy input policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class
|
police rate
To configure traffic policing and enter policy map police configuration mode, use the police rate command in policy map class configuration mode. To remove traffic policing from the configuration, use the no form of this command.
police rate {value [units] | percent percentage} [burst burst-size [burst-units]] [peak-burst
peak-burst [burst-units]] [peak-rate value [units] | percent percentage]
no police [rate {value [units] | percent percentage}] [burst burst-size [burst-units]] [peak-burst
peak-burst [burst-units]] [peak-rate value [units] | percentage]
Syntax Description
value
|
Specifies the Committed Information Rate (CIR). Range is from 1 to 4294967295.
|
units
|
Specifies the units for the CIR. Values can be:
• bps—bits per second (default)
• gbps—gigabits per second
• kbps—kilobits per second
• mbps—megabits per second
|
percent percentage
|
Specifies the rate as a percentage. Range is from 1 to 100.
|
burst burst-size
|
(Optional) Specifies the conform burst size (in the specified burst-units). Range is from 1 to 4294967295.
|
burst-units
|
(Optional) Specifies the units for the burst values. Values can be:
• bytes—bytes (default)
• gbytes—gigabytes
• kbytes—kilobytes
• mbytes—megabytes
• ms—milliseconds
• packets—packets
• us—microseconds
|
peak-burst peak-burst
|
(Optional) Specifies the peak burst size (in the specified burst-units). Range is from 1 to 4294967295.
|
peak-rate value | percentage percentage
|
(Optional) Specifies the Peak Information Rate (PIR) in the specified units. Range is from 1 to 4294967295.
Percentage specifies the rate as a percentage. Range is from 1 to 100.
|
Defaults
No restrictions on the flow of data are applied to any interface.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router without the pir and violate-action keywords.
|
Release 3.3.0
|
The command name was changed from police to police rate.
The keywords bc, be, cir, and pir were changed to burst, burst-rate, percent, and peak-rate, respectively.
The units argument was added.
The default units for the rate, peak rate, and burst rate changed from kbps to bps.
The keywords mpls experimental imposition were added to the action argument.
|
Release 3.4.0
|
This command now enters policy-map police configuration mode.
The conform-action, exceed-action and violate-action keywords changed into commands within the policy-map police configuration mode.
The cos and transmit keywords were added to the action argument. The atm-clp keyword was added on the Cisco XR 12000 Series Router.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The atm-clp keyword is available on the Cisco XR 12000 Series Router only.
The traffic policing feature works with a single-token bucket algorithm on the Cisco XR 12000 Series Router, and a two-token bucket algorithm on the Cisco CRS-1.
The police command can set the DSCP, the precedence, qos-group, or the discard class for IP packets, and experimental and discard-class values for MPLS packets.
For bundled interfaces, traffic policing can be configured only as a percentage.
On the Cisco CRS-1 router, if no violate-action is specified, a default action of drop is applied, thereby activating two token buckets.
Policing can be applied in both ingress and egress directions.
The parameters set by the action keywords are rounded by the hardware. To check the actual values programmed in the hardware use the show qos interface command.
Hierarchical policing is also supported. In such a configuration, both parent and child policies have class-maps containing policing statements, as in the following example:
police rate percent 50 conform-action set precedence immediate exceed-action drop
police rate 10000 kbps burst 15000 exceed-action drop
Note that configured values take into account the Layer 2 encapsulation applied to traffic. This applies to both ingress and egress policing. For POS/SDH transmission, the encapsulation is considered to be 4 bytes. For Ethernet, the encapsulation is 14 bytes; whereas for 802.1Q, the encapsulation is 18 bytes.
The policer uses an incremental step size of 256 kbps. The configured value is rounded down to the nearest 256 kbps. The value shown in the output of the running-configuration shows the configured value as entered by the user.
If the burst value is not specifically configured, it is automatically set to equate to 250 msec-worth of the CIR value. For example, if a CIR value of 1000000 kbps is entered, the burst value is calculated to be 32000000 bytes. Note, however, that the maximum burst value supported is 2,097,120 bytes.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
In the following example for MPLS, traffic policing is configured with the average rate at 250 kbps, and the normal burst size at 250 kilobits for all packets leaving Packet-over-SONET/SDH (POS) interface 0/5/0/0:
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 0
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# police rate 250 kbps burst 50 conform-action set mpls
experimental topmost 4
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/5/0/0
RP/0/RP0/CPU0:router(config-if) service-policy input policy1
Related Commands
Command
|
Description
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
show policy-map interface
|
Displays statistics and configurations of all input and output service policies that are attached to an interface.
|
policy-map
To create or modify a policy map that can be attached to one or more interfaces to specify a service policy, use the policy-map command in global configuration mode. To delete a policy map, use the no form of this command.
policy-map policy-name
no policy-map policy-name
Syntax Description
policy-name
|
Name of the policy map.
|
Defaults
A policy map does not exist until one is configured. Because a policy map is applied to an interface, no restrictions on the flow of data are applied to any interface until a policy map is created.
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
Maximum number of classes permitted per policy map was increased to 32.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the policy-map command to specify the name of the policy map to be created, added to, or modified before you can configure policies for classes whose match criteria are defined in a class map. Entering the policy-map command enables policy map configuration mode in which you can configure or modify the class policies for that policy map.
You can configure class policies in a policy map only if the classes have match criteria defined for them. Use the class-map and match commands to configure the match criteria for a class. Because you can configure a maximum of 32 classes in one policy map, no policy map can contain more than 32 class policies. The maximum number of 32 classes per policy includes the implicit default class and its child policies.
A single policy map can be attached to multiple interfaces concurrently. The maximum number of policy maps supported is 1000.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following examples show how to create a policy map called policy1 and configures two class policies included in that policy map. The policy map is defined to contain policy specification for class1 and the default class (called class-default) to which packets that do not satisfy configured match criteria are directed. Class1 specifies policy for traffic that matches access control list 136.
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match access-group 136
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# police cir 250
RP/0/RP0/CPU0:router(config-pmap-c)# set precedence 3
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# class class-default
RP/0/RP0/CPU0:router(config-pmap-c)# queue-limit bytes 1000000
Related Commands
Command
|
Description
|
class (policy-map)
|
Specifies the name of the class whose policy you want to create or change and the default class called class-default before you configure its policy.
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
priority (QoS)
To assign a priority to a class of traffic belonging to a policy map, use the priority command in policy map class configuration mode. To remove a previously specified priority for a class, use the no form of this command.
priority
no priority
Syntax Description
This command has no keywords or arguments.
Defaults
No default behavior or values
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The priority command configures low latency queueing (LLQ), providing strict priority queueing (PQ). Strict PQ allows delay-sensitive data such as voice to be dequeued and sent before packets in other queues are dequeued. When a class is marked as high priority using the priority command, we recommend that you configure a policer to limit the priority traffic. This policer ensures that the priority traffic does not starve all other traffic on the line card, which protects low-priority traffic from starvation. Use the police command to explicitly configure the policer.
The priority command sets up classes based on a variety of criteria (not just User Datagram Protocol [UDP] ports) and assigns a priority to them.
The bandwidth and priority commands cannot be used in the same class, within the same policy map. These commands can be used together in the same policy map, however.
Within a policy map, you can give one or more classes priority status. When multiple classes within a single policy map are configured as priority classes, all traffic from these classes is queued to the same, single, priority queue.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to configure priority queuing for the policy map named policy1:
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# priority
Related Commands
Command
|
Description
|
bandwidth (QoS)
|
Specifies or modifies the minimum bandwidth allocated for a class belonging to a policy map.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
show policy-map interface
|
Displays the configuration of all classes configured for all service policies on the specified interface.
|
queue-limit
To specify or modify the maximum number of packets the queue can hold for a class policy configured in a policy map, use the queue-limit bytes command in policy map class configuration mode. To remove the queue packet limit from a class, use the no form of this command.
queue-limit value [units]
no queue-limit value [units]
Syntax Description
value
|
Maximum threshold for tail drop in bytes. Range is from 1 to 1000000000.
|
units
|
(Optional) Specifies the units for the queue limit value. Values can be:
• bytes—bytes
• ms—milliseconds
• packets—packets (default)
• us—microseconds
Note When the specified units is packets, packets are assumed to be 256 bytes in size.
|
Defaults
200 milliseconds: maximum threshold for tail drop
10 ms: maximum threshold for high-priority queues
Maximum threshold units are in packets
Note
The default queue limit is set to bytes of 200 ms of queue bandwidth. The following formula is used to calculate the default queue limit in bytes: bytes = (200 ms * queue bandwidth kbps) / 8.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
Command name changed from queue-limit bytes to queue-limit.
Command order modified to place value before units.
The units argument was added.
Default units was changed from bytes to packets.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Packets satisfying the match criteria for a class accumulate in the queue reserved for the class until they are serviced by the scheduling mechanism. The queue-limit command defines the maximum threshold for a class. When that threshold is reached, enqueued packets to the class queue result in tail drop (packet drop). Tail drop is a congestion avoidance technique that drops packets when an output queue is full, until congestion is eliminated.
Use the show qos interface command to display the queue limit and other policer values.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to set the queue limit for a class to 1000000 packets for policy map policy1:
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:routers(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# queue-limit 1000000
Related Commands
Command
|
Description
|
class (policy-map)
|
Specifies the name of the class whose policy you want to create or change.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
show qos interface
|
Displays the queue limit and various policer values.
|
random-detect
To enable Random Early Detection (RED), use the random-detect command in policy map class configuration mode. To return the thresholds to the default, use the no form of this command.
random-detect {default | min-threshold [units] max-threshold [units]}
no random-detect {default | min-threshold [units] max-threshold [units]}
Syntax Description
default
|
Enables RED with default minimum and maximum thresholds.
|
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 the units specified. The value range of this argument is from the value of the min-threshold argument or 23, whichever is larger, to 1073741823. When the average queue length exceeds the maximum threshold, WRED drops all packets with the specified discard class value.
|
units
|
(Optional) Specifies the units for the threshold values. Values can be:
• bytes—bytes
• gbytes—gigabytes
• kbytes—kilobytes
• mbytes—megabytes
• ms—milliseconds
• packets—packets (default)
• us—microseconds
|
Defaults
Default unit for max-threshold and min-threshold is packets.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
Range of values for the thresholds changed from 512 to 1073741823 to 0 to 1073741823.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router.
The units argument was added to allow specifying the units of the thresholds.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The RED congestion avoidance technique takes advantage of the congestion control mechanism of TCP. By randomly dropping packets before periods of high congestion, RED tells the packet source to decrease its transmission rate. Assuming the packet source is using TCP, it decreases its transmission rate until all the packets reach their destination, indicating that the congestion is cleared. You can use RED as a way to cause TCP to slow transmission of packets. TCP not only pauses, but it also restarts quickly and adapts its transmission rate to the rate that the network can support.
RED distributes losses in time and maintains normally low queue depth while absorbing traffic bursts. When enabled on an interface, RED begins dropping packets when congestion occurs at a rate you select during configuration.
The default values for RED are calculated as follows:
default min_threshold = 0.03 * B
default max_threshold = 0.1 * B
where B is the bandwidth for the queue. The bandwidth for the queue is equal to the shaping rate, if one is defined. Otherwise, the bandwidth is equal to the interface rate.
The mark probability is always set to 1.
When the units are packets, packets are assumed to be 256 bytes in size.
Note
RED is enabled when you configure any of the supported random-detect commands.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to enable RED using a minimum threshold value of 1000000 and a maximum threshold value of 2000000:
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# random-detect 1000000 2000000
Related Commands
Command
|
Description
|
show policy-map interface
|
Displays the configuration of all classes configured for all service policies on the specified interface.
|
random-detect precedence
|
Configures WRED parameters for a particular IP precedence for a class policy in a policy map.
|
random-detect cos
To configure Weighted Random Early Detection (WRED) thresholds for packets with a specific class of service (CoS) value, use the random-detect cos command in policy map class configuration mode. To return the thresholds to the default for the CoS, use the no form of this command.
random-detect cos cos-value min-threshold [units] max-threshold [units]
no random-detect cos
Syntax Description
cos-value
|
CoS value. Valid values are from 0 to 7.
|
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.
|
units
|
(Optional) Specifies the units for the threshold values. Values can be:
• bytes—bytes
• gbytes—gigabytes
• kbytes—kilobytes
• mbytes—megabytes
• ms—milliseconds
• packets—packets (default)
• us—microseconds
|
Defaults
Default unit for max-threshold and min-threshold is packets.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 3.4.0
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The random-detect cos command is allowed in a service policy attached to Layer 2 VPN access list or physical Ethernet interface only. (The command in invalid in a policy attached to Layer 3 interface.)
When the units are packets, packets are assumed to be 256 bytes in size.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
.
Examples
The following example shows how to configure CoS:
RP/0/RP0/CPU0:router(config)# policy-map map1
RP/0/RP0/CPU0:router(config-pmap)# class c
RP/0/RP0/CPU0:router(config-pmap-c)# random-detect cos 3 1000 bytes 2000 bytes
Related Commands
Command
|
Description
|
class (policy-map)
|
Specifies the name of the class whose policy you want to create or change.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
show qos interface
|
Displays the queue limit and various policer values.
|
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
Syntax Description
discard-value
|
Discard class value. Valid values are from 0 to 7.
|
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) Specifies the units for the threshold values. Values can be:
• bytes—bytes
• gbytes—gigabytes
• kbytes—kilobytes
• mbytes—megabytes
• ms—milliseconds
• packets—packets (default)
• us—microseconds
|
Defaults
Default unit for max-threshold and min-threshold is packets.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
Range of values for the thresholds changed from 512 to 1073741823 to 0 to 1073741823.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
The units argument was added to allow specifying the units of the thresholds.
The discard-value min-threshold max-threshold arguments were deleted form the no random-detect discard-class command.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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. Use the random-detect discard-class command to adjust the discard class for different discard class values.
When the units are packets, packets are assumed to be 256 bytes in size.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
.
Examples
The following 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/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# random-detect discard-class 3 1000000 2000000
Related Commands
Command
|
Description
|
class (policy-map)
|
Specifies the name of the class whose policy you want to create or change.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
random-detect precedence
|
Configures WRED parameters for a particular IP precedence for a class policy in a policy map.
|
show policy-map interface
|
Displays the configuration of all classes configured for all service policies on the specified interface.
|
random-detect dscp
To configure the Weighted Random Early Detection (WRED) thresholds for packets with a specific differentiated services code point (DSCP) value, use the random-detect dscp command in policy map class configuration mode. To return the thresholds to the default for the DSCP value, use the no form of this command.
random-detect dscp dscp-value min-threshold [units] max-threshold [units]
no random-detect dscp
Syntax Description
dscp-value
|
Number from 0 to 63 that sets the DSCP value. Reserved keywords can be specified instead of numeric values. Table 2 describes the reserved keywords.
|
min-threshold
|
Minimum threshold in number of packets. The value range of this argument is from 0 to 1073741823. 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 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 DSCP value.
|
units
|
(Optional) Specifies the units for the threshold values. Values can be:
• bytes—bytes
• gbytes—gigabytes
• kbytes—kilobytes
• mbytes—megabytes
• ms—milliseconds
• packets—packets (default)
• us—microseconds
|
Defaults
Match packets with default dscp (000000).
Default unit for max-threshold and min-threshold is packets.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
Range of values for the thresholds changed from 512 to 1073741823 to 0 to 1073741823.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
The units argument was added to allow specifying the units of the thresholds.
The dscp-value min-threshold max-threshold arguments were deleted form the no random-detect discard-class dscp command.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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.
For the random-detect dscp command to take effect on the Cisco XR 12000 Series Router, you must configure both the shape average and bandwidth commands in the policy map class.
Reserved keywords can be specified instead of numeric values. See Table 2 for the list of keywords.
When the units are packets, packets are assumed to be 256 bytes in size.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows that for packets with DSCP AF11, the WRED minimum threshold is 1,000,000 bytes and the maximum threshold is 2,000,000 bytes:
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# random-detect dscp AF11 1000000 2000000
Related Commands
Command
|
Description
|
class (policy-map)
|
Specifies the name of the class whose policy you want to create or change.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
random-detect precedence
|
Configures WRED parameters for a particular IP precedence for a class policy in a policy map.
|
show policy-map interface
|
Displays the configuration of all classes configured for all service policies on the specified interface.
|
random-detect exp
To configure the Weighted Random Early Detection (WRED) thresholds for packets marked with a specific MPLS experimental (EXP) bit value, use the random-detect exp command in policy map class configuration mode. To return the value to the default, use the no form of this command.
random-detect exp exp-value min-threshold [units] max-threshold [units]
no random-detect exp
Syntax Description
exp-value
|
MPLS experimental value. Valid values are from 0 to 7.
|
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 units specified. 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 DSCP value.
|
units
|
Specifies the units for the threshold values. Values can be:
• bytes—bytes
• gbytes—gigabytes
• kbytes—kilobytes
• mbytes—megabytes
• ms—milliseconds
• packets—packets (default)
• us—microseconds
|
Defaults
Default unit for max-threshold and min-threshold is packets.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
Range of values for the thresholds was changed from 512 to 1073741823 to 0 to 1073741823.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router.
The units argument was added to allow specifying the units of the thresholds.
|
Release 3.4.0
|
The exp-value min-threshold max-threshold arguments were deleted form the no random-detect discard-class exp command.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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 the units are packets, packets are assumed to be 256 bytes in size.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows that for Multiprotocol Label Switching (MPLS) packets with an EXP field value of 4, the WRED minimum threshold is 1,000,000 bytes and the maximum threshold is 2,000,000 bytes:
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# random-detect exp 4 1000000 20000
Related Commands
Command
|
Description
|
class (policy-map)
|
Specifies the name of the class whose policy you want to create or change.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
random-detect dscp
|
Changes the minimum and maximum packet thresholds for the DSCP value.
|
random-detect precedence
|
Configures WRED parameters for a particular IP precedence for a class policy in a policy map.
|
show policy-map interface
|
Displays the configuration of all classes configured for all service policies on the specified interface.
|
random-detect precedence
To configure the Weighted Random Early Detection (WRED) thresholds for packets with a particular IP precedence, use the random-detect precedence command in policy map class configuration mode. To return the thresholds to the default for the precedence, use the no form of this command.
random-detect precedence precedence-value min-threshold [units] max-threshold [units]
no random-detect precedence
Syntax Description
precedence-value
|
An IP precedence value identifier that specifies the exact value. Range is from 0 to 7. Reserved keywords can be specified instead of numeric values. Table 3 describes the reserved keywords.
|
min-threshold
|
Minimum threshold in number of packets. Range is from 0 to 1073741823 in bytes.
|
max-threshold
|
Maximum threshold in the units specified. Range 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 DSCP value.
|
units
|
(Optional) Specifies the units for the threshold values. Values can be:
• bytes—bytes
• gbytes—gigabytes
• kbytes—kilobytes
• mbytes—megabytes
• ms—milliseconds
• packets—packets (default)
• us—microseconds
|
Defaults
Default unit for max-threshold and min-threshold is packets.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
Range of values for the thresholds changed from 512 to 1073741823 to 0 to 1073741823.
|
Release 3.3.0
|
The units argument was added to allow specifying the units of the thresholds.
|
Release 3.4.0
|
The precedence-value min-threshold max-threshold arguments were deleted form the no random-detect precedence command.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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 command on an interface, packets are given preferential treatment based on the IP precedence of the packet. Use the random-detect precedence command to adjust the treatment for different precedences.
When the units are packets, packets are assumed to be 256 bytes in size.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows that for packets with precedence 3, the WRED minimum threshold is 1,000,000 bytes and maximum threshold is 2,000,000 bytes:
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# random-detect precedence 3 1000000 2000000
Related Commands
Command
|
Description
|
bandwidth (QoS)
|
Specifies or modifies the bandwidth allocated for a class belonging to a policy map.
|
class (policy-map)
|
Specifies the name of the class whose policy you want to create or change.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
random-detect dscp
|
Changes the minimum and maximum packet thresholds for the DSCP value.
|
show policy-map interface
|
Displays the configuration of all classes configured for all service policies on the specified interface.
|
service-policy (interface)
To attach a policy map to an input interface or output interface to be used as the service policy for that interface, use the service-policy command in interface configuration mode. To remove a service policy from an input or output interface, use the no form of this command.
service-policy {input | output} policy-map
no service-policy {input | output}
Syntax Description
input
|
Attaches the specified policy map to the input interface.
|
output
|
Attaches the specified policy map to the output interface.
|
policy-map
|
Name of a service policy map (created using the policy-map command) to be attached.
|
Defaults
No service policy is specified.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
The pre-decrypt, post-decrypt, and pre-encrypt keywords were added for IPSec on the Cisco XR 12000 Series Router.
|
Release 3.5.0
|
The pre-decrypt, post-decrypt, and pre-encrypt keywords were removed on the Cisco XR 12000 Series Router.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
You can attach a single policy map to one or more interfaces to specify the service policy for those interfaces. The class policies composing the policy map are then applied to packets that satisfy the class map match criteria for the class.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows policy map policy1 applied to Packet-over-SONET/SDH (POS) interface 0/2/0/0:
RP/0/RP0/CPU0:router(config)# class class1
RP/0/RP0/CPU0:router(config-cmap)# match precedence ipv4 1
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# set precedence 2
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/2/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy output policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
service-policy (interface)
|
Attaches a policy map to an input interface or output interface to be used as the service policy for that interface.
|
service-policy (policy map class)
To use a service policy as a QoS policy within a policy map (called a hierarchical service policy), use the service-policy command in policy map class configuration mode. To disable a particular service policy as a QoS policy within a policy map, use the no form of this command.
service-policy policy-map-name
no service-policy policy-map-name
Syntax Description
policy-map-name
|
Name of the predefined policy map to be used as a QoS policy. The name can be a maximum of 40 alphanumeric characters.
|
Defaults
No service policy is specified.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
No modification.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The service-policy (policy-map class) command creates hierarchical service policies in policy-map class configuration mode.
This command is different from the service-policy (interface) command used in interface configuration mode.
The child policy is the previously defined service policy that is being associated with the new service policy through the set discard-class command. The new service policy using the preexisting service policy is the parent policy.
The service-policy (policy-map class) command has the following restrictions:
•
The priority command can be used in either the parent or the child policy, but not both policies simultaneously.
•
If the bandwidth command is used in the child policy, the bandwidth command must also be used in the parent policy. The one exception is for policies using the default class.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to create a hierarchical service policy in the service policy called parent:
RP/0/RP0/CPU0:router(config)# policy-map child
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# priority
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map parent
RP/0/RP0/CPU0:router(config-pmap)# class class-default
RP/0/RP0/CPU0:router(config-pmap-c)# shape average 10000000
RP/0/RP0/CPU0:router(config-pmap-c)# service-policy child
Related Commands
Command
|
Description
|
bandwidth (QoS)
|
Specifies the bandwidth allocated for a class belonging to a policy map.
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
priority (QoS)
|
Gives priority to a class of traffic belonging to a policy map.
|
service-policy (interface)
|
Attaches a policy map to an input interface or output interface to be used as the service policy for that interface.
|
set discard-class
|
Sets the discard class and QoS group identifiers on IPv4 or MPLS packets.
|
set atm-clp
To set the cell loss priority (CLP) bit when a policy map is configured, use the set atm-clp command in policy map class configuration mode. To remove a specific CLP bit setting, use the no form of this command.
set atm-clp
no set atm-clp
Syntax Description
This command has no arguments or keywords.
Defaults
The CLP bit is automatically set to 0 when Cisco routers convert IP packets into ATM cells for transmission through Multiprotocol Label Switching (MPLS)-aware ATM networks.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 3.4.0
|
This command was introduced on the Cisco XR 12000 Series Router.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The set atm-clp command sets the CLP bit within the packet. After the CLP bit is set, other QoS services such as Modified Deficit Round Robin (MDRR) and Weighted Random Early Detection (WRED) can operate on the bit settings.
A policy map containing the set atm-clp command can be attached as an output policy only. The set atm-clp command does not support packets that originate from the router.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example illustrates setting the CLP bit using the set atm-clp command in the policy map:
RP/0/0/CPU0:router(config)# class-map c1
RP/0/0/CPU0:router(config-cmap)# match precedence ipv4 0 1
RP/0/0/CPU0:router(config-cmap)# exit
RP/0/0/CPU0:router(config)# policy-map atm-clp-set
RP/0/0/CPU0:router(config-pmap)# class c1
RP/0/0/CPU0:router(config-pmap-c)# set atm-clp
RP/0/0/CPU0:router(config-pmap-c)# exit
RP/0/0/CPU0:router(config-pmap)# exit
RP/0/0/CPU0:router(config)# interface atm 0/2/0/0.1
RP/0/0/CPU0:router(config-subif)# pvc 10/100
RP/0/0/CPU0:router(config-atm-vc)# service-policy output atm-clp-set
RP/0/0/CPU0:router(config-atm-vc)# end
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
service-policy (interface)
|
Attaches a policy map to an input interface or output interface to be used as the service policy for that interface.
|
set cos
To set the Layer 2 class of service (CoS) value of an outgoing packet, use the set cos command in policy map class configuration mode. To remove a specific CoS value setting, use the no form of this command.
set cos cos-value
no set cos cos-value
Syntax Description
cos-value
|
Specific IEEE 802.1Q CoS value from 0 to 7.
|
Defaults
No Layer 2 CoS value of an outgoing packet is set.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
No modification.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the set cos command to mark a packet that is being sent to a switch. Switches can leverage Layer 2 header information, including a CoS value marking.
The set cos command can be used only in service policies that are attached in the output direction of an interface. Packets entering an interface cannot be set with a CoS value.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
In the following example, the policy map called cos-set is created to assign different CoS values for different types of traffic, and then is attached to output Packet-over-SONET/SDH interface 0/2/0/0.
RP/0/RP0/CPU0:router(config)# policy-map cos-set
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# set cos 1
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# class class2
RP/0/RP0/CPU0:router(config-pmap-c)# set cos 2
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/2/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy output cos-set
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
service-policy (interface)
|
Attaches a policy map to an input interface or output interface to be used as the service policy for that interface.
|
set discard-class
To set the discard class and Quality of Service (QoS) group identifiers on IP Version 4 (IPv4) or Multiprotocol Label Switching (MPLS) packets, use the set discard-class command in policy map class configuration mode. To leave the discard-class values unchanged, use the no form of this command.
set discard-class discard-class-value [qos-group group-value]
no set discard-class discard-class-value [qos-group group-value]
Syntax Description
discard-class-value
|
Discard class ID. An integer from 0 to 7, to be marked on the packet.
|
qos-group group-value
|
QoS group ID. An integer from 0 to 31, to be marked on the packet.
|
Defaults
No group ID is specified.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
No modification.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router. The qos-group keyword was added.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The set discard-class command associates a discard class ID with a packet. After the discard class and QoS group IDs are set, other QoS services such as Modified Deficit Round Robin (MDRR) and Weighted Random Early Detection (WRED) can operate on the bit settings.
Discard-class indicates the discard portion of the per hop behavior (PHB). The set discard-class command is typically used in Pipe mode. Discard-class is required when the input PHB marking will be used to classify packets on the output interface.
The discard-class values can be used to specify the type of traffic that is dropped when there is congestion.
Note that marking of the discard class and the QoS group has only local significance on a node.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to set the discard class value to 5 for packets that match the MPLS experimental bits 1:
RP/0/RP0/CPU0:router(config)# class-map cust1
RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 1
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy2
RP/0/RP0/CPU0:router(config-pmap)# class cust1
RP/0/RP0/CPU0:router(config-pmap-c)# set discard-class 5
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/7/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy output custpol
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
service-policy (interface)
|
Attaches a policy map to an input interface or output interface to be used as the service policy for that interface.
|
set dscp
To mark a packet by setting the IP differentiated services code point (DSCP) in the type of service (ToS) byte, use the set dscp command in policy-map class configuration mode. To remove a previously set DSCP value, use the no form of this command.
set dscp [tunnel] dscp-value
no set dscp dscp-value
Syntax Description
tunnel
|
(Optional) Sets the DSCP on the outer IP header. This option is available for IPSec on the Cisco XR 12000 Series Router only.
|
dscp-value
|
Number from 0 to 63 that sets the DSCP value. Reserved keywords can be specified instead of numeric values. Table 2 describes the reserved keywords.
|
Defaults
Match packets with default dscp (000000).
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
After the DSCP bit is set, other quality-of-service (QoS) services can then operate on the bit settings.
The network gives priority (or some type of expedited handling) to marked traffic. Typically, you set precedence at the edge of the network (or administrative domain); data then is queued based on the precedence. Modified Deficit Round Robin (MDRR) can speed up handling for high-precedence traffic at congestion points. Weighted Random Early Detection (WRED) ensures that high-precedence traffic has lower loss rates than other traffic during times of congestion.
Reserved keywords can be specified instead of numeric values. Table 2 describes the reserved keywords.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
In the following example, the DSCP ToS byte is set to 8 in the policy map called policy1. All packets that satisfy the match criteria of class1 are marked with the DSCP value of 8. The network configuration determines how packets are marked.
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# set dscp 8
Related Commands
Command
|
Description
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
service-policy (interface)
|
Attaches a policy map to an input interface or output interface to be used as the service policy for that interface.
|
set precedence
|
Sets the precedence value in the IP header.
|
show policy-map interface
|
Displays statistics and configurations of all input and output service policies that are attached to an interface.
|
set mpls experimental
To set the experimental (EXP) value of the Multiprotocol Label Switching (MPLS) packet topmost or imposition labels, use the set mpls experimental command in policy map configuration mode. To leave the EXP value unchanged, use the no form of this command.
set mpls experimental {imposition | topmost} exp-value
no set mpls experimental {imposition | topmost} exp-value
Syntax Description
imposition
|
Specifies to set the EXP value of the imposition label.
|
topmost
|
Specifies to set the EXP value of the topmost label.
|
exp-value
|
Value of the MPLS packet label. Range is 0 to 7.
|
Defaults
No MPLS experimental value is set.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
Added the imposition keyword and changed overall command name from set mpls experimental topmost to set mpls experimental.
|
Release 3.4.0
|
Added the range for the exp-value argument.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
After the MPLS experimental bits are set, other QoS services such as modified deficit round robin (MDRR) and Weighted Random Early Detection (WRED) then operate on the bit settings.
The network gives priority (or some type of expedited handling) to the marked traffic through the application of MDRR or WRED at points downstream in the network. Typically, the MPLS experimental value is set at the edge of the network (or administrative domain) and queueing is acted on it thereafter. MDRR can speed up handling for high-priority traffic at congestion points. WRED ensures that high-priority traffic has lower loss rates than other traffic during times of congestion.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
.
Examples
The following example shows how to set the MPLS experimental to 5 for packets that match access list 101:
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match access-group acl101
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# set mpls experimental topmost 5
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/7/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy output policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
service-policy (interface)
|
Attaches a policy map to an input interface or output interface to be used as the service policy for that interface.
|
set precedence
To set the precedence value in the IP header, use the set precedence command in policy map class configuration mode. To leave the precedence value unchanged, use the no form of this command.
set precedence [tunnel] value
no set precedence [tunnel] value
Syntax Description
tunnel
|
(Optional) Sets the IP precedence on the outer IP header. This option is available for IPSec on the Cisco XR 12000 Series Router only.
|
value
|
Number or name that sets the precedence bits in the IP header. Range is from 0 to 7. Reserved keywords can be specified instead of numeric values. Table 3 describes the reserved keywords.
|
Defaults
Marking is not configured.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Precedence can be set using a number or corresponding name. After IP Precedence bits are set, other QoS services such as Modified Deficit Round Robin (MDRR) and Weighted Random Early Detection (WRED) then operate on the bit settings.
The network gives priority (or some type of expedited handling) to the marked traffic through the application of MDRR or WRED at points downstream in the network. IP precedence can be set at the edge of the network (or administrative domain) and have queueing act on it thereafter. MDRR can speed handling for high-precedence traffic at congestion points. WRED ensures that high-precedence traffic has lower loss rates than other traffic during times of congestion.
The mapping from keywords such as 0 (routine) and 1 (priority) to a precedence value is useful only in some instances. That is, the use of the precedence bit is evolving. You can define the meaning of a precedence value by enabling other features that use the value. In the case of high-end Internet QoS, IP precedences can be used to establish classes of service that do not necessarily correspond numerically to better or worse handling in the network.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example shows how to set the IP precedence to 5 (critical) for packets that match the access control list named customer1:
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match access-group customer1
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# set precedence 5
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/7/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy output policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
service-policy (interface)
|
Attaches a policy map to an input interface or output interface to be used as the service policy for that interface.
|
set qos-group
To set the quality of service (QoS) group identifiers on IP Version 4 (IPv4) or Multiprotocol Label Switching (MPLS) packets, use the set qos-group command in policy map class configuration mode. To leave the QoS group values unchanged, use the no form of this command.
set qos-group qos-group-value [discard-class discard-class-value]
no set qos-group qos-group-value [discard-class discard-class-value]
Syntax Description
qos-group-value
|
QoS group ID. An integer from 0 to 31, to be marked on the packet.
|
discard-class discard-class-value
|
(Optional) Discard class ID. An integer from 0 to 7, to be marked on the packet.
|
Defaults
No group ID is specified.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
No modification.
|
Release 3.3.0
|
This command was first supported on the Cisco XR 12000 Series Router. The discard-class keyword was added.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The set qos-group command associates a QoS group ID with a packet. After the QoS group ID is set, other QoS services, such as Modified Deficit Round Robin (MDRR) and Weighted Random Early Detection (WRED), can operate on the QoS group setting.
The QoS group setting is limited in scope to the local router. Typically the QoS group is set on the local router and used in conjunction with WRED or MDRR to give differing levels of service based on the group identifier.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example sets the QoS group to 5 for packets that match the MPLS experimental bits 1:
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 1
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# set qos-group 5
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/7/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy output policy1
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
match dscp
|
Matches the QoS group value marked on the packet.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
service-policy (interface)
|
Attaches a policy map to an input interface or output interface to be used as the service policy for that interface.
|
set srp-priority
To set the Spatial Reuse Protocol (SRP) priority value of an outgoing packet, use the set srp-priority command in policy map class configuration mode. To remove a specific SRP priority setting, use the no form of this command.
set srp-priority cos-value
no set srp-priority cos-value
Syntax Description
cos-value
|
Specific SRP CoS value from 0 to 7.
|
Defaults
No SRP CoS value of an outgoing packet is set.
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 3.2.2
|
This command was introduced on the Cisco CRS-1
|
Release 3.3.0
|
This command was not supported.
|
Release 3.4.0
|
This command was supported on the Cisco CRS-1.
|
Release 3.5.0
|
This command was supported on the Cisco XR 12000 Series Router.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The set srp-priority command can be used only in service policies that are attached in the output direction of an interface.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
.
Examples
In the following example, the policy map called srp-set is created to assign different SRP CoS values for different types of traffic, and then is attached to output SRP interface 0/2/0/0:
RP/0/RP0/CPU0:router(config)# policy-map srp-set
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# set srp-priority 5
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface srp 0/2/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy output srp-set
Related Commands
Command
|
Description
|
class-map
|
Defines a traffic class and the associated rules that match packets to the class.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
service-policy (interface)
|
Attaches a policy map to an input interface or output interface to be used as the service policy for that interface.
|
shape average
To shape traffic to the indicated bit rate according to the algorithm specified, use the shape average command in policy map class configuration mode. To remove traffic shaping, use the no form of this command.
shape average {percent percentage | rate [units]} [burst-size [burst-units]]
no shape average {percent percentage | rate [units]} [burst-size [burst-units]]
Syntax Description
percent value
|
Specifies the interface bandwidth in percentage. Values can be from 1 to 100.
|
rate
|
Average shaping rate in the specified units. Values can be from 1 to 4294967295.
|
units
|
(Optional) Specifies the units for the bandwidth. Values can be:
• bps - bits per second (default)
• gbps - gigabits per second
• kbps - kilobits per second
• mbps - megabits per second
|
burst-size
|
(Optional) Excess burst size in the specified units. Values can be from 1 to 4294967295. This argument is available only on the Cisco XR 12000 Series Router.
|
burst-units
|
(Optional) Specifies the units for the burst size. Values can be:
• bytes—bytes (default)
• gbytes—gigabytes
• kbytes—kilobytes
• mbytes—megabytes
• ms—milliseconds
• us—microseconds
|
Defaults
units: bps
Command Modes
Policy map class configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
The units and burst-units arguments were added.
|
Release 3.3.1
|
Minimum rate value changed from 128 kbps to 256 kbps.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
When you use the shape average command on the Cisco CRS-1, egress shaping is done at the Layer 2 level and includes the Layer 2 header in the rate calculation. Ingress shaping is done at the Layer 3 level and does not include the Layer 2 header in the rate calculation. Shaping is performed in multiples of 256 kbps, the minimum shaping rate.
When using this command on the Cisco XR 12000 Series Router, egress and ingress shaping is performed in multiples of 64 kbps on the Layer 3 level.
If you have both shape and bandwidth configured for a class, ensure that the shape percent value is always greater than the percent value for bandwidth.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
.
Examples
The following example sets traffic shaping to 50 milliseconds:
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# shape average percent 50
The following example shows how to set traffic shaping to 5,000,000 kbps:
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# shape average 5000000 kbps
show fmgr interface
To display ternary content addressable memory (TCAM) feature entries for QoS, enter the show fmgr interface command in EXEC mode.
show fmgr interface type instance feature {fabqos | policer | qos | qos-all} {input | output} [[hw
| sw] [all | ipv4-mpls | ipv6 | l2] [dup-bank] location node-id]
Syntax Description
type
|
Interface type from which candidate route processor (RP) packets are sourced. For more information, use the question mark (?) online help function.
|
instance
|
Either a physical interface instance or a virtual interface instance:
• Physical interface instance. Naming notation is rack/slot/module/port and a slash mark between values is required as part of the notation.
– rack: Chassis number of the rack.
– slot: Physical slot number of the line card.
– module: Module number. A physical layer interface module (PLIM) is always 0.
– port: Physical port number of the interface.
Note In references to a Management Ethernet interface located on a route processor card, the physical slot number is alphanumeric (RP0 or RP1) and the module is CPU0. Example: interface MgmtEth0/RP1/CPU0/0.
• Virtual interface instance. Number range varies depending on interface type.
For more information about the syntax for the router, use the question mark (?) online help function.
|
feature
|
Displays feature specific information.
|
fabqos
|
Displays fabric quality of service (QoS) entries.
|
policer
|
Displays policer entries.
|
qos
|
Displays QoS entries.
|
qos-all
|
Displays entries for both QoS and policer.
|
input
|
Specifies the ingress direction.
|
output
|
Specifies the egress direction.
|
hw
|
(Optional) Reads from the hardware.
|
sw
|
(Optional) Reads from the software.
|
all
|
(Optional) Displays all TCAM entries.
|
ipv4-mpls
|
(Optional) Displays ipv4-mpls entries.
|
ipv6
|
(Optional) Displays ipv6 entries.
|
l2
|
(Optional) Displays Layer 2 entries.
|
dup-bank
|
(Optional) Displays entries from the duplicate bank in turbo mode.
|
location node-id
|
(Optional) Identifies the location of the interface whose TCAM information you want to display. The node-id is expressed in the rack/slot/module notation.
Note Enter the show platform command to see the location of all nodes installed in the router.
|
Defaults
No default behavior or values
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
The in keyword was replaced with the input keyword.
The out keyword was replaced with the output keyword.
The l2 keyword was added.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
qos
|
read
|
Examples
The following example shows how to display all ingress QoS and policer TCAM entries for a Gigabit Ethernet interface:
RP/0/RP0/CPU0:router# show fmgr interface GigabitEthernet 0/1/5/0 feature qos-all in
===============================================================================
Interface = GigabitEthernet0_1_5_0 Feature = qos Direction = in
ip/mpls bndl vlg_id cid dscp exp dc qos-id
prio sh_q red_ctr qos_grp dc l2_mark l3_mark l3_mark_val max_th seg_size min_th
===============================================================================
No QoS configured on this interface
===============================================================================
Interface = GigabitEthernet0_1_5_0 Feature = policer Direction = in
IPv4: ip/mpls vlg_id l2_cos drid ip_src l4_proto frag dscp ip_dest qos_grp dc d
MPLS: ip/mpls vlg_id l2_cos label exp qos_grp dc qos-id
cid token1 stats_ptr conform1 exceed1 violate1 token2 conform2 exceed2 violate2
===============================================================================
No QoS configured on this interface
===============================================================================
Interface = GigabitEthernet0_1_5_0 Feature = policer Direction = in
IPv6: ipv6 vlg_id l2_cos dest_port src_port ip_dest ip_src ext_dst ext_rtg ext_
h ext_frag dest_rng_id dc qos_grp l4_proto dscp/prec qos-id
cid token1 stats_ptr conform1 exceed1 violate1 token2 conform2 exceed2 violate2
===============================================================================
No QoS configured on this interface
Table 5 describes the significant fields shown in the display.
Table 5 show fmgr interface Field Descriptions
QOS ENTRIES
|
Displays the following QoS information:
• Interface—Interface type and identifier.
• Feature—Feature currently running on the specified interface.
• Direction—Direction of interface (ingress or egress).
|
CSRAM Fields
|
General CSRAM1 information.
|
POLICER ENTRIES
|
General policer and TCAM information for the specified interface.
|
show hw-module multicast qos
To display the multicast QoS group information, use the show hw-module multicast qos command in EXEC mode.
show hw-module multicast qos [group-info [port number] location node-id | queue-info type
instance location node-id]
Syntax Description
group-info port number
|
(Optional) Group-information and port number.
|
queue-info
|
(Optional) Group queue information.
|
type
|
(Optional) Interface type. For more information, use the question mark (?) online help function.
|
instance
|
(Optional) Either a physical interface instance or a virtual interface instance:
• Physical interface instance. Naming notation is rack/slot/module/port and a slash between values is required as part of the notation.
– rack: Chassis number of the rack.
– slot: Physical slot number of the line card.
– module: Module number. A physical layer interface module (PLIM) is always 0.
– port: Physical port number of the interface.
Note In references to a Management Ethernet interface located on a Route Processor card, the physical slot number is alphanumeric (RP0 or RP1) and the module is CPU0. Example: interface MgmtEth0/RP1/CPU0/0.
• Virtual interface instance. Number range varies depending on interface type.
For more information about the syntax for the router, use the question mark (?) online help function.
|
location node-id
|
(Optional) MFIB connections associated with an interface of the designated node. The node-id argument is entered in the rack/slot/module notation.
|
Defaults
No default behavior or values
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 3.3.0
|
This command was introduced on Cisco XR 12000 Series Router.
|
Release 3.4.0
|
Command syntax was changed from show hw-module qos multicast to show hw-module multicast qos.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
If you do not enter a node-id value, all configured interfaces are displayed.
Task ID
Task ID
|
Operations
|
multicast
|
read
|
Examples
The following example shows how to display QoS information about for Packet-over-SONET/SDH (POS) interface 0/7/0/3:
RP/0/RP0/CPU0:router# show hw-module multicast qos
Matched (packets/bytes) : 0/0
Marked (packets/bytes) : 0/0
Table 6 describes the significant fields shown in the display.
Table 6 show hw-module multicast qos Field Descriptions
Field
|
Description
|
POS 0/7/0/3 output: p1
|
POS output interface for policy p1.
|
Matched (packets/bytes): 0/0
|
Class c1 of policy p1 displays no matched packets and bytes.
|
Marked (packets/bytes): 0/0
|
Class c1 of policy p1 displays no marked packets and bytes.
|
Matched (packets/bytes): 10/1320
|
Class c2 of policy p1 displays 10 matched packets and 1320 matched bytes.
|
Related Commands
Command
|
Description
|
hw-module qos multicast
|
Enables multicast QoS.
|
show policy-map interface
To display policy configuration information for all classes configured for all service policies on the specified interface, use the show policy-map interface command in EXEC mode.
show policy-map interface type instance [input | output] [combined | hw | sw]
Syntax Description
type
|
Interface type. For more information, use the question mark (?) online help function.
|
instance
|
Either a physical interface instance or a virtual interface instance as follows:
• Physical interface instance. Naming notation is rack/slot/module/port and a slash between values is required as part of the notation.
– rack: Chassis number of the rack.
– slot: Physical slot number of the modular services card or line card.
– module: Module number. A physical layer interface module (PLIM) is always 0.
– port: Physical port number of the interface.
Note In references to a Management Ethernet interface located on a route processor card, the physical slot number is alphanumeric (RP0 or RP1) and the module is CPU0. Example: interface MgmtEth0/RP1/CPU0/0.
• Virtual interface instance. Number range varies depending on interface type.
For more information about the syntax for the router, use the question mark (?) online help function.
|
input
|
(Optional) Attaches the specified policy map to the input interface.
|
output
|
(Optional) Attaches the specified policy map to the output interface.
|
combined
|
(Optional) Displays combined statistics for hardware and software switched packets.
|
hw
|
(Optional) Displays statistics for hardware switched packets.
|
sw
|
(Optional) Displays statistics for software switched packets.
|
Defaults
No default behavior or values
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
The combined, hw, and sw keywords were added.
|
Release 3.4.0
|
The combined, hw, and sw keywords were deleted.
The pre-decrypt, post-decrypt, pre-encrypt, and post-encrypt keywords were added for IPSec on the Cisco XR 12000 Series Router.
|
Release 3.4.1
|
The combined, hw, and sw keywords were added.
|
Release 3.5.0
|
On the Cisco XR 12000 Series Router, the show policy-map interface command output was updated to show when a policy is suspended on a multilink or T3 interface.
The pre-decrypt, post-decrypt, post-encrypt, and pre-decrypt keywords were removed.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The show policy-map interface command displays the statistics for classes in the service policy attached to an interface. The counters displayed after the command is entered are updated only if congestion is present on the interface.
Task ID
Task ID
|
Operations
|
qos
|
read
|
Examples
The following example shows how to display policy configuration information for all classes on Packet-over-SONET (POS) interface 0/7/0/3 that are in the output and input direction:
RP/0/RP0/CPU0:router# show policy-map interface POS 0/7/0/3
Matched (packets/bytes) : 0/0
Marked (packets/bytes) : 0/0
Matched (packets/bytes) : 10/1320
Matched (packets/bytes) : 9/499
Marked (packets/bytes) : 0/0
Table 7 describes the significant fields shown in the display.
Table 7 show policy-map interface Field Descriptions
Field
|
Description
|
POS 0/7/0/3 output: p1
|
POS output interface for policy p1.
|
Matched (packets/bytes): 0/0
|
Class c1 of policy p1 displays no matched packets and bytes.
|
Marked (packets/bytes): 0/0
|
Class c1 of policy p1 displays no marked packets and bytes.
|
Matched (packets/bytes): 10/1320
|
Class c2 of policy p1 displays 10 matched packets and 1320 matched bytes.
|
POS 0/7/0/3 input: p4
|
POS input interface for the specified policy (p4).
|
Matched (packets/bytes): 9/499
|
Class c3 of policy p4 displays 9 matched packets and 499 matched bytes.
|
Marked (packets/bytes): 0/0
|
Class c3 of policy p4 displays no marked packets and bytes.
|
The following example shows how to display L2VPN QoS policy statistics information for all classes on TenGigE interface 0/1/0/0 that are in the output direction on the Cisco CRS-1:
RP/0/RP0/CPU0:router# show policy-map interface TenGigE 0/1/0/0
TenGigE0/1/0/0 output: p1
Classification statistics (packets/bytes) (rate - kbps)
Matched : 23571609/1838585502 0
Policing statistics (packets/bytes) (rate - kbps)
Policed(conform) : 4417095/344533410 84894
Policed(exceed) : 13443/1048554 259
Policed(violate) : 19141071/1493003538 367877
Policed and dropped : 0/0
Classification statistics (packets/bytes) (rate - kbps)
Matched : 4660985/363556830 88887
Transmitted : 4660985/363556830 88887
High watermark (packets) : 0
Inst-queue-len (bytes) : 0
Avg-queue-len (bytes) : 0
TailDrop Threshold(bytes) : 250000000
Taildropped(packets/bytes) : 0/0
<similar output as above for default action>
The following example shows sample output from the show policy-map interface command when a policy has been suspended on a Cisco XR 12000 Series Router multilink interface:
RP/0/0/CPU0:router#show policy-map interface Multilink 0/2/0/0/201 input
Multilink0/2/0/0/201 input: ps1 suspended by EA: No bandwidth
show qos interface
To display QoS information for a specific interface, use the show qos interface command in EXEC mode.
show qos interface type instance {input | output} [location node-id]
Syntax Description
type
|
Interface type. For more information, use the question mark (?) online help function.
|
instance
|
Either a physical interface instance or a virtual interface instance as follows:
• Physical interface instance. Naming notation is rack/slot/module/port and a slash between values is required as part of the notation.
– rack: Chassis number of the rack.
– slot: Physical slot number of the modular services card or line card.
– module: Module number. A physical layer interface module (PLIM) is always 0.
– port: Physical port number of the interface.
Note In references to a Management Ethernet interface located on a route processor card, the physical slot number is alphanumeric (RP0 or RP1) and the module is CPU0. Example: interface MgmtEth0/RP1/CPU0/0.
• Virtual interface instance. Number range varies depending on interface type.
For more information about the syntax for the router, use the question mark (?) online help function.
|
input
|
Attaches the specified policy map to the input interface.
|
output
|
Attaches the specified policy map to the output interface.
|
location node-id
|
(Optional) Displays detailed QoS information for the designated node. The node-id argument is entered in the rack/slot/module notation.
|
Defaults
No default behavior or values
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was first supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
The pre-decrypt, post-decrypt, pre-encrypt, and post-encrypt keywords were added for IPSec on the Cisco XR 12000 Series Router.
|
Release 3.4.1
|
L2VPN QoS policy configuration sample output was added on the Cisco CRS-1.
|
Release 3.5.0
|
On the Cisco XR 12000 Series Router, the show qos interface command output was updated to show when a policy is suspended on a multilink or T3 interface.
The pre-decrypt, post-decrypt, post-encrypt, and pre-decrypt keywords were removed.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The show qos interface command displays configuration for all classes in the service policy that is attached to an interface.
Use this command to check the actual values programmed in the hardware from the action keywords in the police rate command.
Task ID
Task ID
|
Operations
|
qos
|
read
|
Examples
The following example shows how to display L2VPN QoS information on a POS interface running on the Cisco CRS-1:
RP/0/RP0/CPU0:Router# show qos interface pos 0/4/0/15 output
Interface POS0_4_0_15 -- output policy
Total number of classes: 1
-------------------------------------------------------
LEVEL1 class: classid = 0x1
No explicit weight assigned for this class
This Q belongs to Group = 24
Queue Max. BW. = 2396160 kbps
TailDrop Threshold(bytes)= 59904000
WRED not configured for this class
Policer avg. kbps = 1000000 kbps
Policer peak kbps = 0 kbps
Policer conform burst configured = 0 Kbits
Policer conform burst programmed = 2097120 bytes
Policer conform action = Just TX
Policer conform action value = 0
Policer exceed action = DROP PKT
Policer exceed action value = 0
Table 8 describes the significant fields shown in the display.
Table 8 show policy-map interface (Cisco CRS-1) Field Descriptions
Field
|
Description
|
LEVEL1 class
|
Level 1 class identifier in hexadecimal format.
|
class name
|
Name that was assigned to this class with the class command.
|
new dscp
|
New IP DSCP value assigned to this interface.
|
Weight
|
Weight assigned to the specified class.
|
Sharq Queue ID
|
Sharq Queue identifier.
|
This Q belongs to Port
|
Identifies the host port for the specified queue.
|
Queue Max. BW.
|
Maximum bandwidth allowed on this queue.
|
TailDrop Threshold(bytes)
|
Tail drop threshold for the sharq queue. Once the packets in the buffer is more than the value of the TailDrop Threshold, the incoming packets are dropped. The TailDrop Threshold value is a percentage of the full queue buffer.
|
WRED
|
Weighted Random Early Detection (WRED) assigned to the specified class.
If no weight has been assigned, the show policy-map interface command output shows "WRED not configured for this class."
|
Policer slot
|
Slot Identifier for the policer.
|
Policer avg. kbps
|
Average Committed Information Rate (CIR) in bits per second (bps), gigabits per second (gbps), kilobits per second (kbps), or megabits per second (mbps).
|
Policer peak kbps
|
Peak CIR in bps, gbps, kbps, or mbps.
|
Policer conform burst configured
|
Configured burst size, expressed in bytes, gigbytes (gbytes), kilobytes (kbytes), megabytes (mbytes), milliseconds (ms), or microseconds (us).
|
Policer conform burst programmed
|
Programmed burst size for conforming cells, expressed in bytes, gigbytes (gbytes), kilobytes (kbytes), megabytes (mbytes), milliseconds (ms), or microseconds (us).
|
Policer exceed burst configured
|
Configured exceeded burst size.
|
Policer exceed burst programmed
|
Programmed exceeded burst size.
|
Policer conform action
|
Policer conform action.
|
Policer conform action value
|
Policer conform action value.
|
Policer exceed action
|
Indicates whether the device supports excess burst size configuration. In the example, excess burst size configuration is supported for transmitted cells only.
|
Policer exceed action value
|
Policer exceed action value.
|
Policer violate action
|
Policer violate action.
|
Policer violate action value
|
Policer violate action value.
|
The following example shows sample output to display QoS policy configuration information on a GigabitEthernet interface on the Cisco CRS-1:
RP/0/RP0/CPU0:router# show qos interface GigabitEthernet 0/5/0/0 input
Interface GigabitEthernet0_5_0_0 -- input policy
Total number of classes: 1
-------------------------------------------------------
LEVEL1 class: classid = 0x1
class name = class-default
No explicit weight assigned for this class
This Q belongs to Port = 8
Queue Max. BW. = 1000064 kbps
TailDrop Threshold(bytes)= 25001600
WRED not configured for this class
Policer avg. kbps = 99853 kbps
Policer peak kbps = 0 kbps
Policer conform burst configured = 800 Kbits
Policer conform burst programmed = 102400 bytes
Policer exceed burst configured = 8192 Kbits
Policer exceed burst programmed = 1048576 bytes
Policer conform action = Just TX
Policer conform action value = 0
Policer exceed action = SET DSCP AND TX
Policer exceed action value = 10
Policer violate action = DROP PKT
Policer violate action value = 0
The following example shows sample output to display QoS information on a Gigabit Ethernet interface running on the Cisco XR 12000 Series Router:
RP/0/0/CPU0:router# show qos interface GigabitEthernet 0/0/0/0 output
Interface GigabitEthernet0_0_0_0 -- output policy
Total number of classes: 4
---------------------------------------------------
LEVEL1 class: classid = 0x1
Queue Min. BW. = 100000 kbps
Queue Limit = 16384 packets
LEVEL1 class: classid = 0x2
class name = prec_internet
Queue Min. BW. = 300000 kbps
Queue Max. BW. = 400000 kbps
Queue Max. Burst = 40000 bytes
Queue Limit = 32768 packets
LEVEL1 class: classid = 0x3
class name = prec_critical
queue ID (Priority) = 2050
Queue Limit = 262143 packets
Policer average = 100000 KBits
Policer conform burst = 3125000 bytes
Policer excess burst = 3125000 bytes
Policer conform action = Just TX
Policer exceed action = DROP PKT
Policer violate action = DROP PKT
LEVEL1 class: classid = 0x0
Queue Limit = 32768 packets
Table 9 describes the significant fields shown in the display.
Table 9 show policy-map interface (Cisco XR 12000 Series Router) Field Descriptions
Field
|
Description
|
LEVEL1 class
|
Level 1 class identifier in hexadecimal format.
|
class name
|
Name that was assigned to this class with the class command.
|
Queue ID
|
Queue identifier.
|
Queue Min. BW
|
Minimum bandwidth allowed on this queue.
|
Queue Max. BW
|
Maximum bandwidth allowed on this queue.
|
Queue Max. Burst
|
Maximum burst size allowed on this queue.
|
Weight
|
Weight assigned to the specified class.
|
Queue Limit
|
Configured queue limit.
|
Policer average
|
Average Committed Information Rate (CIR) in bits per second (bps), gigabits per second (gbps), kilobits per second (KBits), or megabits per second (mbps).
|
Policer conform burst
|
Configured burst size, expressed in bytes, gigbytes (gbytes), kilobytes (kbytes), megabytes (mbytes), milliseconds (ms), or microseconds (us).
|
Policer excess burst
|
Programmed burst size for conforming cells, expressed in bytes, gigbytes (gbytes), kilobytes (kbytes), megabytes (mbytes), milliseconds (ms), or microseconds (us).
|
Policer conform action
|
Policer conform action.
|
Policer exceed action
|
Policer exceed action.
|
Policer violate
|
Indicates whether the device supports excess burst size configuration. In the example, excess burst size configuration is supported for transmitted cells only.
|
Policer exceed action value
|
Policer exceed action value.
|
Policer violate action
|
Policer violate action.
|
switch-fabric service-policy
To configure a service policy for the switch fabric, use the switch-fabric service-policy command in global configuration mode. To remove a specified service policy from the switch fabric, use the no form of this command.
switch-fabric service-policy policy-map-name
no switch-fabric service-policy policy-map-name
Syntax Description
policy-map-name
|
Name of the predefined policy map to be used as a QoS policy. The name can be a maximum of 40 alphanumeric characters.
|
Defaults
No service policy is specified.
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 3.3.0
|
This command was introduced on the Cisco CRS-1 and the Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
The following example configures the service policy for policy map1.
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# switch-fabric service-policy map1
violate-action
To configure the action to take on packets that violate the rate limit, use the violate-action command in policy map police configuration mode. To remove a conform action from the policy-map, use the no form of this command.
violate-action action
no violate-action action
Syntax Description
action
|
(Optional) Specifies the action to take on packets. Specify one of the following keywords:
• drop—Drops the packet.
• set—Has the following keywords and arguments:
– cos value—Sets the class of service value. Range is 0 to 7.
– discard-class value—Sets the discard class value. Range is 0 to 7.
– dscp [tunnel] value—Sets the differentiated services code point (DSCP) value and sends the packet. See Table 2 for a list of valid values. With the tunnel keyword, the DSCP is set in the outer header.
– mpls experimental {topmost | imposition} value—Sets the experimental (EXP) value of the Multiprotocol Label Switching (MPLS) packet topmost label or imposed label. Range is 0 to 7.
– precedence [tunnel] precedence—Sets the IP precedence and sends the packet. See Table 3 for a list of valid values. With the tunnel keyword, the precedence is set in the outer header.
– qos-group value—Sets the QoS group value.
• transmit—Transmits the packets.
|
Defaults
No default behavior or values
Command Modes
Policy map police configuration
Command History
Release
|
Modification
|
Release 3.4.0
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.4.1
|
The set qos-group keyword was added.
|
Release 3.5.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The atm-clp keyword is available on the Cisco XR 12000 Series Router only.
For more information regarding the traffic policing feature refer to police rate.
The violate-action command can set the DSCP, the precedence, or the discard class for IP packets, and experimental and discard-class values for MPLS packets.
Task ID
Task ID
|
Operations
|
qos
|
read, write
|
Examples
In the following example for MPLS, traffic policing is configured to drop packets that violate the rate limit:
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 0
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# police rate 250 kbps burst 50
RP/0/RP0/CPU0:router(config-pmap-c-police)# violate-action drop
RP/0/RP0/CPU0:router(config-pmap-c-police)# exit
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface pos 0/5/0/0
RP/0/RP0/CPU0:router(config-if) service-policy input policy1
Related Commands
Command
|
Description
|
police rate
|
Configures traffic policing and enters policy map police configuration mode.
|
policy-map
|
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
show policy-map interface
|
Displays statistics and configurations of all input and output service policies that are attached to an interface.
|