match cos
To identify specified class of service (CoS) values as a match criteria in a class map, use the
match cos
command in class map configuration mode. To remove a specified CoS class value from the matching criteria
for a class map, use the
no
form of this command.
match cos
{
cos-value
[
cos-value1
...
cos-value7
]}
no match cos
{
cos-value
[
cos-value1
...
cos-value7
]}
Syntax Description
Identifier that specifies the exact value from 0 to 7. Up to eight CoS identifiers can be specified
to match packets.
cos-value
Command Default
No match criteria are specified.
Command Modes
Class map configuration
Command History
Modification
Release
This command was introduced.
Release 6.1.2
Usage Guidelines
The
match cos
command is supported only in the ingress direction.
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.
Task ID
Operations
Task
ID
read,
write
qos
Examples
This example shows how to configure the service policy called policy-in and attach service policy
policy-in to an interface HundredGigE 0/0/0/3. In this example, class map cos146 evaluates all
packets of service values of 1, 4, or 6. If the incoming packet has been marked with any of these CoS
values, the traffic is policed at 300 mbps.
RP/0/RP0/CPU0:router(config)#
class-map cos146
RP/0/RP0/CPU0:router(config-cmap)#
match cos 1 4 6
RP/0/RP0/CPU0:router(config-cmap)#
exit
RP/0/RP0/CPU0:router(config)#
policy-map policy-in
RP/0/RP0/CPU0:router(config-pmap)#
class cos146
RP/0/RP0/CPU0:router(config-pmap-c)#
police rate 300 mbps
RP/0/RP0/CPU0:router(config-pmap-police)#
exit
RP/0/RP0/CPU0:router(config-pmap-c)#
exit
RP/0/RP0/CPU0:router(config-pmap)#
exit
Modular QoS Command Reference for Cisco NCS 5500 Series and Cisco NCS 540 Series Routers
13
QoS Classification Commands
match cos