QoS Classification Commands
set cos
To set the Layer 2 class of service (CoS) value of an outgoing packet, use the set cos command in policy
map class configuration mode. To remove a specific CoS value setting, use the no form of this command.
set cos cos-value
no set cos cos-value
Syntax Description
cos-value
No Layer 2 CoS value of an outgoing packet is set.
Command Default
Policy map class configuration
Command Modes
Command History
Release
Release 6.1.2
Use the set cos command to mark a packet that is being sent to a switch. Switches can leverage Layer 2
Usage Guidelines
header information, including a CoS value marking.
The set cos command is supported only in the ingress direction. Only unconditional COS marking in the
ingress direction is supported.
Task ID
Task
ID
qos
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 interface HundredGigE 0/0/0/3.
RP/0/RP0/CPU0:router(config)# policy-map cos-set
RP/0/RP0/CPU0:router(config-pmap)# class class1...
RP/0/RP0/CPU0:router(config-pmap-c)# set cos 1
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# class class2...
RP/0/RP0/CPU0:router(config-pmap-c)#set cos 2
RP/0/RP0/CPU0:router(config-pmap-c)#exit
RP/0/RP0/CPU0:router(config-pmap)# interface HundredGigE 0/0/0/3
RP/0/RP0/CPU0:router(config-if)# service-policy input cos-set
Specific IEEE 802.1Q CoS value from 0 to 7.
Operations
read,
write
Modular QoS Command Reference for Cisco NCS 5500 Series and Cisco NCS 540 Series Routers
set cos
Modification
This command was introduced.
29