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
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 mpls experimental topmost
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 QoS debug commands, see Cisco IOS XR Modular Quality of Service Debug Command Reference, Release 3.4.
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.
|
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.
|
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
no class class-name
Syntax Description
class-name
|
Name of the class for which you want to configure or modify policy. Use the name class-default to configure 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.
|
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.
|
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 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 [pre-decrypt | post-decrypt] | output [pre-encrypt |
post-encrypt]]
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.
|
pre-decrypt
|
(Optional) Specifies the point of execution for the policy map on the ingress message after applying the service.
|
post-decrypt
|
(Optional) Specifies the point of execution for the policy map on the egress message after applying the service.
|
output
|
(Optional) Clears output QoS counters that are attached to the specified interface.
|
pre-encrypt
|
(Optional) Specifies the point of execution for the policy map on the ingress message before applying the service.
|
post-encrypt
|
(Optional) Specifies the point of execution for the policy map on the egress message before applying the service.
|
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.
|
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 action
no conform-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:
– 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.
|
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 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:P1_CRS-8(config-pmap-c-police)# conform-action set mpls experimental topmost
4
RP/0/RP0/CPU0:P1_CRS-8(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.
|
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 action
no exceed-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:
– 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.
|
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 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:P1_CRS-8(config-pmap-c-police)# exceed-action drop
RP/0/RP0/CPU0:P1_CRS-8(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.
|
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.
|
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.
|
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 enable 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 {enable | disable} location node-id
Syntax Description
enable
|
Enables QoS queue auto-defragmentation.
|
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.
|
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 enable 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 enable 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
|
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
|