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. This chapter includes the following sections:
Note This chapter applies to the F1 Series Modules only.
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 DCE 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 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. 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 Chapter10, “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, if 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 same for the CoS that is mapped to the same ingress queue. For more information about the ingress queue, see Chapter9, “Configuring Queuing and Scheduling on F1 Series 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.
A fixed set of predefined network qos policy templates are shown in Table 8-1 .
Table 8-1 Default Network QoS Policies (Templates)
|
|
|
|
|
|
Default CoS |
Priority CoS |
default-nq-8e-policy |
0,1,2,3,4 |
5,6,7 |
— |
— |
default-nq-7e-policy |
0,1,2,4 |
5,6,7 |
3 |
— |
default-nq-6e-policy |
0,1,2 |
5,6,7 |
3 |
4 |
default-nq-4e-policy |
0 |
5,6,7 |
1,2,3 |
4 |
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.
The network qos policy templates are created when the first F1 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.
Licensing Requirements for Network QoS
The following table shows the licensing requirements for this feature:
|
|
Cisco NX-OS |
The QoS feature does not require a license. Any feature not included in a license package is bundled with the Cisco NX-OS system images 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. |
However, using virtual device contexts (VDCs) requires an Advanced Services license.
Prerequisites for Network QoS
Network QoS has the following prerequisites:
- You must be familiar with Chapter3, “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
Network QoS has the following configuration guidelines and limitations:
Note These guidelines and limitations are applicable to all F1 edge 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 PFC is successfully negotiated or turned on.
- When the port MTU is configured on an interface, it overrides the network qos MTU.
- Changing the network qos policy is a disruptive operation and it can cause traffic drops on any or all ports across VDCs.
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 8-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.
The following procedure describes how to copy a predefined network qos policy template:
SUMMARY STEPS
1. configure terminal
2. qos copy policy-map type network-qos default-nq-7e-policy {prefix prefix | suffix suffix}
3. show policy-map type network-qos
4. exit
DETAILED STEPS
|
|
|
Step 1 |
configure terminal Example: switch# configure terminal switch(config)# |
Enters configuration mode. |
Step 2 |
qos copy policy-map type network-qos default-nq-7e-policy {prefix prefix | suffix suffix} Example: switch(config)# qos copy policy-map type network-qos default-nq-7e-policy prefix my_ switch(config)# |
Copies a predefined network qos policy and add 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 |
show policy-map type network-qos my_nq-7e Example: switch# show policy-map type network-qos my_nq-7e Type network-qos policy-maps ============================ policy-map type network-qos my_nq-7e class type network-qos c-nq-7e-drop congestion-control tail-drop mtu 1500 class type network-qos c-nq-7e-ndrop-fcoe pause mtu 2112 |
Displays the type network qos policy map. |
Step 4 |
exit Example: switch# exit |
Exits from the command interpreter. |
The following procedure describes how to configure a user-defined network qos policy:
SUMMARY STEPS
1. configure terminal
2. class-map type network-qos match-any {class-map-name}
3. match cos [0-7]
4. class-map type network-qos match-any {class-map-name}
5. match protocol [fcoe | iscsi | tcp]
6. match cos [0-7]
7. class-map type network-qos match-any {class-map-name}
8. match cos [0-7]
9. policy-map type network-qos (my_template)
10. class type network-qos eth
11. no pause
12. mtu [mtu_size]
13. congestion-control [random-detect {threshold [burst-optimized | mesh-optimized]} | tail-drop{threshold [burst-optimized | mesh-optimized]}]
14. class type network-qos fc1
15. pause
16. class type network-qos fc2
17. pause
18. mtu [mtu_size]
19. exit
DETAILED STEPS
|
|
|
Step 1 |
configure terminal Example: switch# configure terminal switch(config)# |
Enters configuration mode. |
Step 2 |
class-map type network-qos match-any {class-map-name} Example: switch(config)# class-map type network-qos match-any eth switch(config-cmap-nqos)# |
Configures the class map of the type network-qos, specifies the class map name as eth, and enters class-map mode. |
Step 3 |
match cos [0-7] Example: switch(config-cmap-nqos)# match cos 0,5-7 |
Specifies the CoS value to match. The range is from 0 to 7. |
Step 4 |
class-map type network-qos match-any {class-map-name} Example: switch(config)# class-map type network-qos match-any fc1 |
Specifies the type network qos class name. |
Step 5 |
match protocol [fcoe | iscsi | tcp] Example: switch(config-cmap-nqos)# match protocol fcoe |
Specifies the CoS value to match and specifies which protocol has to be mapped to a given CoS value. |
Step 6 |
match cos [0-7] Example: switch(config-cmap-nqos)# match cos 3 |
Specifies the CoS value to match. The range is from 0 to 7. |
Step 7 |
class-map type network-qos match-any {class-map-name} Example: switch(config)# class-map type network-qos match-any fc2 |
Specifies the type network qos class name. |
Step 8 |
match cos [0-7] Example: switch(config-cmap-nqos)# match cos 1,2,3,4 |
Specifies the CoS value to match. The range is from 0 to 7. |
Step 9 |
policy-map type network-qos {my_template} Example: switch(config)# policy-map type network-qos my_template |
Creates or accesses the policy map named my_template. The policy-map name can contain alphabetic, hyphen, or underscore characters, is case sensitive, and can be up to 40 characters. |
Step 10 |
class type network-qos {class-map-name}
Example: switch(config-pmap-nqos)# class type network-qos eth |
Refers the class map of type network qos as configured in step 2. |
Step 11 |
no pause Example: switch(config-pmap-nqos-c)# no pause |
Specifies drop for the CoS. |
Step 12 |
mtu (mtu_size) Example: switch(config-pmap-nqos-c)# mtu 1600 |
Specifies the maximum transmission unit or the payload length. The range is from 1500 to 9216. The MTU size in this example is set to 1600. |
Step 13 |
congestion-control [random-detect {threshold [burst-optimized | mesh-optimized]} | tail-drop {threshold [burst-optimized | mesh-optimized]}] Example: switch(config-pmap-nqos-c)# congestion-control random-detect threshold mesh-optimized |
Specifies either the WRED or TD congestion control protocol and the thresholds optimized for bursty or mesh traffic. |
Step 14 |
class type network-qos {class-map-name} Example: switch(config-pmap-nqos)# class type network-qos fc1 |
Configures the class map of type network-qos and specifies the class map name as fc1. |
Step 15 |
pause Example: switch(config-pmap-nqos-c)# pause |
Specifies no-drop. The default is no pause. |
Step 16 |
class type network-qos {class-map-name} Example: switch(config-pmap-nqos)# class type network-qos fc2 |
Configures the class map of type network-qos and specifies the class map name as fc2. |
Step 17 |
pause Example: switch(config-pmap-nqos-c)# pause |
Specifies no-drop. The default is no pause. |
Step 18 |
mtu [mtu_size] Example: switch(config-pmap-nqos-c)# mtu 3000 |
Specifies the MTU value. The range is from 1500 to 9216. |
Step 19 |
exit Example: switch(config-pmap-nqos-c)# exit switch(config)# |
Exits policy-map network-qos mode and enters 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.
SUMMARY STEPS
1. configure terminal
2. system qos
3. service-policy type network-qos { my_template }
4. exit
DETAILED STPES
Step 1 |
configure terminal Example: switch# configure terminal |
Enters 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 {my_template} Example: switch (config-sys-qos)# service-policy type network-qos my_template |
Adds the policy map to the input or output packets of system. This example adds my_template to the system. |
Step 4 |
exit Example: switch (config-sys-qos)# exit switch (config)# |
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:
|
|
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, Release 5.x.
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
congestion-control tail-drop
class type network-qos c-nq-6e-ndrop-fcoe
class type network-qos c-nq-6e-ndrop
Feature History for Network QoS
Table 8-2 lists the release history for this feature.
Table 8-2 Feature History Network QoS
|
|
|
network-qos policy |
5.1(1) |
This feature was introduced. |