QoS
NX-OSQoS (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.
Diagram
Section titled “Diagram”Diagram
Section titled “Diagram”Diagram
Section titled “Diagram”Classes
Section titled “Classes”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| devices | List | devices | No | |
| device_groups | List | device_groups | No | |
| global | Class | global | No | |
| templates | List | templates | No |
devices (nxos)
Section titled “devices (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
device_groups (nxos)
Section titled “device_groups (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
global (nxos)
Section titled “global (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
templates (nxos)
Section titled “templates (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
configuration (nxos.devices)
Section titled “configuration (nxos.devices)”configuration (nxos.devices)
Section titled “configuration (nxos.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| qos | Class | qos | No |
qos (nxos.devices.configuration)
Section titled “qos (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| class_maps | List | class_maps | No | |
| policy_maps | List | policy_maps | No | |
| statistics | Boolean | true, false | No | |
| qos_ | Boolean | true, false | No |
qos (nxos.devices.configuration)
Section titled “qos (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| class_maps | List | class_maps | No | |
| policy_maps | List | policy_maps | No | |
| queuing_ | List | queuing_ | No | |
| system_ | String | No | ||
| system_ | Boolean | true, false | No | |
| network_ | List | network_ | No | |
| network_ | List | network_ | No | |
| system_ | String | No | ||
| system_ | Boolean | true, false | No |
qos (nxos.devices.configuration)
Section titled “qos (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| class_maps | List | class_maps | No | |
| policy_maps | List | policy_maps | No | |
| queuing_ | List | queuing_ | No | |
| system_ | String | No | ||
| system_ | Boolean | true, false | No |
system (nxos.devices.configuration)
Section titled “system (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| default_ | Boolean | true, false | No |
class_maps (nxos.devices.configuration.qos)
Section titled “class_maps (nxos.devices.configuration.qos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| match_type | Choice | match-any, match-all, match-first | No | |
| match_ | List | Integer[min: 0, max: 63] | No | |
| match_ | List | Integer[min: 0, max: 63] | No | |
| match_ | List | Integer[min: 0, max: 7] | No | |
| match_ | List | Integer[min: 0, max: 7] | No | |
| match_ | List | Choice[routine, priority, immediate, flash, flash-override, critical, internet, network] | No | |
| match_ | List | Choice[routine, priority, immediate, flash, flash-override, critical, internet, network] | No | |
| match_ | List | String | No |
class_maps (nxos.devices.configuration.qos)
Section titled “class_maps (nxos.devices.configuration.qos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| match_type | Choice | match-any, match-all, match-first | No | |
| match_ | List | Integer[min: 0, max: 63] | No |
class_maps (nxos.devices.configuration.qos)
Section titled “class_maps (nxos.devices.configuration.qos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| match_type | Choice | match-any, match-all, match-first | No | |
| match_ | List | String | No |
policy_maps (nxos.devices.configuration.qos)
Section titled “policy_maps (nxos.devices.configuration.qos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| match_type | Choice | match-any, match-all, match-first | No | |
| classes | List | classes | No |
classes (nxos.devices.configuration.qos.policy_maps)
Section titled “classes (nxos.devices.configuration.qos.policy_maps)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| set_qos_group | Integer | min: 0, max: 7 | No | |
| set_dscp | Integer | min: 0, max: 63 | No | |
| set_cos | Integer | min: 0, max: 7 | No | |
| set_precedence | Choice | routine, priority, immediate, flash, flash-override, critical, internet, network | No | |
| set_ | Boolean | true, false | No | |
| set_dlb_mode | Choice | flowlet, per-packet | No | |
| police | Class | police | No |
classes (nxos.devices.configuration.qos.policy_maps)
Section titled “classes (nxos.devices.configuration.qos.policy_maps)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| set_qos_group | Integer | min: 0, max: 7 | No | |
| police | Class | police | No |
police (nxos.devices.configuration.qos.policy_maps.classes)
Section titled “police (nxos.devices.configuration.qos.policy_maps.classes)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| cir_rate | Integer | min: 0, max: 100000000000 | Yes | |
| cir_unit | Choice | bps, kbps, mbps, gbps, pps, percent | No | |
| bc_rate | Integer | min: 0, max: 536870912 | No | |
| bc_unit | Choice | bytes, kbytes, mbytes, ms, us, packets | No | |
| pir_rate | Integer | min: 0, max: 100000000000 | No | |
| pir_unit | Choice | bps, kbps, mbps, gbps, pps, percent | No | |
| be_rate | Integer | min: 0, max: 536870912 | No | |
| be_unit | Choice | bytes, kbytes, mbytes, ms, us, packets | No | |
| conform_action | Choice | transmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmit | No | |
| conform_set_cos | Integer | min: 0, max: 7 | No | |
| conform_ | Integer | min: 0, max: 63 | No | |
| conform_ | Choice | routine, priority, immediate, flash, flash-override, critical, internet, network | No | |
| conform_ | Integer | min: 0, max: 7 | No | |
| exceed_action | Choice | transmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmit | No | |
| exceed_set_cos | Integer | min: 0, max: 7 | No | |
| exceed_set_dscp | Integer | min: 0, max: 63 | No | |
| exceed_ | Choice | routine, priority, immediate, flash, flash-override, critical, internet, network | No | |
| exceed_ | Integer | min: 0, max: 7 | No | |
| violate_action | Choice | transmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmit | No | |
| violate_set_cos | Integer | min: 0, max: 7 | No | |
| violate_ | Integer | min: 0, max: 63 | No | |
| violate_ | Choice | routine, priority, immediate, flash, flash-override, critical, internet, network | No | |
| violate_ | Integer | min: 0, max: 7 | No |
police (nxos.devices.configuration.qos.policy_maps.classes)
Section titled “police (nxos.devices.configuration.qos.policy_maps.classes)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| cir_rate | Integer | min: 0, max: 100000000000 | Yes | |
| cir_unit | Choice | unspecified, bps, kbps, mbps, gbps, pps, pct | No | |
| bc_rate | Integer | min: 0, max: 536870912 | No | |
| bc_unit | Choice | unspecified, bytes, kbytes, mbytes, ms, us, packets | No | |
| pir_rate | Integer | min: 0, max: 100000000000 | No | |
| pir_unit | Choice | unspecified, bps, kbps, mbps, gbps, pps, pct | No | |
| be_rate | Integer | min: 0, max: 536870912 | No | |
| be_unit | Choice | unspecified, bytes, kbytes, mbytes, ms, us, packets | No | |
| conform_action | Choice | unspecified, transmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmit | No | |
| conform_set_cos | Integer | min: 0, max: 7 | No | |
| conform_ | Any | Integer[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_ | Choice | routine, priority, immediate, flash, flash-override, critical, internet, network | No | |
| conform_ | Integer | min: 0, max: 7 | No | |
| exceed_action | Choice | unspecified, transmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmit | No | |
| exceed_set_cos | Integer | min: 0, max: 7 | No | |
| exceed_set_dscp | Any | Integer[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_ | Choice | routine, priority, immediate, flash, flash-override, critical, internet, network | No | |
| exceed_ | Integer | min: 0, max: 7 | No | |
| violate_action | Choice | unspecified, transmit, drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, set-qos-transmit | No | |
| violate_set_cos | Integer | min: 0, max: 7 | No | |
| violate_ | Any | Integer[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_ | Choice | routine, priority, immediate, flash, flash-override, critical, internet, network | No | |
| violate_ | Integer | min: 0, max: 7 | No |
queuing_policy_maps (nxos.devices.configuration.qos)
Section titled “queuing_policy_maps (nxos.devices.configuration.qos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| match_type | Choice | match-any, match-all, match-first | No | |
| classes | List | classes | No |
network_class_maps (nxos.devices.configuration.qos)
Section titled “network_class_maps (nxos.devices.configuration.qos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| match_type | Choice | match-any, match-all, match-first | No | |
| match_ | List | Integer[min: 0, max: 7] | No |
network_policy_maps (nxos.devices.configuration.qos)
Section titled “network_policy_maps (nxos.devices.configuration.qos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| match_type | Choice | match-any, match-all, match-first | No | |
| classes | List | classes | No |
classes (nxos.devices.configuration.qos.queuing_policy_maps)
Section titled “classes (nxos.devices.configuration.qos.queuing_policy_maps)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| priority_level | Integer | min: 1, max: 8 | No | |
| bandwidth_ | Integer | min: 0, max: 100 | No |
classes (nxos.devices.configuration.qos.queuing_policy_maps)
Section titled “classes (nxos.devices.configuration.qos.queuing_policy_maps)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| next_class_map | String | No | ||
| previous_ | String | No | ||
| priority_level | Integer | min: 1, max: 8 | No | |
| bandwidth_ | Integer | min: 0, max: 100 | No |
classes (nxos.devices.configuration.qos.network_policy_maps)
Section titled “classes (nxos.devices.configuration.qos.network_policy_maps)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| mtu | Integer | min: 576, max: 9216 | No | |
| no_drop | Boolean | true, false | No | |
| pause_pfc_cos | List | Integer[min: 0, max: 7] | No | |
| pause_receive | Boolean | true, false | No | |
| pause_ | Integer | min: 5000, max: 268435456 | No | |
| pause_headroom | Integer | min: 0, max: 268435456 | No | |
| pause_dynamic | Integer | min: 0, max: 255 | No | |
| pause_threshold | Integer | min: 0, max: 268435456 | No | |
| pause_ | Integer | min: 0, max: 268435456 | No | |
| pause_ | Integer | min: 0, max: 268435456 | No |
Examples
Section titled “Examples”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 - 56Example 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: 0Example 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: trueExample 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: 70Example 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: trueExample 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-ecmpExamples
Section titled “Examples”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 - 56Example 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: 0Example 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: 70Example 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: trueExamples
Section titled “Examples”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 - cs7Example 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: 0Example 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