Configuring Network QoS

This chapter contains the following sections:

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.

Licensing Requirements for Network QoS

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 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 for Network QoS

The network QoS policy has the following guidelines and limitations:

  • show commands with the internal keyword are not supported.

  • A network QoS policy change requires a reload.

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

  • Through the policy-map type network-qos command, and in the class type network-qos mode, the match qos-group number and the pause pfc-cos number must match.

    For example, the match and pause values (3) below are identical:

    switch# show policy-map system type network-qos
        Type network-qos policy-maps
        ============================
        policy-map type network-qos plcy-map-1
          class type network-qos class-type-1
            match qos-group 3
            pause pfc-cos 3
            mtu 1500

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 pfc-cos 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.

Note 
The value is this command must match the value in the pause pfc-cos command in step 7.
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 pfc-cos group

Example:

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

Specifies no-drop for the QoS group.

Note 

The value of this command must match the value in the match qos-group command in step 3.

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.