- Preface
- New and Changed Information
- Overview
- Using Modular QoS CLI
- Configuring QoS TCAM Carving
- Configuring Classification
- Configuring Marking
- Configuring Policing
- Configuring Queuing and Scheduling
- Configuring Network QoS
- Configuring Link Level Flow Control
- Configuring Priority Flow Control
- Monitoring QoS Statistics
- Micro-Burst Monitoring
- FEX QoS Configuration
- Additional References
- Index
Configuring Marking
- About Marking
- Licensing Requirements for Marking
- Prerequisites for Marking
- Guidelines and Limitations
- Configuring Marking
- Verifying the Marking Configuration
- Configuration Examples for Marking
About Marking
Marking is a method that you use to modify the QoS fields of the incoming and outgoing packets. The QoS fields that you can mark are IP precedence and differentiated services code point (DSCP) in Layer 3. The QoS group is a label local to the system to which you can assign intermediate marking values. You can use the QoS group label to determine the egress scheduling.
You can use marking commands in traffic classes that are referenced in a policy map. The marking features that you can configure are listed in the following table:
|
Marking Feature |
Description |
||
|---|---|---|---|
|
DSCP |
Layer 3 DSCP. |
||
|
IP precedence |
Layer 3 IP precedence.
|
||
|
QoS group |
Locally significant QoS values that can be manipulated and matched within the system. The range is from 0 to 3. |
||
|
Ingress |
Status of the marking applies to incoming packets. |
||
|
CoS |
Layer 2 VLAN ID |
Licensing Requirements for Marking
The following table shows the licensing requirements for this feature:
|
Product |
License Requirement |
|---|---|
|
Cisco NX-OS |
The QoS feature does not a require license. Any feature not included in a license package is bundled with the NX-OS image and is provided at no extra charge to you. For a complete explanation of the Cisco NX-OS licensing scheme, see the Cisco NX-OS Licensing Guide. |
Prerequisites for Marking
Classification has the following prerequisites:
Guidelines and Limitations
Marking has the following configuration guidelines and limitations:
-
The set qos-group command can only be used in ingress policies.
-
FEX host interfaces (HIF) are supported by the FEX QoS policy.
-
QoS TCAM carving is supported on ALE (Application Leaf Engine) enabled switches.
-
The FEX QoS policy supports only the set qos-group command. Other marking commands are not supported.

Note
set qos-group 0 is reserved for class default. It cannot be configured in user defined classes.
-
Match on QoS-group is supported.
-
-
Interface level egress QoS policies must be applied on 100G ports for egress packet scheduling.
-
When egress QoS policies are not specifically configured for a 100G port, all egress packet traffic goes through the default queue (Qos-group 0).
Configuring Marking
You can combine one or more of the marking features in a policy map to control the setting of QoS values. You can then apply policies to either incoming or outgoing packets on an interface.
![]() Note | Do not press Enter after you use the set command and before you add the rest of the command. If you press Enter directly after entering the set keyword, you will be unable to continue to configure with the QoS configuration. |
- Configuring DSCP Marking
- Configuring IP Precedence Marking
- Configuring CoS Marking
- Configuring CoS Marking for FEX
- Configuring Ingress Marking
- Configuring DSCP Port Marking
Configuring DSCP Marking
You can set the DSCP value in the six most significant bits of the DiffServ field of the IP header to a specified value. You can enter numeric values from 0 to 60, in addition to the standard DSCP values shown in the following table.
|
Value |
List of DSCP Values |
|---|---|
|
af11 |
AF11 dscp (001010)—decimal value 10 |
|
af12 |
AF12 dscp (001100)—decimal value 12 |
|
af13 |
AF13 dscp (001110)—decimal value 14 |
|
af21 |
AF21 dscp (010010)—decimal value 18 |
|
af22 |
AF22 dscp (010100)—decimal value 20 |
|
af23 |
AF23 dscp (010110)—decimal value 22 |
|
af31 |
AF31 dscp (011010)—decimal value 26 |
|
af32 |
AF40 dscp (011100)—decimal value 28 |
|
af33 |
AF33 dscp (011110)—decimal value 30 |
|
af41 |
AF41 dscp (100010)—decimal value 34 |
|
af42 |
AF42 dscp (100100)—decimal value 36 |
|
af43 |
AF43 dscp (100110)—decimal value 38 |
|
cs1 |
CS1 (precedence 1) dscp (001000)—decimal value 8 |
|
cs2 |
CS2 (precedence 2) dscp (010000)—decimal value 16 |
|
cs3 |
CS3 (precedence 3) dscp (011000)—decimal value 24 |
|
cs4 |
CS4 (precedence 4) dscp (100000)—decimal value 32 |
|
cs5 |
CS5 (precedence 5) dscp (101000)—decimal value 40 |
|
cs6 |
CS6 (precedence 6) dscp (110000)—decimal value 48 |
|
cs7 |
CS7 (precedence 7) dscp (111000)—decimal value 56 |
|
default |
Default dscp (000000)—decimal value 0 |
|
ef |
EF dscp (101110)—decimal value 46 |
![]() Note | For more information about DSCP, see RFC 2475. |
1.
configure terminal
2.
policy-map [type qos] [match-first]
policy-map-name
3.
class [type qos] {class-name |
class-default} [insert-before
before-class-name]
4.
set dscp
dscp-value
DETAILED STEPS
This example shows how to display the policy-map configuration:
switch# show policy-map policy1
Configuring IP Precedence Marking
You can set the value of the IP precedence field in bits 0–2 of the IPv4 type of service (ToS) field of the IP header.
![]() Note | The device rewrites the last 3 bits of the ToS field to 0 for packets that match this class. |
|
Value |
List of Precedence Values |
|---|---|
|
0-7 |
IP precedence value |
|
critical |
Critical precedence (5) |
|
flash |
Flash precedence (3) |
|
flash-override |
Flash override precedence (4) |
|
immediate |
Immediate precedence (2) |
|
internet |
Internetwork control precedence (6) |
|
network |
Network control precedence (7) |
|
priority |
Priority precedence (1) |
|
routine |
Routine precedence (0) |
1.
configure terminal
2.
policy-map [type qos] [match-first]
policy-map-name
3.
class [type qos] {class-name |
class-default} [insert-before
before-class-name]
4.
set precedence
precedence-value
DETAILED STEPS
This example shows how to display the policy-map configuration:
switch# show policy-map policy1
Configuring CoS Marking
You can set the value of the CoS field in the high-order three bits of the VLAN ID Tag field in the IEEE 802.1Q header.
1.
configure terminal
2.
policy-map [type qos] [match-first] [qos-policy-map-name |
qos-dynamic]
3.
class [type qos] {class-map-name |
class-default} [insert-before
before-class-name]
4.
set cos
cos-value
DETAILED STEPS
This example shows how to display the policy-map configuration:
switch# show policy-map policy1
Configuring CoS Marking for FEX
You can mark traffic based on the class of service (CoS) for a FEX.
Before configuring the FEX, enable feature-set fex.
1.
configure terminal
2.
policy-map [type qos] [match-first] [qos-policy-map-name |
qos-dynamic]
3.
class [type qos] {class-map-name |
class-default} [insert-before
before-class-name]
DETAILED STEPS
This example shows how to configure the CoS class-map configuration:
switch# conf t switch(config)# policy-map type qos setpol switch(config-pmap-qos)# class cos6 switch(config-pmap-c-qos)# set qos-group 3 switch(config-pmap-qos)# class cos3 switch(config-pmap-c-qos)# set qos-group 2 switch(config-pmap-qos)# class cos1 switch(config-pmap-c-qos)# set qos-group 1 switch(config-pmap-qos)# class class-default
Configuring Ingress Marking
You can apply the marking instructions in a QoS policy map to ingress packets by attaching that QoS policy map to an interface. To select ingress, you specify the input keyword in the service-policy command.
For more information, see the “Attaching and Detaching a QoS Policy Action” section.
Configuring DSCP Port Marking
You can set the DSCP value for each class of traffic defined in a specified ingress policy map.
The default behavior of the device is to preserve the DSCP value or to trust DSCP. To make the port untrusted, change the DSCP value. Unless you configure a QoS policy and attach that policy to specified interfaces, the DSCP value is preserved.
![]() Note |
|
1.
configure terminal
2.
policy-map [type qos] [match-first] [policy-map-name]
3.
class [type qos] {class-name |
class-default} [insert-before
before-class-name]
4.
set
dscp-value
5.
exit
6.
class [type qos] {class-name |
class-default} [insert-before
before-class-name]
7.
set
dscp-value
8.
exit
9.
class [type qos] {class-name |
class-default} [insert-before
before-class-name]
10.
set
dscp-value
11.
exit
12.
interface ethernet
slot/port
13.
service-policy [type qos] {input |
output} {policy-map-name} [no-stats]
DETAILED STEPS
This example shows how to display the policy-map configuration:
switch# show policy-map policy1
Verifying the Marking Configuration
To display the marking configuration information, perform one of the following tasks:
|
Command |
Purpose |
|---|---|
|
show policy-map |
Displays all policy maps. |
Configuration Examples for Marking
The following example shows how to configure marking:
configure terminal policy-map type qos untrust_dcsp class class-default set precedence 3 set qos-qroup 3 set dscp 0
Feedback