Configuring Network QoS

About Network QoS

The network QoS policy defines the characteristics of QoS properties network wide. With a network QoS policy, you can configure the following:

  • Pause behavior—You can decide whether a QoS group requires the lossless behavior. The lossless behavior is provided by using a priority flow control (PFC) mechanism that prevents packet loss during congestion. You can configure drop (frames with this value that can be dropped) and no drop (frames with this value that cannot be dropped). For the drop and no drop configuration, you also need to enable PFC per port. For more information about PFC, see the "Configuring Priority Flow Control" section.

Prerequisites for Network QoS

The network QoS policy has the following prerequisites:

  • You must be familiar with using modular QoS CLI.

  • You are logged on to the device.

Guidelines and Limitations

The network QoS policy has the following configuration guidelines and limitations:

  • show commands with the internal keyword are not supported.

  • Changing the network QoS policy is a disruptive operation, and it can cause traffic drops on any or all ports.

  • When enabling jumbo MTU, the default network QoS policy can support jumbo frames. Under the network QoS policy, the MTU is used only for buffer carving when no-drop classes are configured. No additional MTU adjustments are required under the network QoS policy to support jumbo MTU.

  • Network QoS is not supported on the Cisco Nexus 9508 switch (NX-OS 7.0(3)F3(3).

  • Beginning with NX-OS 7.0(3)I7(4), you can enable a network QoS pause configuration per QoS class with the pause pfc-cos cos-list receive command for the receive-only PFC option. When specifying this option, PFC pause frame generation is disabled for a particular queueing policy class/queue.

    A network QoS policy can have a maximum combined total of six asymmetric PFC (APFC) and PFC classes.


    Note


    PFC is required to be enabled on a port to support APFC on that port.


Dynamic Packet Prioritization

Dynamic Packet Prioritization (DPP) prioritizes a configured number of packets of every new flow in a particular class of traffic is prioritized and sent through a configured class of traffic that DPP is mapped to.

When the number of packets in a flow reaches a specific threshold, prioritization ends and the subsequent packets in the flow go to the normal class.


Note


Default number of packets is 120.


  • Maximum number of packets:

    • Application Spine Engine (ASE2) enabled switches — 256

    • Leaf Spine Engine (LSE) enabled switches — 1024

DPP uses an age-out timer to evict idle flows.


Note


Default age-period is 5 msec.


The DPP feature is enabled on a queue using the dpp set-qos-group command under a network QoS policy configuration.


Note


A DPP enabled queue cannot be a no-drop queue (For example, both pause pfc-cos and dpp cannot be enabled on the same queue.)


Configuring and applying the policy are as follows:

switch(config)# policy-map type network-qos dpp
switch(config-pmap-nqos)# class type network-qos c-8q-nq1
switch(config-pmap-nqos-c)# dpp set-qos-group 7

switch(config)# system qos 
switch(config-sys-qos)# service-policy type network-qos dpp 

Configuring the age-period and the max-num-packets are as follows:

switch(config)# hardware qos dynamic-packet-prioritization age-period 5000 usec 

switch(config)# hardware qos dynamic-packet-prioritization max-num-pkts 120
 

Configuring Network QoS Policies

You can configure a network QoS policy by following one of these methods:

  • Predefined policies—You can apply a predefined network QoS policy that fits your requirement. By default, default-nq-policy is configured.

  • User-defined policy—You can create a network QoS policy that conforms to one of the system-defined policies.

Copying a Predefined Network QoS Policy

SUMMARY STEPS

  1. qos copy policy-map type network-qos default-nq-policy {prefix prefix | suffix suffix}
  2. show policy-map type network-qos my_nq

DETAILED STEPS

  Command or Action Purpose

Step 1

qos copy policy-map type network-qos default-nq-policy {prefix prefix | suffix suffix}

Example:

switch# qos copy policy-map type network-qos default-nq-policy prefix my_nq
Copies a predefined network QoS policy and adds a suffix or prefix to its name. A prefix or suffix name can contain alphabetic, hyphen, or underscore characters, is case sensitive, and can be up to 40 characters.

Step 2

show policy-map type network-qos my_nq

Example:

switch# show policy-map type network-qos my_nq

(Optional) Displays the type network-qos policy map.

Configuring a User-Defined Network QoS Policy

SUMMARY STEPS

  1. configure terminal
  2. class-map type network-qos match-any class-name
  3. match qos-group group
  4. exit
  5. policy-map type network-qos policy-map-name
  6. class type network-qos {class-name | class-default}
  7. pause group

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

class-map type network-qos match-any class-name

Example:

switch(config)# class-map type network-qos match-any c-nq2
switch(config-cmap-nqos)#

Configures the class map of the type network-qos and enters class-map mode. Class network-qos names are listed in previous System-Defined Type network-qos Class Maps table.

Step 3

match qos-group group

Example:

switch(config-cmap-nqos)# match qos-group 2

Specifies the QoS group to match. The range is from 0 to 3.

Step 4

exit

Example:

switch (config-cmap-nqos)# exit
switch (config)#

Exits class-map mode and enters global configuration mode.

Step 5

policy-map type network-qos policy-map-name

Example:

switch(config)# policy-map type network-qos map2

Creates a policy map. The policy-map name can contain alphabetic, hyphen, or underscore characters, is case sensitive, and can be up to 40 characters.

Step 6

class type network-qos {class-name | class-default}

Example:

switch(config-pmap-nqos)# class type network-qos c1-nq2

Refers to the class map of type network-qos as configured in Step 2.

Step 7

pause group

Example:

switch(config-pmap-nqos-c)# pause
pfc-cos 2

Specifies no-drop for the QoS group.

Note

 

For 7.0(3)I1(1) and earlier, the no-drop queuing configuration is not supported in the network-qos policy for the Cisco Nexus 9300 platform.

Applying a Network QoS Policy on a System

You apply a network QoS policy globally on a system. Applying a network QoS policy also automatically applies the corresponding queuing policies.

SUMMARY STEPS

  1. configure terminal
  2. system qos
  3. service-policy type network-qos {policy-map-name | default-nq-policy}

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

system qos

Example:

switch (config)# system qos
switch (config-sys-qos)#

Enters system qos mode.

Step 3

service-policy type network-qos {policy-map-name | default-nq-policy}

Example:

switch (config-sys-qos)# service-policy type network-qos map1

Specifies the policy map to use as the service policy for the system.

Note

 

To restore the system to the default network QoS service policy, use the no form of this command.

Note

 

All Layer 4 class-maps under the network-qos policy-map must be configured before applying it under the system qos level.

Verifying the Network QoS

To display the policing configuration information, perform one of the following tasks:

Command

Purpose

show class-map type network-qos

Displays the type network-qos class maps.

show policy-map type network-qos

Displays the type network-qos policy maps.

show policy-map system type network-qos

Displays the active type network-qos class maps.