Configuring Network QoS

This chapter describes how to configure a network qos policy for the Cisco NX-OS device in the Data Center Bridging (DCB) network.


Note


This chapter applies to the F-Series I/O modules only.


Finding Feature Information

Your software release might not support all the features documented in this module. For the latest caveats and feature information, see the Bug Search Tool at https://tools.cisco.com/bugsearch/ and the release notes for your software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the "New and Changed Information"chapter or the Feature History table in this chapter.

Information About Network QoS

A Data Center Bridging (DCB) network, which is also referred to as a DCB cloud, is a network that provides I/O consolidation. This network consists of switches that support class of service (CoS)-based traffic differentiation. The DCB network carries different types of traffic such as storage area network (SAN), local area network (LAN), and inter-process communication (IPC) traffic. The SAN traffic is sensitive to packet drops and relies on in-order delivery, which means that the traffic is delivered (frames and packets) in the same order in which it was sent. The LAN traffic allows dropping of packets and is delivered on a best-effort basis. The LAN traffic can have a different level of priority and a chance of being delivered in a timely manner during congestion. The IPC networks require very low latency. Therefore, a DCB network must support traffic differentiation and provide quality of service (QoS).

In a DCB network, virtual links (VLs) are used to differentiate traffic classes. VLs, which are an extension of CoS, enable traffic differentiation and are carried in the priority bits of the 802.1Q or S-Tag.CoS allows forming of a physical link into multiple logical links so that the traffic in the CoS does not affect the traffic on the other CoS.

A DCB network has eight CoS values. All traffic that enters the DCB cloud must be mapped into one of these eight CoS values. Each frame in a DCB network belongs to a CoS. You can define the CoS by a set of parameters that gives a specific behavior to the CoS.

The network qos policy defines the characteristics of each CoS value, which are applicable network wide across virtual device contexts (VDCs) and switches. With a network qos policy, you can configure the following:

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

  • Congestion Control Mechanisms—You can select either tail drop (TD, which drops frames without differentiation based on the per-VL occupancy) or Weighted Random Early Detection (WRED, which drops frames without differentiation based on the per-VL occupancy and the probability factor) only for a drop CoS. By default, TD is enabled for drop CoS in the default policies. Any of the burst-optimized or mesh-optimized thresholds for TD and WRED can be selected for the packet-drop algorithm based on the traffic pattern expected for the CoS. If no congestion control algorithm is selected, and congestion occurs, a hard tail-drop that is based on a single threshold occurs for the drop CoS.

  • MTU—You can set the maximum transmission unit (MTU) or maximum payload length for CoS. The MTU range is from 1500 to 9216. The MTU must be smaller than the system jumbo MTU in all VDCs. The MTU must be the same for the CoS that is mapped to the same ingress queue. For more information about the ingress queue, see “Configuring Queuing and Scheduling on F-Series I/O Modules.”

  • Protocols—You can select Fibre Channel over Ethernet (FCoE), iSCSI, or TCP as the protocol for a CoS value. The protocol value is used in the DCB Exchanges.

Differences in Drop CoS and No-Drop CoS Values

The table below shows the drop and no-drop CoS values for the different policy templates.

Table 1. Differences in Drop CoS and No-Drop CoS Values

Templates

default-4q-8e-policy

0–7

default-4q-7e-policy

0–2, 4–7

3

default-4q-6e-policy

0–2, 5–7

3, 4

default-4q-4e-policy

0, 5, 6, 7

1– 4

default-8e-4q4q-policy

0–7

default-8e-4q8q-policy (on Cisco Nexus 7706/7710/7718 switches only)

0–7

default-7e-4q8q-policy (on Cisco Nexus 7706/7710/7718 switches only)

0–2 , 4–7

3

default-6e-4q8q-policy (on Cisco Nexus 7706/7710/7718 switches only)

0–2, 5–7

3, 4

default-4e-4q8q-policy (on Cisco Nexus 7706/7710/7718 switches only)

0, 5, 6, 7

1–4

Queue Names and Default Mappings of CoS Values to Egress/Ingress Queues

The table below shows the queue names and default mappings of CoS values to egress and ingress queues

Table 2. Queue Names and Default Mappings of CoS Values to Egress/Ingress Queues

Templates

Queue Names for Ingress Queues

Ingress CoS Values

Queue Names for Egress Queues

Egress Cos Values

Priority CoS Value

default-4q-8e-policy

2q4t-8e-in-q1

2q4t-8e-in-q- default

5–7

0–4

1p3q1t-8e-out-pq1

1p3q1t-8e-out-q2

1p3q1t-8e-out-q3

1p3q1t-8e-out-q- default

5–7

3–4

2

0-1

5–7

default-4q-7e-policy

4q4t-7e-in-q1

4q4t-7e-in-q-default

4q4t-7e-in-q3

4q4t-7e-in-q4

5–7

0–1

2,4

3

1p3q1t-7e-out-pq1

1p3q1t-7e-out-q2

1p3q1t-7e-out-q3

1p3q1t-7e-out-q- default

5–7

3

2,4

0,1

5–7

default-4q-6e-policy

4q4t-6e-in-q1

4q4t-6e-in-q-default

4q4t-6e-in-q3

4q4t-6e-in-q4

5–7

0-2

4

3

3p1q1t-6e-out-pq1

3p1q1t-6e-out-pq2

3p1q1t-6e-out-pq3

3p1q1t-6e-out-q- default

5–7

4

3

0–2

5–7

4

3

default-4q-4e-policy

4q4t-4e-in-q1

4q4t-4e-in-q-default

4q4t-4e-in-q3

4q4t-4e-in-q4

5–7

0

4

1-3

2p2q1t-4e-out-pq1

2p2q1t-4e-out-pq2

2p2q1t-4e-out-q3

2p2q1t-4e-out-q- default

5–7

4

1–3

0

5–7

4

default-8e-4q4q-policy

4q1t-8e-4q4q-in-q1

4q1t-8e-4q4q-in-qdefault

4q1t-8e-4q4q-in-q3

4q1t-8e-4q4q-in-q4

5–7

0,1

3,4

2

1p3q1t-8e-4q4q- out-pq1

1p3q1t-8e-4q4q- out-q2

1p3q1t-8e-4q4q- out-q3

1p3q1t-8e-4q4qout-

q-default

5–7

0,1

3,4

2

5–7

default-8e-4q8q-policy (Cisco Nexus 7710/ 7718 switches only)

8e-4q8q-in-q1

8e-4q8q-in-q-default

8e-4q8q-in-q3

8e-4q8q-in-q4

5–7

0–4

8e-4q8q-out-q1 (priority

queue)

8e-4q8q-out-q2

8e-4q8q-out-q3

8e-4q8q-out-q4

8e-4q8q-out-q5

8e-4q8q-out-q6

8e-4q8q-out-q7

8e-4q8q-out-q- default

5

7

6

4

3

2

1

0

5

(Drop category)

default-7e-4q8q-policy (Cisco Nexus 7710/ 7718 switches only)

default-7e-4q8qdrop- in-policy:

7e-4q8q-in-q1

7e-4q8q-in-q-default

7e-4q8q-in-q3

5–7

0–1

2–4

default-7e-4q8qdrop- out-policy:

7e-4q8q-out-q1

(priority queue)

7e-4q8q-out-q2

7e-4q8q-out-q3

7e-4q8q-out-q4

7e-4q8q-out-q6

7e-4q8q-out-q7

7e-4q8q-out-q- default

5

7

6

4

2

1

0

5 (Drop category)

default-7e-4q8qndrop- in-policy:

7e-4q8q-in-q4

3

default-7e-4q8qndrop- out-policy:

7e-4q8q-out-q5

3

default-6e-4q8q-policy (Cisco Nexus 7710 /7718 switches only)

default-6e-4q8qdrop- in-policy:

6e-4q8q-in-q1

6e-4q8q-in-q-default

5–7

0-2

default-6e-4q8qdrop- out-policy:

6e-4q8q-out-q1 (priority queue)

6e-4q8q-out-q2

6e-4q8q-out-q3

6e-4q8q-out-q6

6e-4q8q-out-q7

6e-4q8q-out-q- default

5

7

6

2

1

0

5 (Drop category)

default-6e-4q8qndrop- in-policy:

6e-4q8q-in-q3

6e-4q8q-in-q4

4

3

default-6e-4q8qndrop- out-policy:

6e-4q8q-out-q4 (priority queue)

6e-4q8q-out-q5 (priority queue)

4

3

4 (no drop category, highest priority)

3 (2nd highest priority)

default-4e-4q8q-policy (Cisco Nexus 7710/ 7718 switches only)

default-4e-4q8qdrop- in-policy:

4e-4q8q-in-q1

4e-4q8q-in-q-default

5–7

0

default-4e-4q8qdrop- out-policy:

5 (Drop category)

4e-4q8q-out-q1 (priority queue)

4e-4q8q-out-q2

4e-4q8q-out-q3

4e-4q8q-out-q- default

5

7

6

0

default-4e-4q8qndrop-out-policy:

4e-4q8q-in-q3

4e-4q8q-in-q4

4

1–3

default-4e-4q8q-ndropout- policy:

4 (no drop category)

4e-4q8q-out-q4 (priority queue)

4e-4q8q-out-q5

4e-4q8q-out-q6

4e-4q8q-out-q7

4

3

2

1

Default DSCP Mappings

The table below shows the default DSCP values to Ingress queues for the Cisco Nexus 7710/7718 switches.

Table 3. Default DSCP Mappings on Cisco Nexus 7710/7718 Switches

Template

Ingress Queue

Default DSCP Mappings

default-8e-4q8q-policy

8e-4q8q-in-q-default

8e-4q8q-in-q1

8e-4q8q-in-q4

8e-4q8q-in-q3

0-39

40-63

0-39

0-39

default-7e-4q8q-policy

7e-4q8q-in-q-default

7e-4q8q-in-q1

7e-4q8q-in-q4

7e-4q8q-in-q3

0-15

40-63

16-39

default-6e-4q8q-policy

6e-4q8q-in-q-default

6e-4q8q-in-q1

6e-4q8q-in-q4

6e-4q8q-in-q3

0-39

40-63

default-4e-4q8q-policy

4e-4q8q-in-q-default

4e-4q8q-in-q1

4e-4q8q-in-q4

4e-4q8q-in-q3

0-39

40-63

In a default network policy template name, the numbers 4, 6, 7, and 8 denote the number of the drop CoS that is defined in the policy and e denotes Ethernet.


Note


The 4q8q policy templates are supported and enabled by default on the Cisco Nexus 7710 switch and the Cisco Nexus 7718 switch only.



Note


For the default-8e-4q8q-in-policy, as the ingress buffers are limited to two queues (8e-4q8q-in-q1 and 8e-4q8q-in-q-default), you must change the queue limit by using the queue limit command, before any CoS2q / dscp-to-queue mapping changes are made to 8e-4q8q-in-q3 and 8e-4q8q-in-q4.


The network qos policy templates are created when the first F-Series module becomes operational or the templates are saved in the start-up configuration.


Note


A policy that does not conform to a system-defined policy template is currently not supported.


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

  • You are in the default VDC. A VDC is a logical representation of a set of system resources. You can use the switchto vdc command with a VDC number.

Guidelines and Limitations

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


Note


These guidelines and limitations are applicable to all F-Series edge, M3, and FabricPath mode ports.


  • You must configure and apply a network qos policy only to the default VDC.

  • Selecting a template with a no-drop CoS value does not automatically give no-drop behavior to it. The no-drop behavior is enabled for those CoS values only on ports where priority flow control (PFC) is successfully negotiated or turned on.

  • When the port MTU is configured on an interface, it overrides the network qos MTU.

  • In releases earlier than Cisco NX-OS Release 6.2(1), the Fabric Extender (FEX) interfaces do not support the MTU changes made to a QoS policy template.

  • The FEX port channel requires a minimum MTU setting of 1058 for traffic with CoS 5–CoS 7. The FEX fails when the MTU is less than 1058 and does not register with the switch.

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

  • DCB network qos policies pertain to F-Series modules. DCE network qos policies are created only when DCE network enabled line cards are inserted into a chassis.

PFC and F1 Series Module Ports

  • When PFC is enabled on a port, precision time protocol (PTP) is not supported on the port.

  • The pong utility is not supported on a VDC when PFC is enabled on any of the ports in the same VDC.

  • PFC is not supported when PTP is enabled on the same port or when the pong utility is enabled in the same VDC.

Configuring iSCSI

  • As a best practice, both iSCSI and FCoE should be configured on the same CoS (vl) in the network-qos policy for the default-nq-7e-policy and default-nq-6e-policy templates.

    • Avoid using CoS 4 for iSCSI in the default-nq-6e-policy template.

      (CoS 4 is reserved for no-drop control traffic.)

    • Avoid using CoS 4 for iSCSI in the default-nq-4e-policy template.

      (CoS 4 is reserved for no-drop control traffic.)

    • Configure the network-qos policy with MTU = 2112 if iSCSI shares the CoS (vl) with FCoE.

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 template that fits your requirement. For more information about the predefined policies, see Table 1. By default, default-nq-8e-policy is configured. The numbers denote the number of drop (Ethernet) CoS values. The template CoS values are chosen based on standard conventions and usage patterns.

  • Copying the predefined templates—You can copy a network qos policy template and modify it as needed. Copying a network qos policy trims the default policy name by stripping the default and policy substrings from it.

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


  • Note


    Ports that are in the nondefault virtual device contexts (VDCs) inherit the network qos policy from the default VDC.

    You can copy and modify a network qos policy template and use the network qos policy commands only from the default-vdc.


Copy a predefined network qos policy template:

Procedure

  Command or Action Purpose

Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# qos copy policy-map type network-qos default-nq-7e-policy {prefix prefix | suffix suffix}

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 3

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

Displays the type network qos policy map.

Configure a User-Defined Network

Procedure

  Command or Action Purpose

Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# class-map type network-qos match-any {class-map-name}

Configures the class map of the type network-qos, specifies the class map name as eth, and enters class-map mode.

Step 3

switch(config-cmap-nqos)# match cos [0-7]

Specifies the CoS value to match. The range is from 0 to 7.

Step 4

switch(config-cmap-nqos)# class-map type network-qos match-any {class-map-name}

Specifies the type network qos class name.

Step 5

switch(config-cmap-nqos)# match protocol [fcoe | iscsi | tcp]

Specifies the CoS value to match and specifies which protocol has to be mapped to a given CoS value.

Step 6

switch(config-cmap-nqos)# match cos [0-7]

Specifies the CoS value to match. The range is from 0 to 7.

Step 7

switch(config-cmap-nqos)# class-map type network-qos match-any {class-map-name}

Specifies the type network qos class name.

Step 8

switch(config-cmap-nqos)# match cos [0-7]

Specifies the CoS value to match. The range is from 0 to 7.

Step 9

switch(config-cmap-nqos)# policy-map type network-qos [my_template]

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

Step 10

switch(config-pmap-nqos-c)# class type network-qos eth

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

Step 11

switch(config-pmap-nqos-c)# no pause

Specifies drop for the CoS.

Step 12

switch(config-pmap-nqos-c)# mtu [mtu_size]

Specifies the MTU or the payload length. The range is from 1500 to 9216. The MTU size in this example is set to 1600.

Step 13

switch(config-pmap-nqos-c)# congestion-control [random-detect {threshold [burst-optimized | mesh-optimized]} | tail-drop{threshold [burst-optimized | mesh-optimized]}]

Specifies either the WRED or TD congestion control protocol and the thresholds optimized for bursty or mesh traffic.

Step 14

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

Configures the class map of type network-qos and specifies the class map name.

Step 15

switch(config-pmap-nqos-c)# pause

Specifies no-drop. The default is no pause.

Step 16

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

Configures the class map of type network-qos and specifies the class map name.

Step 17

switch(config-pmap-nqos-c)# pause

Specifies no-drop. The default is no pause.

Step 18

switch(config-pmap-nqos-c)# mtu [mtu_size]

Specifies the MTU value. The range is from 1500 to 9216.

Step 19

switch(config-pmap-nqos-c)# exit

Exits policy-map network-qos mode and enters global configuration mode.

Applying a Network QoS Policy on a Target

You apply a network qos policy only globally on a system across VDCs. Applying a network qos policy also automatically applies the corresponding queuing policies.

To apply a network qos policy to a target, use the service-policy command.

Procedure

  Command or Action Purpose

Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# system qos

Enters system qos mode.

Step 3

switch(config-sys-qos)# service-policy type network-qos {my_template}

Adds the policy map to the input or output packets of system.

Step 4

switch(config-sys-qos)#exit

Exits config-sys-qos mode and enters configuration mode.

Verifying the Network QoS

To display the network qos policy configuration, 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.

For detailed information about the fields in the output from these commands, see the Cisco Nexus 7000 Series NX-OS Quality of Service Command Reference.

Configuration Examples for Network QoS

The following example shows how to configure a network QoS policy:


policy-map type network-qos default-nq-6e-policy
  class type network-qos c-nq-6e-drop
   match cos 0-2,5-7
   congestion-control tail-drop
   mtu 1500
  class type network-qos c-nq-6e-ndrop-fcoe
   match cos 3
   match protocol fcoe
   pause
   mtu 2112
  class type network-qos c-nq-6e-ndrop
   match cos 4
   pause
   mtu 1500

Feature History for Network QoS

Your software release might not support all the features in this document. For the latest caveats and feature information, see the Bug Search Tool at https://tools.cisco.com/bugsearch/ and the release notes for your software release.

Table 4. Feature History for Network QoS

Feature Name

Release

Feature Information

Support for 4q8q policy templates

6.2(2)

Support for four 4q8q templates that provide eight egress queues for the Cisco Nexus 7710 switch and Cisco Nexus 7718 switch only.

Support for four ingress buffers

6.1(3)

Support for the default-8e-4q4q-policy template that supports four ingress buffers.

network-qos policy

5.1(1)

This feature was introduced.