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
Specific IEEE 802.1Q CoS value from 0 to 7.
cos-value
Command Default
No Layer 2 CoS value of an outgoing packet is set.
Command Modes
Policy map class configuration
Command History
Modification
Release
This command was introduced.
Release 6.1.2
Usage Guidelines
Use the
set cos
command to mark a packet that is being sent to a switch. Switches can leverage Layer 2
header information, including a CoS value marking.
The
set cos
command is supported only in the ingress direction. Only unconditional COS marking in the
ingress direction is supported.
Task ID
Operations
Task
ID
read,
write
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
Modular QoS Command Reference for Cisco NCS 5500 Series and Cisco NCS 540 Series Routers
29
QoS Classification Commands
set cos