This module lists quality of service (QoS)
commands in alphabetical order. For detailed information about QoS concepts,
configuration tasks, and examples, see the
Modular Quality of Service Configuration Guide for Cisco NCS 6000 Series Routers Modular Quality of Service
Configuration Guide for Cisco NCS 6000 Series Routers.
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.
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-value
Specifies
the amount of guaranteed bandwidth, based on an absolute percentage of
available bandwidth. Range is from 1 to 100.
Command Default
The default units is
kbps.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
If a percentage
value is set, the accuracy that can be expected is 1 percent.
Note
The bandwidth
value takes into account the Layer 2 encapsulation that is applied to traffic
leaving the interface. For
,
the encapsulation is considered to be
14 bytes; whereas for IEEE 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:
policy-map parent
class match_all
shape average 1000000
bandwidth 1000000
service-policy child
policy-map child
class gold
bandwidth percent 20
class silver
bandwidth percent 40
class default
bandwidth percent 40
Note
The
bandwidth command is part of 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.
If bandwidth is configured
in the parent class, parent minimum bandwidth is used as a reference for the
child bandwidth percentages.
If bandwidth is not
configured in the parent class, the implicit minimum bandwidth, which is a
portion of the total unallocated bandwidth allocated to the class based on the
explicit or implicit bandwidth remaining, is used as a reference.
For subinterface
policies:
If bandwidth is configured
in the parent class, parent minimum bandwidth is used as a reference for child
bandwidth percentages.
If bandwidth remaining is
configured in the parent class,
bandwidth-remaining-percent *
interface-rate is used as a reference.
If bandwidth is not
configured in the parent class,
shape rate
is used as a reference.
In this example,
the hierarchical policy is attached to the main interface, and the parent
classes are a mix of bandwidth and shape only classes:
policy-map hqos
class c1
bandwidth percent 40
service-policy child
class c2
shape average 500000000
service-policy child
The reference for
the child policy in class c2 is the implicit bandwidth of class c2 bounded by
the shape rate of class c2. Therefore, the reference = (60 percent * interface
bandwidth) / 3 bounded by 500000000 kbps.
In this example,
the hierarchical policy is a class-default only parent shape configured on
subinterfaces:
policy-map sub_int_hqos
class c1ass-default
shape average 40
service-policy child
The class-default
parent shape rate is used as reference.
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 Gigabit Ethernet or POS encapsulation but
including the High-Level Data Link Control (HDLC) flags, frame check sequence
(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:
policy-map oc-192
class c1
bandwidth percent 50
The resulting
bandwidth reservation for class c1 is 4,792,320 kbps. This equates to 50
percent of the OC-192 bandwidth excluding the GE or POS overhead.
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth percent 50RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# class class2RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth percent 10
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.
Syntax Description
percent
percentage-value
Specifies
the amount of guaranteed bandwidth, based on an absolute percentage of the
available bandwidth. Range is from 1 to 100.
Command Default
No bandwidth is
specified.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
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.
The available
bandwidth is equally distributed among those queueing classes that do not have
the remaining bandwidth explicitly configured.
Note
On egress, the
actual bandwidth of the interface is determined to be the Layer 2 capacity. 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
egress, if the
bandwidth
remaining command is not present, then the bandwidth is shared
equally among the configured queueing 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
This example shows
how the remaining bandwidth is shared by classes class1 and class2 in a 20:80
ratio.
RP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth remaining percent 20RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# class class2RP/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.
(Optional)
Specifies a quality-of-service (QoS) class.
class-name
Name of the
class for which you want to configure or modify policy.
class-default
Configures
the default class.
Command Default
No class is
specified.
Type is QoS when not
specified.
Command Modes
Policy map configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
The
class-default keyword is used for configuring default classes. It is a
reserved name and cannot be used with user-defined classes. It is always added
to the policy map (type qos) even if the class is not configured. For example,
the following configuration shows that the class has not been configured, but
the running configuration shows ‘class class-default’.
RP/0/RP0/CPU0:router(config)# policy-map pm1RP/0/RP0/CPU0:router(config-pmap)# end-policy-mapRP/0/RP0/CPU0:router(config)# end
!
RP/0/RP0/CPU0:router# show running-config
!
policy-map pm1
class class-default
!
end-policy-map
!
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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 class1RP/0/RP0/CPU0:router(config-cmap)# match precedence 3RP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:routerconfig-pmap-c)# shape average percent 30RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# class class-defaultRP/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 default class
can be directly used in a policy map, as the system defines it implicitly.
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
XR Config mode. To
remove an existing class map from the router, use the
no form of
this command.
(Optional)
Specifies a quality-of-service (QoS) class-map.
match-all
(Optional)
Specifies a match on all of the match criteria.
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 class name can be a
maximum of 63 characters, must start with an alphanumeric character, and in
addition to alphanumeric characters, can contain any of the following
characters: . _ @ $ % + | # : ; - =
Command Default
Type is QoS when not
specified.
Command Modes
XR Config
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
These commands can
be used in a class map:
match access-group
match[not]cos
match
destination-address
match[not]discard-class
match
[not]dscp
match[not]mpls
experimental topmost
match
[not] precedence
match
precedence
match
[not] protocol
match[not]qos-group
match
source-address
match
vlanvlan-id
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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 class101RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv4 101
Identifies specific three-bit experimental (EXP) field values in the topmost Multiprotocol Label Switching (MPLS) label as match criteria for a class map.
Identifies selected VLAN IDs as the match criteria for a class map.
clear qos counters
interface
To clear QoS
counters for a specified interface, use the
clear qos counters
interface command in
XR EXEC
mode.
clearqoscountersinterfacetype
[ input | output ]
Syntax Description
type
Interface
type. For more information, use the question mark (?) online help function.
interface-path-id
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 (RSP0RP0 or RP1) and the module
is CPU0. Example: interface MgmtEth0/RSP0RP1/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.
Command Default
No default behavior
or values
Command Modes
XR EXEC
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
The
clear qos
counters interface 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.
The MIB counters
are not reset with this command.
Task ID
Task ID
Operations
qos
read,
write
Examples
This example shows how to clear output QoS counters attached to
HundredGigE interface 0/1/0/0:
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 | setoptions | transmit ]
noconform-action
[ drop | setoptions | transmit ]
Syntax Description
drop
(Optional)
Drops the packet.
set
options
(Optional)
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 to7.
cos [inner]value—Sets the class of service value. Range is 0 to 7.
discard-classvalue—Sets the discard class value. Range is 0 to 7.
dscpvalue—Sets the differentiated services code point (DSCP)
value and sends the packet. See
Table 1 for a list of valid values.
dscp [tunnel]
value—Sets the differentiated services code point (DSCP)
value and sends the packet. See
Table 1 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.
precedenceprecedence—Sets the IP precedence and sends the packet See
Table 2 for a list of valid values.
precedence [tunnel]
precedence—Sets the IP precedence and sends the packet. See
Table 1 for a list of valid values. With the
tunnel keyword, the precedence is set in the outer header.
qos-groupvalue—Sets the QoS group value.
transmit
(Optional)
Transmits the packets.
Command Default
By default, if no
action is configured on a packet that conforms to the rate limit, the packet is
transmitted.
Command Modes
Policy map police configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
For more
information regarding the traffic policing feature, see the
police rate command.
The
conform-action command is used to set the DSCP, the precedence, or the
discard class for IP packets, and experimental or discard class values for MPLS
packets.
Task ID
Task ID
Operations
qos
read,
write
Examples
In this 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 classRP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 0RP/0/RP0/CPU0:router(config-cmap)# exitRP/0/RP0/CPU0:router(config)# policy-map childRP/0/RP0/CPU0:router(config-pmap)# class prec1RP/0/RP0/CPU0:router(config-pmap-c)# police rate 100000000 peak-rate 3125000 peak-burst 3125000 RP/0/RP0/CPU0:router(config-pmap-c-police)# conform-action set mpls experimental imp 1RP/0/RP0/CPU0:router(config-pmap-c-police)# conform-action set qos-group 1RP/0/RP0/CPU0:router(config-pmap-c-police)# exitRP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# exitRP/0/RP0/CPU0:router(config)# interface HundredGigE 0/7/0/0RP/0/RP0/CPU0:router(config-if) service-policy input policy1
Configures the action to take on packets that violate the rate limit.
end-class-map
To end the
configuration of match criteria for the class and to exit class map
configuration mode, use the
end-class-map command in class map configuration mode.
end-class-map
Syntax Description
This command has no keywords or arguments.
Command Default
No default behavior
or values
Command Modes
Class map configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
qos
read, write
Examples
This example shows
how to end the class map configuration and exit class map configuration mode:
RP/0/RP0/CPU0:router(config)# class-map class101RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv4 101RP/0/RP0/CPU0:router(config-cmap)# end-class-map
Defines a traffic class and the associated rules that match packets to the class.
end-policy-map
To end the
configuration of a policy map and to exit policy map configuration mode, use
the
end-policy-map command in policy map configuration mode.
end-policy-map
Syntax Description
This command has no keywords or arguments.
Command Default
No default behavior
or values
Command Modes
Policy map configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
qos
read, write
Examples
This example shows
how to end the policy map configuration and exit policy map configuration mode.
RP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# police 250RP/0/RP0/CPU0:router(config-pmap-c)# set precedence 3RP/0/RP0/CPU0:router(config-pmap)# end-policy-map
Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
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 | setoptions | transmit ]
noexceed-action
[ drop | setoptions | transmit ]
Syntax Description
drop
(Optional)
Drops the packet.
setoptions
Configures
the specified packet properties. Replace
options with one of the following keywords or keyword
arguments:
cos
[inner]value—Sets the class of service value. Range is 0 to 7.
cosvalue—Sets the class of service value. Range is 0 to 7.
discard-classvalue—Sets the discard class value. Range is 0 to 7.
dscpvalue—Sets the differentiated services code point (DSCP)
value and sends the packet. See
Table 1 for a list of valid values.
dscp [tunnel]
value—Sets the differentiated services code point (DSCP)
value and sends the packet. See
Table 1 for a list of valid values. With the
tunnel keyword, the DSCP is set in the outer header.
fr-devalue—Sets the Frame Relay discard eligible (DE) bit on
the Frame Relay frame then transmits that packet. In congested environments,
frames with the DE bit set to 1 are discarded before frames with the DE bit set
to 0. The frame relay DE bit has only one bit and has only two settings, 0 or
1. The default DE bit setting is 0.
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.
precedenceprecedence—Sets the IP precedence and sends the packet. See
Table 1 for a list of valid values.
precedence [tunnel]
precedence—Sets the IP precedence and sends the packet. See
Table 1 for a list of valid values. With the
tunnel keyword, the precedence is set in the outer header.
qos-groupvalue—Sets the QoS group value.
qos-groupvalue—Sets the QoS group value. Range is 0 to 63.
transmit
(Optional)
Transmits the packets.
Command Default
By default, if no
action is configured on a packet that exceeds the rate limit, the packet is
dropped.
Command Modes
Policy map police configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
For more
information regarding the traffic policing feature, see the
police rate command.
The
exceed-action command can be used to set the DSCP, the precedence, or the
discard class for IP packets, and experimental or discard-class values for MPLS
packets.
Task ID
Task ID
Operations
qos
read,
write
Examples
In this example
for MPLS, traffic policing is configured to drop traffic that exceeds the rate
limit:
Configures the action to take on packets that violate the rate limit.
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.
Specifies
the name of the IPv4 access group to be matched.
ipv6
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.
Command Default
By default, if
neither IPv6 nor IPv4 is specified as the match criteria for a class map, IPv4
addressing is used.
Command Modes
Class map configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
Access Control
Entries with TCP fields such as, SYN, ACK and FIN in the corresponding ACL are
not supported.
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. You can specify up to eight IPv4 and IPv6 ACLs in a
match statement.
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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 map1RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv4 map1RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv6 map2
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.
Identifier
that specifies the exact value from 0 to 7. Up to eight CoS identifiers can be
specified to match packets.
Command Default
No match criteria
are specified.
Command Modes
Class map configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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, the values of subsequent match
statements are added to the first
match
cos command.
The
match
cos command is supported on egress Layer 2 interfaces, Layer 2
subinterfaces, and Layer 3 physical interfaces. Layer 3 physical interfaces are
supported, because it is possible for a Layer 3 interface to have underlying
Layer 2 subinterfaces.
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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 HundredGigE interface
0/7/0/0
.100 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 cos146RP/0/RP0/CPU0:router(config-cmap)# match cos 1 4 6RP/0/RP0/CPU0:router(config-cmap)# exitRP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class cos146RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 300RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# exitRP/0/RP0/CPU0:router(config)# interface HundredGigE 0/7/0/0RP/0/RP0/CPU0:router(config-if)# service-policy input policy1
Sets the Layer 2 class of service (CoS) value of an outgoing packet.
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.
IP DSCP
value identifier that specifies the exact value or a range of values. Range is
0 to 63. Up to eight IP DSCP values can be specified to match packets. Reserved
keywords can be specified instead of numeric values.
Table 1 describes the reserved keywords.
Command Default
Matching on both IP
Version 4 (IPv4) and IPv6 packets is the default.
Command Modes
Class map configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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. Only one of the eight values is needed to yield a match (OR
operation).
The command
supports only eight IP DSCP values. If you try to configure more match
statements after all the eight values are matched, the statements get rejected.
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 IP DSCP value of 2 should
be treated differently than a packet marked with an IP DSCP 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.
Table 1 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
This 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
HundredGigE
0/7/0/0for 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.
Identifies selected VLAN IDs as the match criteria for a class map.
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 ]
mplsexperimentaltopmostexp-value
[ exp-value1
...exp-value7 ]
nomatch
[ not ]
mplsexperimentaltopmostexp-value
[ exp-value1
...exp-value7 ]
Syntax Description
not
not
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.
Command Default
No default behavior
or values
Command Modes
Class map configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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, the new values are added to the
existing match statement.
This command
examines the three experimental bits contained in the topmost label of an MPLS
packet. Up to eight 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
This 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
HundredGigE 0/7/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.
Displays policy configuration information for all classes configured for all service policies on the specified interface.
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 ]
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 1 describes the reserved keywords.
Up to eight
precedence values can be matched in one match statement.
Command Default
Matching on both IP
Version 4 (IPv4) and IPv6 packets is the default.
Command Modes
Class map configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
This table lists
the IP precedence value number and associated name in descending order of
importance.
Table 2 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
This 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
HundredGigE 0/7/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.
Displays policy configuration information for all classes configured for all service policies on the specified interface.
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-idlower-limit ]
nomatchqos-group
Syntax Description
not
(Optional)
Negates the specified match result.
qos-group-id
QoS group
identifier that specifies the exact value from 0 to 511 or a range of values
from 0 to 511.
lower-limit
Specifies
the lower limit of QoS group that should be matched.
Command Default
No match criteria
are specified.
Command Modes
Class map configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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
30, and
31. Only one of the eight values is needed to yield a match (OR operation).
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 value 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
This example shows
a service policy called policy1 attached to an interface. In this example,
class map qosgroup5 will evaluate all packets leaving
HundredGigE 0/7/0/0
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 qosgroup5RP/0/RP0/CPU0:router(config-cmap)# match qos-group 5RP/0/RP0/CPU0:router(config-cmap)# exitRP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class qosgroup5RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 300RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# exitRP/0/RP0/CPU0:router(config)# interface HundredGigE 0/7/0/0RP/0/RP0/CPU0:router(config-if)# service-policy inputpolicy1
Sets the quality of service (QoS) group identifiers on packets.
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.
matchvlanvlanid
[ vlanid1
...
vlanid7 ]
nomatchvlanvlanid
[ vlanid1
...
vlanid7 ]
Syntax Description
vlanid
VLAN
identifier that specifies the exact value from 1 to 4094 or a range of values
from 1 to 4094. Up to eight values can be specified in a match statement.
Note
The
router supports up to eight values or ranges on a single match statement, and
up to 300 values or ranges specified on up to eight match statements.
Command Default
No match criteria
are specified.
Command Modes
Class map configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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, up to eight values of the subsequent
match statements are added to the first
match
vlan command, exceeding which, the statement is rejected.
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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
HundredGigE 0/7/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.
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.
policerate
{ value [units] | percentpercentage |
per-thousand value |
per-million value }
[ burstburst-size [burst-units] ]
[ peak-rate
{ value [units] | percentpercentage } ]
[ peak-burstpeak-burst [burst-units] ]
nopolicerate
{ value [units] | percentpercentage |
per-thousand value |
per-million value }
[ burstburst-size [burst-units] ]
[ peak-rate
{ value [units] | percentpercentage } ]
[ peak-burstpeak-burst [burst-units] ]
Syntax Description
value
Committed
information rate (CIR). Range is from 1 to 4294967295.
units
(Optional)
Unit of measurement 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 police rate as a percentage of the CIR. Range is from 1 to 100. See the
Usage Guidelines for information on how to use this keyword.
per-thousand
value
Specifies
the committed information rate in per thousand of the link bandwidth.
per-million
value
Specifies
the committed information rate in per million of the link bandwidth.
burst
burst-size
(Optional)
Specifies the burst size (in the specified
burst-units). Range is from 1 to 4294967295.
burst-units
(Optional)
Unit of measurement for the burst values. Values can be:
bytes—bytes (default)
gbytes—gigabytes
kbytes—kilobytes
mbytes—megabytes
ms—milliseconds
us—microseconds
peak-ratevalue
(Optional)
Specifies the Peak Information Rate (PIR) in the specifiedunits. Range is from 1 to 4294967295.
peak-burstpeak-burst
(Optional)
Specifies the peak burst size in the specified
burst-units.
The range is from 1 to 4294967295.
Command Default
No restrictions on
the flow of data are applied to any interface.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
The
police rate
can set the DSCP, the precedence, or the discard class for IP packets, and
experimental and discard-class values for MPLS packets.
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.
For
police rate
commands, interpret the
percent
keyword in this way:
For a
one-level policy, the
percent
keyword specifies the CIR as a percentage of the link rate. For example, the
command
police rate percent
35 configures the CIR as 35% of the link rate.
For a
two-level policy, in the parent policy, the
percent
keyword specifies the parent CIR as a percentage of the link rate. In the child
policy, the percent keyword specifies the child CIR as a percentage of the
maximum policing or shaping rate of the parent. If traffic policing or shaping
is not configured on the parent, the parent inherits the interface policing or
shaping rate.
Hierarchical
policing is also supported. In such a configuration, both parent and child
policies have class-maps containing policing statements, as in this example:
!
policy-map child
class gold
police rate percent 50
conform-action set precedence immediate
exceed-action drop
!
!
policy-map parent
class match_all
police rate 10000 kbps burst 15000
exceed-action drop
service-policy child
!
For more
information, see the "Committed Bursts and Excess Bursts" section in the
Modular Quality of Service Configuration Guide for Cisco NCS 6000 Series RoutersModular Quality of Service
Configuration Guide for Cisco NCS 6000 Series Routers.
Task ID
Task ID
Operations
qos
read,
write
Examples
In this example
for MPLS, traffic policing is configured with the average rate at 250 kbps, and
the normal burst size at 50 bytes for all packets leaving
HundredGigE interface
0/1/0/0:
Displays policy configuration information for all classes configured for all service policies on the specified 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
XR Config mode. To delete a
policy map, use the
no form of this command.
policy-map
[ typeqos ]
policy-name
nopolicy-map
[ typeqos ]
policy-name
Syntax Description
type qos
(Optional)
Specifies a quality-of-service (QoS) policy map.
policy-name
Name of the
policy map.
Command Default
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.
Type is QoS when not
specified.
Command Modes
XR Config
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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 1024 classes in one policy map, no policy map
can contain more than 1024 class policies. The maximum number of 1024 classes
per policy includes the implicit default class and its child policies.
A single policy
map can be attached to multiple interfaces concurrently.
Task ID
Task ID
Operations
qos
read,
write
Examples
These 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 class1RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv4 136RP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# police rate 250RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# class class-defaultRP/0/RP0/CPU0:router(config-pmap-c)# queue-limit 1000000 bytes
Defines a traffic class and the associated rules that match packets to the class.
priority
(QoS)
To assign priority
to a traffic class based on the amount of available bandwidth within a traffic
policy, 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
[ levelpriority-level ]
nopriority
Syntax Description
level
priority-level
(Optional)
Sets multiple levels of priority to a traffic class.
Value can be 1 or 2.
Default level is 1. Level 1 traffic has higher priority.
Command Default
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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
rate 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.
Task ID
Task ID
Operations
qos
read,
write
Examples
This example shows
how to configure priority queuing for the policy map named policy1:
Displays policy configuration information for 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
command in policy map class configuration mode. To remove the
queue packet limit from a class, use the
no form of this command.
queue-limitvalue [unit]
noqueue-limit
Syntax Description
value
Maximum
threshold for tail drop in bytes. Range is from 1 to 4294967295.
unit
(Optional)
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.
Command Default
100 milliseconds:
maximum threshold for tail drop
10 milliseconds:
maximum threshold for high-priority queues
Maximum threshold
units are in packets.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
Guaranteed
Service Rate
The guaranteed
service rate is defined as the service rate of the queue when all queues are
backlogged and derived as:
Displays QoS information for a specific interface.
random-detect
To enable random
early detection (RED), use the
random-detect
command in policy map class configuration mode. To remove RED, use the
no form of this command.
Enables
RED with default minimum and maximum thresholds.
discard-classvalue
Discard-class based WRED.
dscpvalue
DSCP-based
WRED.
expvalue
MPLS
Experimental-based WRED.
precedencevalue
Precedence-based WRED. Values can be:
0 or routine
1 or priority
2 or immediate
3 or flash
4 or flash-override
5 or critical
6 or internet
7 or network
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 queue length exceeds the maximum threshold, RED drops all packets with
the specified discard class value.
units
(Optional)
Units for the threshold values. Values can be:
bytes—bytes
gbytes—gigabytes
kbytes—kilobytes
mbytes—megabytes
ms—milliseconds
packets—packets (default)
us—microseconds
Command Default
Default unit for
max-threshold
and
min-threshold
is
packets.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
When time units
are used, the guaranteed service rate is used to compute thresholds.
The mark
probability is always set to 1.
When the value of
the
units argument is packets, packets are assumed to be 256 bytes in
size.
Weighted
Random Early Detection
The following
restrictions apply to Weighted Random Early Detection (WRED):
For thresholds in time
units, the guaranteed service rate is used to calculate the thresholds in
bytes.
Default RED minimum
threshold—30ms at the guaranteed
service rate.
Default RED maximum
threshold—100 ms as the guaranteed service rate.
For bundles, queue
limit and WRED thresholds are supported in time units only.
Note
RED is enabled
when you configure any of the supported
random-detect
commands.
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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 policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# random-detect 1000000 2000000
Displays policy configuration information for all classes configured for all service policies on the specified interface.
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.
Discard
class value. Valid values are from 0 to 7. Up to eight values can be entered
separated by commas.
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)
Units for the threshold values. Values can be:
bytes—bytes
gbytes—gigabytes
kbytes—kilobytes
mbytes—megabytes
ms—milliseconds
packets—packets
(default)
us—microseconds
Command Default
Default unit for
max-threshold and
min-threshold is
packets.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
When the value of
the
units
argument is packets, packets are assumed to be 256 bytes in size.
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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 policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# random-detect discard-class 3 1000000 2000000
Displays policy configuration information for 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.
DSCP value.
Up to eight
dscp-values (any combination of numbers, ranges, and reserved
keywords) can be used separated by commas. The following arguments are
supported:
Number from 0 to 63 that sets
the DSCP value.
Range of DSCP values. Range
is from 0 to 63.
Reserved keywords can be
specified instead of numeric values.
Table 1 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, 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)
Units for the threshold values. Values can be:
bytes—bytes
gbytes—gigabytes
kbytes—kilobytes
mbytes—megabytes
ms—milliseconds
packets—packets
(default)
us—microseconds
Command Default
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 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
Reserved keywords
can be specified instead of numeric values. See
Table 1 for the list of keywords.
When the value of
the
units argument is packets, packets are assumed to be 256 bytes in
size.
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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 policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# random-detect dscp AF11 1000000 2000000
Displays policy configuration information for 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.
MPLS
experimental value. Valid values are from 0 to 7. Up to eight values can be
entered separated by commas.
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 experimental value.
units
(Optional)
Units for the threshold values. Values can be:
bytes—bytes
gbytes—gigabytes
kbytes—kilobytes
mbytes—megabytes
ms—milliseconds
packets—packets
(default)
us—microseconds
Command Default
Default unit for
max-threshold and
min-threshold is
packets.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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 value of
the
units argument is packets, packets are assumed to be 256 bytes in
size.
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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 policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# random-detect exp 4 1000000 20000
Displays policy configuration information for 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.
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 1 describes the reserved keywords. Up to eight values or
reserved keywords can be entered separated by commas.
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 precedence value.
units
(Optional)
Units for the threshold values. Values can be:
bytes—bytes
gbytes—gigabytes
kbytes—kilobytes
mbytes—megabytes
ms—milliseconds
packets—packets
(default)
us—microseconds
Command Default
Default unit for
max-threshold
and
min-threshold
is
packets.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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 value of
the
units
argument is packets, packets are assumed to be 256 bytes in size.
Task ID
Task ID
Operations
qos
read,
write
Examples
This 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 policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)#random-detect precedence 3 1000000 2000000
Displays policy configuration information for 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 the appropriate configuration mode. To remove a
service policy from an input or output interface, use the
no form of
the command.
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.
account layer1
(Optional)
Turns on Layer 1 QoS accounting.
account nolayer2
(Optional)
Turns off Layer 2 QoS-specific accounting and enables Layer 3 QoS accounting.
Command Default
No service policy is
specified.
Command Modes
Interface configuration
Layer 2 transport configuration
Command History
Release
Modification
Release 3.6.0
The
command was supported in Layer 2 transport configuration mode.
Release 4.3.0
The
command was supported in dynamic template configuration mode in BNG.
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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. To apply a
new policy to an interface, you must remove the previous policy. A new policy
cannot replace an existing policy.
Task ID
Task ID
Operations
qos
read,
write
Examples
This example shows policy
map policy1 applied to Packet-over-SONET/SDH (POS) interface 0/2/0/0:
RP/0/RP0/CPU0:router(config)# class-map class1RP/0/RP0/CPU0:router(config-cmap)# match precedence ipv4 1RP/0/RP0/CPU0:router(config-cmap)# exitRP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# set precedence 2RP/0/RP0/CPU0:router(config-pmap)# exitRP/0/RP0/CPU0:router(config)# interface HundredGigE 0/7/0/0RP/0/RP0/CPU0:router(config-if)# service-policy output policy1
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
[ typeqos ]
policy-map-name
noservice-policy
[ typeqos ]
policy-map-name
Syntax Description
type qos
(Optional)
Specifies a QoS service policy.
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.
Command Default
No service policy is
specified.
Type is QoS when not
specified.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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 class
default of the parent policy-map. The new service policy using the preexisting
service policy is the parent policy.
The
service-policy
(policy-map class) command has these restrictions:
The
priority
command can be used in either the parent or the child policy, but not both
policies simultaneously.
Task ID
Task ID
Operations
qos
read,
write
Examples
This example shows
how to create a hierarchical service policy in the service policy called
parent:
RP/0/RP0/CPU0:router(config)# policy-map childRP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# priorityRP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# exitRP/0/RP0/CPU0:router(config)# policy-map parentRP/0/RP0/CPU0:router(config-pmap)# class class-defaultRP/0/RP0/CPU0:router(config-pmap-c)# shape average 10000000RP/0/RP0/CPU0:router(config-pmap-c)# service-policy child
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.
setcos [inner] cos-value
nosetcos [inner] cos-value
Syntax Description
inner
(Optional)
Specifies the inner CoS in, for example, a QinQ configuration.
cos-value
Specific
IEEE 802.1Q CoS value from 0 to 7.
Command Default
No Layer 2 CoS value
of an outgoing packet is set.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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.
For Layer 3, 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.
The
set cosinner command is supported on:
Egress only: conditional and
unconditional marking
Layer 2 main interfaces and
subinterfaces
Layer 3 main interfaces
Task ID
Task ID
Operations
qos
read,
write
Examples
In this example,
the policy map called cos-set is created to assign different CoS values for
different service classes, and then is attached to the output
HundredGigE subinterface
0/1/0/0.3 VLAN.
RP/0/RP0/CPU0:router(config)# policy-map cos-setRP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# set cos 1RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# class class2RP/0/RP0/CPU0:router(config-pmap-c)# set cos 2RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# exitRP/0/RP0/CPU0:router(config)# interface HundredGigE 0/1/0/0.3RP/0/RP0/CPU0:router(config-subif)# service-policy output cos-set
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.
setdiscard-classdiscard-class-value
nosetdiscard-classdiscard-class-value
Syntax Description
discard-class-value
Discard
class ID. An integer from 0 to 7, to be marked on the packet.
Command Default
No default behavior or values
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
The
set
discard-class command associates a discard class ID with a packet. After the
discard class
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 is 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
Marking of the
discard class
has only local significance on a node.
Task ID
Task ID
Operations
qos
read, write
Examples
This 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 cust1RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 1RP/0/RP0/CPU0:router(config-cmap)# exitRP/0/RP0/CPU0:router(config)# policy-map policy2RP/0/RP0/CPU0:router(config-pmap)# class cust1RP/0/RP0/CPU0:router(config-pmap-c)# set discard-class 5RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# exitRP/0/RP0/CPU0:router(config)# interface HundredGigE 0/1/0/0RP/0/RP0/CPU0:router(config-if)# service-policy input policy2
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.
setdscp [tunnel] dscp-value
nosetdscp [tunnel] dscp-value
Syntax Description
tunnel
(Optional) Sets the DSCP on the outer IP header for IPsec
tunnels.
dscp-value
Number from 0 to 63 that sets the DSCP value. Reserved
keywords can be specified instead of numeric values.
Table 1 describes the reserved keywords.
Command Default
No default behavior
or values
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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 the DSCP value at the edge of the network (or administrative domain); data
then is queued based on the DSCP value. Modified Deficit Round Robin (MDRR) can
speed up handling for high DSCP traffic at congestion points. Weighted Random
Early Detection (WRED) ensures that high DSCP traffic has lower loss rates than
other traffic during times of congestion.
Reserved keywords
can be specified instead of numeric values.
Table 1 describes the reserved keywords.
Task ID
Task ID
Operations
qos
read,
write
Examples
In this 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 policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# set dscp 8
Displays policy configuration information for all classes configured for all service policies on the specified 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.
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.
Command Default
No MPLS experimental
value is set
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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 queuing 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
This 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 class1RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv4 acl101RP/0/RP0/CPU0:router(config-cmap)# exitRP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# set mpls experimental 5RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# exitRP/0/RP0/CPU0:router(config)# interface HundredGigE 0/1/0/0RP/0/RP0/CPU0:router(config-if)# service-policyoutput policy1
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.
setprecedence [tunnel] value
nosetprecedence [tunnel] value
Syntax Description
tunnel
(Optional) Sets the IP precedence on the outer IP header. This
command is available on Layer 3 interfaces in the ingress direction.
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 1
describes the reserved keywords.
Command Default
No default behavior or values
Command Modes
Policy map class configuration
Command History
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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
This 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 class1RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv4 customer1RP/0/RP0/CPU0:router(config-cmap)# exitRP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# set precedence 5RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# exitRP/0/RP0/CPU0:router(config)# interface POS 0/1/0/0RP/0/RP0/CPU0:router(config-if)# service-policy output policy1
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 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.
setqos-groupqos-group-value
nosetqos-groupqos-group-value
Syntax Description
qos-group-value
QoS group
ID. An integer from 0 to 31, to be marked on the packet.
Command Default
No group ID is
specified.
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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
This example sets
the QoS group to 5 for packets that match the MPLS experimental bit 1:
RP/0/RP0/CPU0:router(config)# class-map class1RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 1RP/0/RP0/CPU0:router(config-cmap)# exitRP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# set qos-group 5RP/0/RP0/CPU0:router(config-pmap-c)# exitRP/0/RP0/CPU0:router(config-pmap)# exitRP/0/RP0/CPU0:router(config)# interface HundredGigE 0/1/0/0RP/0/RP0/CPU0:router(config-if)# service-policy input policy1
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.
shapeaverage
{ percentpercentage | rate [units] }
noshapeaverage
Syntax Description
percentpercentage
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)
Units for the bandwidth. Values can be:
bps—bits per
second (default)
gbps—gigabits
per second
kbps—kilobits
per second
mbps—megabits
per second
Command Default
units:
bps
Command Modes
Policy map class configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
For
shape average commands in the child policy,
the reference used for percentage parameters is relative to the maximum rate of
the parent. If shaping or policing is not configured on the parent, then the
parent inherits the interface rate.
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
This example sets
traffic shaping to 50
percent of the parent
shaper rate:
RP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# shape average percent 50
This example
shows how to set traffic shaping to
5,000,000
kbps:
RP/0/RP0/CPU0:router(config)# policy-map policy1RP/0/RP0/CPU0:router(config-pmap)# class class1RP/0/RP0/CPU0:router(config-pmap-c)# shape average 5000000 kbps
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
XR EXEC
mode.
Interface
type. For more information, use the question mark (?) online help function.
interface-path-id
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.
For more
information about the syntax for the router, use the question mark (?) online
help function.
input
(Optional)
Displays per class statistics on inbound traffic for the specified policy map
and interface.
output
(Optional)
Displays per class statistics on outbound traffic for the specified policy map
and interface.
Command Default
No default behavior
or values
Command Modes
XR EXEC
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
The
show policy-map
interface command displays the statistics for classes in the
service policy attached to an interface.
Task ID
Task ID
Operations
qos
read
Examples
The sample output shows how
to display policy statistics information for all classes on the Serial
interface 0/0/3/0/3:0 that are in the output direction:
(Optional)
Displays information about the interfaces on which policy maps are applied for
the specified location. The
node-id
argument is entered in the
rack/slot/module notation.
pmap-name
name
(Optional)
Displays information about the interfaces on which the specified policy map is
applied.
type qos
(Optional)
Displays information about the interfaces on which QoS policy maps are applied.
This is the default type.
Command Default
The default QoS
policy type is QoS.
Command Modes
XR EXEC
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
For a short period of time while a QoS policy is being modified,
no QoS policy is active on the interface. For these reasons, modify QoS
policies that affect the fewest number of interfaces at a time. Use the
show
policy-map targets command to identify the number of interfaces that will be
affected during policy map modification.
Task ID
Task ID
Operations
qos
read
Examples
In this example,
the Gigabit Ethernet interface 0/1/0/0 has one policy map attached as a main
policy. Outgoing traffic on this interface will be affected if the policy is
modified:
RP/0/RP0/CPU0:router# show policy-map targets
Fri Jul 16 16:38:24.789 DST
1) Policymap: policy1 Type: qos
Targets (applied as main policy):
GigabitEthernet0/1/0/0 output
Total targets: 1
Targets (applied as child policy):
Total targets: 0
Interface
type. For more information, use the question mark (?) online help function.
interface-path-id
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 (
RSP0RP0
or RP1)
and the module is CPU0. Example: interface MgmtEth0/RSP0RP1/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.
host-link
Specifies
the host-link.
locationnode-id
(Optional)
Displays detailed QoS information for the designated node. The
node-id argument is entered in the rack/slot/module notation.
Command Default
No default behavior
or values
Command Modes
XR EXEC
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
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
This is the sample output shows the L2VPN
QoS information on TenGigE 0/4/0/0/7 interface:
RP/0/RP0/CPU0:routershow qos interface TenGigE 0/4/0/0/7 output
Thu Sep 5 10:02:14.217 UTC
NOTE:- Configured values are displayed within parentheses
Interface TenGigE0/4/0/0/7 ifh 0x2000048 -- output policy
NPU Id: 0
Total number of classes: 8
Interface Bandwidth: 10000000 kbps
Accounting Type: Layer2 (Include Layer 2 encapsulation and above)
------------------------------------------------
Level1 Class = prec-1
Schedule entry ID = 0x32 (0x10001)
Egressq Queue ID = 50 (LP queue)
Queue Max. BW. = 100000 kbps (1 %)
Queue Min. BW. = 0 kbps (default)
Weight = 25 (BWR not configured)
Guaranteed service rate = 100000 kbps
TailDrop Threshold = 1250000 bytes / 100 ms (default)
Policer not configured for this class
WRED not configured for this class
Level1 Class (HP2) = prec-2
Schedule entry ID = 0x33 (0x10002)
Egressq Queue ID = 51 (HP2 queue)
Guaranteed service rate = 10000000 kbps
TailDrop Threshold = 12500000 bytes / 10 ms (default)
Policer Bucket Id = 0x9000100095103
Policer committed rate = 99968 kbps (1 %)
Policer conform burst = 124928 bytes (default)
Policer conform action = Just TX
Policer exceed action = DROP PKT
WRED not configured for this class
Level1 Class = prec-3
Schedule entry ID = 0x36 (0x10003)
Egressq Queue ID = 54 (LP queue)
Queue Max. BW. = 100000 kbps (1 %)
Queue Min. BW. = 100000 kbps (1 %)
Weight = 25 (BWR not configured)
Guaranteed service rate = 100000 kbps
TailDrop Threshold = 13750 bytes / 1 ms (1100 us)
Policer not configured for this class
WRED not configured for this class
Level1 Class = prec-5
Schedule entry ID = 0x37 (0x10004)
Egressq Queue ID = 55 (LP queue)
Queue Max. BW. = 100000 kbps (1 %)
Queue Min. BW. = 0 kbps (default)
Weight = 25 (BWR not configured)
Guaranteed service rate = 100000 kbps
TailDrop Threshold = 1250000 bytes / 100 ms (default)
Policer not configured for this class
WRED table handle = 0x0
RED profile
WRED Min. Threshold = 249856 bytes (20 ms)
WRED Max. Threshold = 374784 bytes (30 ms)
WRED First Segment = 1334
WRED Segment Size = 11
Level1 Class (HP1) = prec-6
Schedule entry ID = 0x3a (0x10005)
Egressq Queue ID = 58 (HP1 queue)
Guaranteed service rate = 10000000 kbps
TailDrop Threshold = 12500000 bytes / 10 ms (default)
Policer Bucket Id = 0x90001000a5103
Policer committed rate = 99968 kbps (1 %)
Policer conform burst = 124928 bytes (default)
Policer conform action = Just TX
Policer exceed action = DROP PKT
WRED not configured for this class
Level1 Class (HP1) = prec-7
Schedule entry ID = 0x3b (0x10006)
Egressq Queue ID = 59 (HP1 queue)
Guaranteed service rate = 10000000 kbps
TailDrop Threshold = 12500000 bytes / 10 ms (default)
Policer Bucket Id = 0x90001000b5103
Policer committed rate = 99968 kbps (1 %)
Policer conform burst = 124928 bytes (default)
Policer conform action = Just TX
Policer exceed action = DROP PKT
WRED not configured for this class
Level1 Class = prec-0
Egressq Queue ID = 62 (Default LP queue)
Policer Bucket Id = 0x90001000c5103
Policer committed rate = 99968 kbps (1 %)
Policer conform burst = 1245184 bytes (default)
Policer conform action = Just TX
Policer exceed action = DROP PKT
WRED not configured for this class
Level1 Class = class-default
Schedule entry ID = 0x3e (0x10008)
Egressq Queue ID = 62 (Default LP queue)
Queue Max. BW. = 100000 kbps (1 %)
Queue Min. BW. = 0 kbps (default)
Weight = 25 (BWR not configured)
Guaranteed service rate = 100000 kbps
TailDrop Threshold = 1250000 bytes / 100 ms (default)
Policer not configured for this class
WRED not configured for this class
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
{ drop | setoptions | transmit }
noviolate-action
{ drop | setoptions | transmit }
Syntax Description
drop
Drops the
packet.
transmit
Transmits
the packets.
Command Default
No default
behavior or values
Command Modes
Policy map police configuration
Command History
Release
Modification
Release 5.0.0
This command was introduced.
Usage Guidelines
To use this command,
you must be in a user group associated with a task group that includes
appropriate task IDs. If the user group assignment is preventing you from using
a command, contact your AAA administrator for assistance.
For more
information regarding the traffic policing feature refer to the
police rate command.
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 this example
for MPLS, traffic policing is configured to drop packets that violate the rate
limit: