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).

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.