Skip to content

QoS

QoS (Quality of Service) classification and marking configuration (type qos) identifies and treats traffic on ingress on NX-OS devices to prioritize critical applications and ensure predictable network performance. Class maps classify traffic based on DSCP, CoS and IP precedence values (or their negation) and access lists, and policy maps assign QoS groups, mark traffic with DSCP, CoS and IP precedence values and police it with configurable CIR/PIR rates, burst sizes and conform/exceed/violate actions. The QoS groups set here select the egress queues configured with Queuing policies and the no-drop and MTU classes configured with Network QoS policies. Global QoS settings enable or disable QoS statistics collection (qos statistics, qos qos-policies statistics) and resetting of the DEI bit (system default reset-dei); support for qos qos-policies statistics and system default reset-dei depends on the platform.

QoS (Quality of Service) configuration enables traffic classification, marking, policing, and queuing on NX-OS devices to prioritize critical applications and ensure predictable network performance. It provides a hierarchical policy framework with class maps for DSCP-based traffic classification, policy maps for marking and policing actions with configurable CIR/PIR rates and burst sizes, and queuing policy maps for egress queue scheduling with bandwidth allocation and priority levels. QoS supports system-wide output queuing policy assignment with optional per-policy statistics collection for monitoring traffic treatment across the device.

NameTypeConstraintMandatoryDefault Value
devicesListdevicesNo
device_groupsListdevice_groupsNo
globalClassglobalNo
templatesListtemplatesNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
qosClassqosNo
systemClasssystemNo

NameTypeConstraintMandatoryDefault Value
qosClassqosNo

NameTypeConstraintMandatoryDefault Value
class_mapsListclass_mapsNo
policy_mapsListpolicy_mapsNo
statisticsBooleantrue, falseNo
qos_policies_statisticsBooleantrue, falseNo

NameTypeConstraintMandatoryDefault Value
class_mapsListclass_mapsNo
policy_mapsListpolicy_mapsNo
queuing_policy_mapsListqueuing_policy_mapsNo
system_service_policy_queuing_outputStringNo
system_service_policy_queuing_output_statisticsBooleantrue, falseNo
network_class_mapsListnetwork_class_mapsNo
network_policy_mapsListnetwork_policy_mapsNo
system_service_policy_networkStringNo
system_service_policy_network_statisticsBooleantrue, falseNo

NameTypeConstraintMandatoryDefault Value
class_mapsListclass_mapsNo
policy_mapsListpolicy_mapsNo
queuing_policy_mapsListqueuing_policy_mapsNo
system_service_policy_queuing_outputStringNo
system_service_policy_queuing_output_statisticsBooleantrue, falseNo

NameTypeConstraintMandatoryDefault Value
default_reset_deiBooleantrue, falseNo

class_maps (nxos.devices.configuration.qos)

Section titled “class_maps (nxos.devices.configuration.qos)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
match_typeChoicematch-any, match-all, match-firstNo
match_dscp_valuesListInteger[min: 0, max: 63]No
match_not_dscp_valuesListInteger[min: 0, max: 63]No
match_cos_valuesListInteger[min: 0, max: 7]No
match_not_cos_valuesListInteger[min: 0, max: 7]No
match_precedence_valuesListChoice[routine, priority, immediate, flash, flash-override, critical, internet, network]No
match_not_precedence_valuesListChoice[routine, priority, immediate, flash, flash-override, critical, internet, network]No
match_access_group_namesListStringNo

class_maps (nxos.devices.configuration.qos)

Section titled “class_maps (nxos.devices.configuration.qos)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
match_typeChoicematch-any, match-all, match-firstNo
match_dscp_valuesListInteger[min: 0, max: 63]No

class_maps (nxos.devices.configuration.qos)

Section titled “class_maps (nxos.devices.configuration.qos)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
match_typeChoicematch-any, match-all, match-firstNo
match_dscp_valuesListStringNo

policy_maps (nxos.devices.configuration.qos)

Section titled “policy_maps (nxos.devices.configuration.qos)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
match_typeChoicematch-any, match-all, match-firstNo
classesListclassesNo

classes (nxos.devices.configuration.qos.policy_maps)

Section titled “classes (nxos.devices.configuration.qos.policy_maps)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
set_qos_groupIntegermin: 0, max: 7No
set_dscpIntegermin: 0, max: 63No
set_cosIntegermin: 0, max: 7No
set_precedenceChoiceroutine, priority, immediate, flash, flash-override, critical, internet, networkNo
set_precedence_tunnelBooleantrue, falseNo
set_dlb_modeChoiceflowlet, per-packetNo
policeClasspoliceNo

classes (nxos.devices.configuration.qos.policy_maps)

Section titled “classes (nxos.devices.configuration.qos.policy_maps)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
set_qos_groupIntegermin: 0, max: 7No
policeClasspoliceNo

police (nxos.devices.configuration.qos.policy_maps.classes)

Section titled “police (nxos.devices.configuration.qos.policy_maps.classes)”
NameTypeConstraintMandatoryDefault Value
cir_rateIntegermin: 0, max: 100000000000Yes
cir_unitChoicebps, kbps, mbps, gbps, pps, percentNo
bc_rateIntegermin: 0, max: 536870912No
bc_unitChoicebytes, kbytes, mbytes, ms, us, packetsNo
pir_rateIntegermin: 0, max: 100000000000No
pir_unitChoicebps, kbps, mbps, gbps, pps, percentNo
be_rateIntegermin: 0, max: 536870912No
be_unitChoicebytes, kbytes, mbytes, ms, us, packetsNo
conform_actionChoicetransmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmitNo
conform_set_cosIntegermin: 0, max: 7No
conform_set_dscpIntegermin: 0, max: 63No
conform_set_precedenceChoiceroutine, priority, immediate, flash, flash-override, critical, internet, networkNo
conform_set_qos_groupIntegermin: 0, max: 7No
exceed_actionChoicetransmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmitNo
exceed_set_cosIntegermin: 0, max: 7No
exceed_set_dscpIntegermin: 0, max: 63No
exceed_set_precedenceChoiceroutine, priority, immediate, flash, flash-override, critical, internet, networkNo
exceed_set_qos_groupIntegermin: 0, max: 7No
violate_actionChoicetransmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmitNo
violate_set_cosIntegermin: 0, max: 7No
violate_set_dscpIntegermin: 0, max: 63No
violate_set_precedenceChoiceroutine, priority, immediate, flash, flash-override, critical, internet, networkNo
violate_set_qos_groupIntegermin: 0, max: 7No

police (nxos.devices.configuration.qos.policy_maps.classes)

Section titled “police (nxos.devices.configuration.qos.policy_maps.classes)”
NameTypeConstraintMandatoryDefault Value
cir_rateIntegermin: 0, max: 100000000000Yes
cir_unitChoiceunspecified, bps, kbps, mbps, gbps, pps, pctNo
bc_rateIntegermin: 0, max: 536870912No
bc_unitChoiceunspecified, bytes, kbytes, mbytes, ms, us, packetsNo
pir_rateIntegermin: 0, max: 100000000000No
pir_unitChoiceunspecified, bps, kbps, mbps, gbps, pps, pctNo
be_rateIntegermin: 0, max: 536870912No
be_unitChoiceunspecified, bytes, kbytes, mbytes, ms, us, packetsNo
conform_actionChoiceunspecified, transmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmitNo
conform_set_cosIntegermin: 0, max: 7No
conform_set_dscpAnyInteger[min: 0, max: 63] or Choice[default, ef, af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7] or String[Regex: ^.*[\$\%]\{.*$]No
conform_set_precedenceChoiceroutine, priority, immediate, flash, flash-override, critical, internet, networkNo
conform_set_qos_groupIntegermin: 0, max: 7No
exceed_actionChoiceunspecified, transmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmitNo
exceed_set_cosIntegermin: 0, max: 7No
exceed_set_dscpAnyInteger[min: 0, max: 63] or Choice[default, ef, af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7] or String[Regex: ^.*[\$\%]\{.*$]No
exceed_set_precedenceChoiceroutine, priority, immediate, flash, flash-override, critical, internet, networkNo
exceed_set_qos_groupIntegermin: 0, max: 7No
violate_actionChoiceunspecified, transmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmitNo
violate_set_cosIntegermin: 0, max: 7No
violate_set_dscpAnyInteger[min: 0, max: 63] or Choice[default, ef, af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7] or String[Regex: ^.*[\$\%]\{.*$]No
violate_set_precedenceChoiceroutine, priority, immediate, flash, flash-override, critical, internet, networkNo
violate_set_qos_groupIntegermin: 0, max: 7No

queuing_policy_maps (nxos.devices.configuration.qos)

Section titled “queuing_policy_maps (nxos.devices.configuration.qos)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
match_typeChoicematch-any, match-all, match-firstNo
classesListclassesNo

network_class_maps (nxos.devices.configuration.qos)

Section titled “network_class_maps (nxos.devices.configuration.qos)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
match_typeChoicematch-any, match-all, match-firstNo
match_cos_valuesListInteger[min: 0, max: 7]No

network_policy_maps (nxos.devices.configuration.qos)

Section titled “network_policy_maps (nxos.devices.configuration.qos)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
match_typeChoicematch-any, match-all, match-firstNo
classesListclassesNo

classes (nxos.devices.configuration.qos.queuing_policy_maps)

Section titled “classes (nxos.devices.configuration.qos.queuing_policy_maps)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
priority_levelIntegermin: 1, max: 8No
bandwidth_remaining_percentIntegermin: 0, max: 100No

classes (nxos.devices.configuration.qos.queuing_policy_maps)

Section titled “classes (nxos.devices.configuration.qos.queuing_policy_maps)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
next_class_mapStringNo
previous_class_mapStringNo
priority_levelIntegermin: 1, max: 8No
bandwidth_remaining_percentIntegermin: 0, max: 100No

classes (nxos.devices.configuration.qos.network_policy_maps)

Section titled “classes (nxos.devices.configuration.qos.network_policy_maps)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
mtuIntegermin: 576, max: 9216No
no_dropBooleantrue, falseNo
pause_pfc_cosListInteger[min: 0, max: 7]No
pause_receiveBooleantrue, falseNo
pause_buffer_sizeIntegermin: 5000, max: 268435456No
pause_headroomIntegermin: 0, max: 268435456No
pause_dynamicIntegermin: 0, max: 255No
pause_thresholdIntegermin: 0, max: 268435456No
pause_resume_thresholdIntegermin: 0, max: 268435456No
pause_resume_offsetIntegermin: 0, max: 268435456No

Example 1: Class maps for DSCP-based traffic classification in a data center fabric

nxos:
devices:
- name: LEAF1
configuration:
qos:
class_maps:
- name: CM-VOICE
match_type: match-any
match_dscp_values:
- 46
- name: CM-CRITICAL-DATA
match_type: match-any
match_dscp_values:
- 26
- 28
- name: CM-NETWORK-CONTROL
match_type: match-any
match_dscp_values:
- 48
- 56

Example 2: Policy map with QoS group marking and policing for ingress classification

nxos:
devices:
- name: LEAF1
configuration:
qos:
class_maps:
- name: CM-VOICE
match_type: match-any
match_dscp_values:
- 46
- name: CM-CRITICAL-DATA
match_type: match-any
match_dscp_values:
- 26
policy_maps:
- name: PM-FABRIC-INGRESS
match_type: match-first
classes:
- name: CM-VOICE
set_qos_group: 1
- name: CM-CRITICAL-DATA
set_qos_group: 2
police:
cir_rate: 500
cir_unit: mbps
bc_rate: 250
bc_unit: kbytes
conform_action: transmit
exceed_action: set-dscp-transmit
exceed_set_dscp: 0

Example 3: Classification on CoS, IP precedence and access lists with DSCP, CoS and precedence marking at the network edge

nxos:
devices:
- name: LEAF1
configuration:
ip_access_lists:
- name: ACL-VOICE-SERVERS
entries:
- sequence_number: 10
action: permit
protocol: ip
source:
prefix: 10.10.50.0
prefix_length: 24
destination:
prefix: any
qos:
class_maps:
- name: CM-VOICE
match_type: match-any
match_cos_values:
- 5
match_access_group_names:
- ACL-VOICE-SERVERS
- name: CM-PRIORITY
match_type: match-all
match_precedence_values:
- flash
- flash-override
match_not_dscp_values:
- 46
- name: CM-BEST-EFFORT
match_type: match-all
match_not_cos_values:
- 5
- 6
- 7
match_not_precedence_values:
- internet
- network
policy_maps:
- name: PM-EDGE-MARKING
match_type: match-first
classes:
- name: CM-VOICE
set_qos_group: 1
set_dscp: 46
set_cos: 5
- name: CM-PRIORITY
set_qos_group: 2
set_precedence: flash
- name: CM-BEST-EFFORT
set_dscp: 0
set_precedence: routine
set_precedence_tunnel: true

Example 4: Full QoS configuration with class maps, policy maps, queuing, and system policy

nxos:
devices:
- name: SPINE1
configuration:
qos:
system_service_policy_queuing_output: QM-FABRIC-EGRESS
system_service_policy_queuing_output_statistics: true
class_maps:
- name: CM-VOICE
match_type: match-any
match_dscp_values:
- 46
- name: CM-SIGNALING
match_type: match-any
match_dscp_values:
- 24
- 26
- name: CM-NETWORK-CONTROL
match_type: match-any
match_dscp_values:
- 48
- 56
policy_maps:
- name: PM-SPINE-INGRESS
match_type: match-first
classes:
- name: CM-VOICE
set_qos_group: 1
- name: CM-SIGNALING
set_qos_group: 2
police:
cir_rate: 1
cir_unit: gbps
pir_rate: 2
pir_unit: gbps
conform_action: transmit
exceed_action: set-dscp-transmit
exceed_set_dscp: 0
violate_action: drop
- name: CM-NETWORK-CONTROL
set_qos_group: 7
queuing_policy_maps:
- name: QM-FABRIC-EGRESS
match_type: match-first
classes:
- name: c-out-q1
priority_level: 1
- name: c-out-q2
bandwidth_remaining_percent: 30
- name: c-out-q-default
bandwidth_remaining_percent: 70

Example 5: Global QoS settings with QoS statistics disabled (no qos statistics) and DEI bit reset (system default reset-dei)

nxos:
devices:
- name: LEAF1
configuration:
qos:
statistics: false
qos_policies_statistics: true
system:
default_reset_dei: true

Example 6: Policy-driven dynamic load balancing (DLB) with per-packet spraying for RoCEv2 traffic (set dlb mode {flowlet | per-packet}). The mode must match the global hardware profile dlb > mode policy-driven ... setting.

nxos:
devices:
- name: LEAF1
configuration:
qos:
class_maps:
- name: CM-ROCE
match_type: match-all
match_dscp_values:
- 26
policy_maps:
- name: PM-DLB
classes:
- name: CM-ROCE
set_dlb_mode: per-packet
system:
hardware_profile:
dlb:
enabled: true
dlb_interface_all: true
mode: policy-driven-mixed-default-ecmp

Example 1: Class maps for DSCP-based traffic classification in a data center fabric

nxos:
devices:
- name: LEAF1
configuration:
qos:
class_maps:
- name: CM-VOICE
match_type: match-any
match_dscp_values:
- 46
- name: CM-CRITICAL-DATA
match_type: match-any
match_dscp_values:
- 26
- 28
- name: CM-NETWORK-CONTROL
match_type: match-any
match_dscp_values:
- 48
- 56

Example 2: Policy map with QoS group marking and policing for ingress classification

nxos:
devices:
- name: LEAF1
configuration:
qos:
class_maps:
- name: CM-VOICE
match_type: match-any
match_dscp_values:
- 46
- name: CM-CRITICAL-DATA
match_type: match-any
match_dscp_values:
- 26
policy_maps:
- name: PM-FABRIC-INGRESS
match_type: match-first
classes:
- name: CM-VOICE
set_qos_group: 1
- name: CM-CRITICAL-DATA
set_qos_group: 2
police:
cir_rate: 500
cir_unit: mbps
bc_rate: 250
bc_unit: kbytes
conform_action: transmit
exceed_action: set-dscp-transmit
exceed_set_dscp: 0

Example 3: Full QoS configuration with class maps, policy maps, queuing, and system policy

nxos:
devices:
- name: SPINE1
configuration:
qos:
system_service_policy_queuing_output: QM-FABRIC-EGRESS
system_service_policy_queuing_output_statistics: true
class_maps:
- name: CM-VOICE
match_type: match-any
match_dscp_values:
- 46
- name: CM-SIGNALING
match_type: match-any
match_dscp_values:
- 24
- 26
- name: CM-NETWORK-CONTROL
match_type: match-any
match_dscp_values:
- 48
- 56
policy_maps:
- name: PM-SPINE-INGRESS
match_type: match-first
classes:
- name: CM-VOICE
set_qos_group: 1
- name: CM-SIGNALING
set_qos_group: 2
police:
cir_rate: 1
cir_unit: gbps
pir_rate: 2
pir_unit: gbps
conform_action: transmit
exceed_action: set-dscp-transmit
exceed_set_dscp: 0
violate_action: drop
- name: CM-NETWORK-CONTROL
set_qos_group: 7
queuing_policy_maps:
- name: QM-FABRIC-EGRESS
match_type: match-first
classes:
- name: c-out-q1
priority_level: 1
- name: c-out-q2
bandwidth_remaining_percent: 30
- name: c-out-q-default
bandwidth_remaining_percent: 70

Example 4: Network QoS with class maps for CoS classification, policy map with MTU and PFC pause settings

nxos:
devices:
- name: LEAF1
configuration:
qos:
network_class_maps:
- name: c-nq-voice
match_type: match-any
match_cos_values:
- 4
- 5
- name: c-nq-storage
match_type: match-any
match_cos_values:
- 3
network_policy_maps:
- name: p-nq-fabric
match_type: match-first
classes:
- name: c-nq-voice
mtu: 1500
- name: c-nq-storage
mtu: 9216
no_drop: true
pause_pfc_cos:
- 3
system_service_policy_network: p-nq-fabric
system_service_policy_network_statistics: true

Example 1: Class maps for DSCP-based traffic classification in a data center fabric

nxos:
devices:
- name: LEAF1
configuration:
qos:
class_maps:
- name: CM-VOICE
match_type: match-any
match_dscp_values:
- ef
- name: CM-CRITICAL-DATA
match_type: match-any
match_dscp_values:
- af31
- af32
- name: CM-NETWORK-CONTROL
match_type: match-any
match_dscp_values:
- cs6
- cs7

Example 2: Policy map with QoS group marking and policing for ingress classification

nxos:
devices:
- name: LEAF1
configuration:
qos:
class_maps:
- name: CM-VOICE
match_type: match-any
match_dscp_values:
- ef
- name: CM-CRITICAL-DATA
match_type: match-any
match_dscp_values:
- af31
policy_maps:
- name: PM-FABRIC-INGRESS
match_type: match-first
classes:
- name: CM-VOICE
set_qos_group: 1
- name: CM-CRITICAL-DATA
set_qos_group: 2
police:
cir_rate: 500
cir_unit: mbps
bc_rate: 250
bc_unit: kbytes
conform_action: transmit
exceed_action: set-dscp-transmit
exceed_set_dscp: 0

Example 3: Full QoS configuration with class maps, policy maps, queuing, and system policy

nxos:
devices:
- name: SPINE1
configuration:
qos:
system_service_policy_queuing_output: QM-FABRIC-EGRESS
system_service_policy_queuing_output_statistics: true
class_maps:
- name: CM-VOICE
match_type: match-any
match_dscp_values:
- ef
- name: CM-SIGNALING
match_type: match-any
match_dscp_values:
- cs3
- af31
- name: CM-NETWORK-CONTROL
match_type: match-any
match_dscp_values:
- cs6
- cs7
policy_maps:
- name: PM-SPINE-INGRESS
match_type: match-first
classes:
- name: CM-VOICE
set_qos_group: 1
- name: CM-SIGNALING
set_qos_group: 2
police:
cir_rate: 1
cir_unit: gbps
pir_rate: 2
pir_unit: gbps
conform_action: transmit
exceed_action: set-dscp-transmit
exceed_set_dscp: 0
violate_action: drop
- name: CM-NETWORK-CONTROL
set_qos_group: 7
queuing_policy_maps:
- name: QM-FABRIC-EGRESS
match_type: match-first
classes:
- name: c-out-q1
priority_level: 1
- name: c-out-q2
bandwidth_remaining_percent: 30
- name: c-out-q-default
bandwidth_remaining_percent: 70