Information About Quality of Service
The configurable Cisco NX-OS quality of service (QoS) features allow you to classify the network traffic, prioritize the traffic flow, and provide congestion avoidance.
The default QoS configuration on the device provides best-effort service for Ethernet traffic. QoS can be configured to provide additional classes of service for Ethernet traffic. Cisco NX-OS QoS features are configured using Cisco Modular QoS CLI (MQC).
In the event of congestion or collisions, Ethernet will drop packets. The higher level protocols detect the missing data and retransmit the dropped packets.
Modular QoS CLI
The Cisco Modular QoS CLI (MQC) provides a standard set of commands for configuring QoS.
You can use MQC to define additional traffic classes and to configure QoS policies for the whole system and for individual interfaces. Configuring a QoS policy with MQC consists of the following steps:
- Define traffic classes.
- Associate policies and actions with each traffic class.
- Attach policies to logical or physical interfaces as well as at the global system level.
MQC provides two command types to define traffic classes and policies:
- class-map
-
Defines a class map that represents a class of traffic based on packet-matching criteria. Class maps are referenced in policy maps.
The class map classifies incoming packets based on matching criteria, such as the IEEE 802.1p class of service (CoS) value. Unicast and multicast packets are classified.
- policy-map
-
Defines a policy map that represents a set of policies to be applied on a class-by-class basis to class maps.
The policy map defines a set of actions to take on the associated traffic class, such as limiting the bandwidth or dropping packets.
You define the following class-map and policy-map object types when you create them:
- network-qos
-
Defines MQC objects that you can use for system level related actions.
- qos
-
Defines MQC objects that you can use for classification.
- queuing
-
Defines MQC objects that you can use for queuing and scheduling.
Note |
The qos type is the default for the class-map and policy-map commands, but not for the service-policy which requires that you specify an explicit type. |
You can attach policies to interfaces or EtherChannels as well as at the global system level by using the service-policy command.
You can view all or individual values for MQC objects by using the show class-map and show policy-map commands.
An MQC target is an entity (such as an Ethernet interface) that represents a flow of packets. A service policy associates a policy map with an MQC target and specifies whether to apply the policy on incoming or outgoing packets. This mapping enables the configuration of QoS policies such as marking, bandwidth allocation, buffer allocation, and so on.
System Classes
The system qos is a type of MQC target. You use a service policy to associate a policy map with the system qos target. A system qos policy applies to all interfaces on the switch unless a specific interface has an overriding service-policy configuration. The system qos policies are used to define system classes, the classes of traffic across the entire switch, and their attributes.
If service policies are configured at the interface level, the interface-level policy always takes precedence over system class configuration or defaults.
Default System Classes
Information About Policy Types
The device supports a number of policy types. You create class maps in the policy types.
-
Network-qos
-
Queuing
-
QoS
The following QoS parameters can be specified for each type of class:
-
Type network-qos—A network-qos policy is used to instantiate system classes and associate parameters with those classes that are of system-wide scope.
-
Classification—The traffic that matches this class are as follows:
-
QoS Group—A class map of type network-qos identifies a system class and is matched by its associated qos-group.
-
-
Policy—The actions that are performed on the matching traffic are as follows:
Note
A network-qos policy can only be attached to the system QoS target.
-
MTU—The MTU that needs to be enforced for the traffic that is mapped to a system class.
Note
The Cisco Nexus device supports one MTU for all classes for all ports.
-
Set CoS value—This configuration is used to mark 802.1p values for all traffic mapped to this system class.
-
Congestion Control ECN—Data Center TCP (DCTCP) is an enhancement to the TCP congestion control algorithm for data center networks. It leverages Explicit Congestion Notification (ECN) feature, to mark all the packets when the queue length exceeds a configured ECN threshold value. The routers and end hosts use this marking as a signal that the network is congested to slow down sending packets. To enable an ECN, use the congestion-control dctcp ecn command in the network-qos policy map mode. Note
Enabling ECN on a class on a network-qos policy implies that ECN is enabled for all ports in the system.
-
-
-
Type queuing—A type queuing policy is used to define the scheduling characteristics of the queues associated with system classes.
The Cisco Nexus device supports type queuing in the egress direction.
Note
Some configuration parameters when applied to an EtherChannel are not reflected on the configuration of the member ports.
Note
On Cisco Nexus 3500 Series switches, QoS remarking will never work until a qos-group is defined under the qos policy. This is an expected behaviour that if there no qos-group is applied, it must get classified under the default queue.
-
Classification—The traffic that matches this class are as follows:
-
QoS Group—A class map of type queuing identifies a system class and is matched by its associated QoS group.
-
-
Policy—The actions that are performed on the matching traffic are as follows:
Note
These policies can be attached to the system qos target or to any interface. The output queuing policy is used to configure output queues on the device associated with system classes.
-
Bandwidth—Sets the guaranteed scheduling deficit weighted round robin (DWRR) percentage for the system class.
-
Priority—Sets a system class for strict-priority scheduling. Only one system class can be configured for priority in a given queuing policy.
-
-
-
Type qos—A type QoS policy is used to classify traffic that is based on various Layer 2, Layer 3, and Layer 4 fields in the frame and to map it to system classes.
Note
Some configuration parameters when applied to an EtherChannel are not reflected on the configuration of the member ports.
-
Classification—The traffic that matches this class are as follows:
-
Access Control Lists—Classifies traffic based on the criteria in existing ACLs.
-
Class of Service—Matches traffic based on the CoS field in the frame header.
-
DSCP—Classifies traffic based on the Differentiated Services Code Point (DSCP) value in the DiffServ field of the IP header.
-
IP Real Time Protocol—Classifies traffic on the port numbers used by real-time applications.
-
Precedence—Classifies traffic based on the precedence value in the type of service (ToS) field of the IP header.
-
-
Policy—The actions that are performed on the matching traffic are as follows:
Note
This policy can be attached to the system or to any interface. It applies to input traffic only.
-
QoS Group—Sets the QoS group that corresponds to the system class this traffic flow is mapped to.
The Cisco Nexus 3500 Series switches support:
-
Five QoS groups
-
Five queues for unicast
-
Five queues for multicast
-
-
-
Network QoS Policy Type
A network-qos policy is used to instantiate system classes and associate parameters with those classes that are of system-wide scope.
-
Classification—The traffic that matches this class are as follows:
-
QoS Group—A class map of type network-qos identifies a system class and is matched by its associated qos-group.
-
-
Policy—The actions that are performed on the matching traffic are as follows:
Note
A network-qos policy can only be attached to the system QoS target.
Note
All user defined classes have to be defined under network-qos policy and the network-qos policy has to be applied under "system qos".
-
MTU—The MTU that needs to be enforced for the traffic that is mapped to a system class.
Note
The Cisco Nexus device supports one MTU for all classes for all ports.
-
Set CoS value—This configuration is used to mark 802.1p values for all traffic mapped to this system class.
-
Congestion Control DCTCP and ECN—Data Center TCP (DCTCP) is an enhancement to the TCP congestion control algorithm for data center networks. It leverages Explicit Congestion Notification (ECN) feature, to mark all the packets when the queue length exceeds a configured DCTCP threshold value. The routers and end hosts use this marking as a signal that the network is congested to slow down sending packets.
To enable an DCTCP/ECN, use either the congestion-control dctcp ecn-threshold threshold-bytes command or the congestion-control random-detect ecn command in the network-qos policy-map mode.
Note
Enabling DCTCP and ECN on a class on a network-qos policy implies that DCTCP and ECN is enabled for all ports in the system.
Beginning with Cisco NX-OS Release 9.3(3), the congestion-control random-detect ecn command is not supported.
-
switch# configuration terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# policy-map type network-qos system_network_policy
switch(config-pmap-nq)# class type network-qos nc1
switch(config-pmap-nq-c)# set cos 2
switch(config-pmap-nq-c)# class type network-qos nc2
switch(config-pmap-nq-c)# congestion-control dctcp ecn-threshold 30000 bytes
switch(config-pmap-nq-c)#
switch(config-pmap-nq-c)# class type network-qos nc3
switch(config-pmap-nq-c)# congestion-control random-detect ecn
switch(config-pmap-nq-c)# system qos
switch(config-sys-qos)# service-policy type network-qos system_network_policy
switch(config-sys-qos)# end
switch#
switch# show policy-map system
Type network-qos policy-maps
===============================
policy-map type network-qos system_network_policy
class type network-qos nc1
match qos-group 1
mtu 1500
set cos 2
class type network-qos nc2
match qos-group 2
mtu 1500
congestion-control dctcp ecn-threshold 30000 bytes
class type network-qos nc3
match qos-group 3
mtu 1500
congestion-control random-detect ecn
class type network-qos class-default
match qos-group 0
mtu 1500
Note |
When configuring LLFC/PFC, use the pause no-drop/pfc-cos command. For more information, see "Configuring Link Level Flow Control" and "Configuring Priority Flow Control". |
Queuing Policy Type
A queuing policy type is used to define the scheduling characteristics of the queues associated with system classes.
The Cisco Nexus device supports type queuing in the egress direction.
Note |
Some configuration parameters when applied to a Port Channel are not reflected on the configuration of the member ports. |
Note |
Queuing shaping functionality is not supported for the Nexus 3500. |
-
Classification—The traffic that matches this class are as follows:
-
QoS Group—A class map of type queuing identifies a system class and is matched by its associated QoS group.
-
-
Policy—The actions that are performed on the matching traffic are as follows:
Note
These policies can be attached to the system qos target or to any interface. The output queuing policy is used to configure output queues on the device associated with system classes.
-
Bandwidth—Sets the guaranteed scheduling deficit weighted round robin (DWRR) percentage for the system class.
-
Priority—Sets a system class for strict-priority scheduling. Only one system class can be configured for priority in a given queuing policy.
-
QoS Policy Type
A QoS policy type is used to classify traffic that is based on various Layer 2, Layer 3, and Layer 4 fields in the frame and to map it to system classes.
Note |
Some configuration parameters when applied to a Port Channel are not reflected on the configuration of the member ports. |
-
Classification—The traffic that matches this class are as follows:
-
Access Control Lists—Classifies traffic based on the criteria in existing ACLs.
-
Class of Service—Matches traffic based on the CoS field in the frame header.
-
DSCP—Classifies traffic based on the Differentiated Services Code Point (DSCP) value in the DiffServ field of the IP header.
-
IP Real Time Protocol—Classifies traffic on the port numbers used by real-time applications.
-
Precedence—Classifies traffic based on the precedence value in the type of service (ToS) field of the IP header.
-
-
Policy—The actions that are performed on the matching traffic are as follows:
Note
This policy can be attached to the system or to any interface. It applies to input traffic only.
Note
Ingress/Egress policers are not supported in Nexus 3500.
-
QoS Group—Sets the QoS group that corresponds to the system class this traffic flow is mapped to.
-
Cisco Nexus device supports the following:
-
Five QoS groups
-
Five queues for unicast
-
Five queues for multicast
-
-
-
MTU
The Cisco Nexus device supports one MTU for all classes for all ports.
When configuring MTU, follow these guidelines:
-
For the Cisco Nexus device, the MTU is controlled by the value configured on the class default. No MTU configuration is required under non-default network-qos classes. MTU configuration CLI under non-default classes is blocked. MTU configuration under default class is implicitly applied to all user defined classes.
-
Enter the system jumbomtu command to define the upper bound of any MTU in the system. The system jumbo MTU has a default value of 9216 bytes. The minimum MTU is 1500 bytes and the maximum MTU is 9216 bytes.
-
The system class MTU sets the MTU for all packets in the class. The system class MTU cannot be configured larger than the global jumbo MTU.
-
The default system class has a default MTU of 1500 bytes. You can configure this value.
-
You can specify the MTU value for either a single Layer 3 interface or a range of Layer 3 interfaces. When you change the Layer 3 interface MTU value to the jumbo MTU value (1500 bytes or greater), you must also change the network QoS MTU value to 1500 bytes or greater. The device generates a syslog message to inform you of this requirement.
Trust Boundaries
The trust boundary is enforced by the incoming interface as follows:
-
By default, all Ethernet interfaces are trusted interfaces.The 802.1p CoS and DSCP are preserved unless the marking is configured. There is no default CoS to queue and DSCP to queue mapping. You can define and apply a policy to create these mappings. By default, without a user defined policy, all traffic is assigned to the default queue.
-
Any packet that is not tagged with an 802.1p CoS value is classified into the default drop system class. If the untagged packet is sent over a trunk, it is tagged with the default untagged CoS value, which is zero.
-
You can override the default untagged CoS value for an Ethernet interface or port channel.
After the system applies the untagged CoS value, QoS functions the same as for a packet that entered the system tagged with the CoS value.
Ingress Classification Policies
You use classification to partition traffic into classes. You classify the traffic based on the packet property (CoS field) or the packet header fields that include IP precedence, Differentiated Services Code Point (DSCP), and Layer 2 to Layer 4 parameters. The values used to classify traffic are called match criteria.
Traffic that fails to match any class is assigned to a default class of traffic called class-default.
Egress Queuing Policies
You can associate an egress policy map with an Ethernet interface to guarantee the bandwidth for the specified traffic class or to configure the egress queues.
Each Ethernet interface supports up to five queues, one for each system class. The queues have the following default configuration:
-
In addition to these queues, control traffic that is destined for the CPU uses strict priority queues. These queues are not accessible for user configuration.
-
Standard Ethernet traffic in the default drop system class is assigned a queue. This queue uses WRR scheduling with 100 percent of the bandwidth.
If you add a system class, a queue is assigned to the class. You must reconfigure the bandwidth allocation on all affected interfaces. Bandwidth is not dedicated automatically to user-defined system classes.
You can configure one strict priority queue. This queue is serviced before all other queues except the control traffic queue (which carries control rather than data traffic).
QoS for Traffic Directed to the CPU
The device automatically applies QoS policies to traffic that is directed to the CPU to ensure that the CPU is not flooded with packets. Control traffic, such as bridge protocol data units (BPDU) frames, is given higher priority to ensure delivery.