This chapter describes the configurable Cisco Nexus 7000 Series NX-OS Quality of Service (QoS) features on the device.
QoS allows you to classify the network traffic, police and prioritize the traffic flow, and provide congestion avoidance.
This chapter includes the following sections:
•Information About QoS Features
•High Availability Requirements for QoS Features
•QoS Feature Configuration with MQC
•Default QoS Behavior
Information About QoS Features
You use the QoS features to provide the most desirable flow of traffic through a network. QoS allows you to classify the network traffic, police and prioritize the traffic flow, and provide congestion avoidance. The control of traffic is based on the fields in the packets that flow through the system. You use the Modular QoS CLI (MQC) to create the traffic classes and policies of the QoS features.
QoS features are applied using QoS policies and queuing policies, as follows:
•QoS policies include the policing feature and the marking features.
•Queuing policies use the queuing and scheduling features as well as a limited set of the marking feature.
Note The system-defined QoS features and values that are discussed in Chapter 2 "Using Modular QoS CLI" apply globally to the entire switch and cannot be modified. See the Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide, Release 4.2 for complete information on VDCs.
This section includes the following topics:
•Queuing and Scheduling
•Sequencing of QoS Actions
Traffic is processed based on how you classify it and the policies that you create and apply to traffic classes.
To configure QoS features, you use the following steps:
1. Create traffic classes by classifying the incoming and outgoing packets that match criteria such as IP address or QoS fields.
2. Create policies by specifying actions to take on the traffic classes, such as limiting, marking, or dropping packets.
3. Apply policies to a port, port channel, VLAN, or a subinterface.
You use MQC to create the traffic classes and policies of the QoS features. For more information, see Chapter 2 "Using Modular QoS CLI."
Note The queuing and scheduling operations of the overall QoS feature use IPv6 and IPv4; the rest of the feature uses only IPv4.
You use classification to partition traffic into classes. You classify the traffic based on the port characteristics (CoS field) or the packet header fields that include IP precedence, Differentiated Services Code Point (DSCP), Layer 2 to Layer 4 parameters, and the packet length.
The values used to classify traffic are called match criteria. When you define a traffic class, you can specify multiple match criteria, you can choose to not match on a particular criterion, or you can determine traffic class by matching any or all criteria.
Traffic that fails to match any class is assigned to a default class of traffic called class-default.
For more information about configuring classification, see Chapter 3 "Configuring Classification."
Marking is the setting of QoS information that is related to a packet. You can set the value of standard QoS fields IP precedence, DSCP and Class of Service (CoS), and internal labels that can be used in subsequent actions. Marking is used to identify the traffic type for use in policing, queuing, and scheduling traffic (only CoS is used in scheduling).
For more information about configuring marking, see Chapter 4 "Configuring Marking."
Mutation is the changing of packet header QoS fields. You can map IP precedence, DSCP, or CoS values to all incoming or outgoing packets. You can use mutation in policies that contain policing commands, but you cannot use mutation in queuing and scheduling commands. You use configurable, user-defined table maps for mutation.
For more information about configuring mutation, see Chapter 5 "Configuring Mutation Mapping."
Policing is the monitoring of data rates for a particular class of traffic. The device can also monitor associated burst sizes.
Three "colors," or conditions, are determined by the policer depending on the data rate parameters supplied: conform (green), exceed (yellow), or violate (red). You can configure only one action for each condition. When the data rate exceeds the user-supplied values, packets are either marked down or dropped. You can define single-rate, dual-rate, and color-aware policers.
Single-rate policers monitor the specified committed information rate (CIR) of traffic. Dual-rate policers monitor both CIR and peak information rate (PIR) of traffic. Color-aware policers assume that traffic has been previously marked with a color.
For more information about configuring policing, see Chapter 6 "Configuring Policing."
Queuing and Scheduling
The queuing and scheduling process allows you to control the bandwidth allocated to traffic classes, so you achieve the desired trade-off between throughput and latency.
You can apply weighted random early detection (WRED) to a class of traffic, which allows packets to be dropped based on the Class of Service (CoS) field. The WRED algorithm allows you to perform proactive queue management to avoid traffic congestion.
You can schedule traffic by imposing a maximum data rate on a class of traffic so that excess packets are retained in a queue to smooth (constrain) the output rate.
For information about configuring queuing and scheduling, see Chapter 7 "Configuring Queuing and Scheduling."
Sequencing of QoS Actions
The following are the two types of policies:
•qos—Defines MQC objects that you can use for marking and policing.
•queuing—Defines MQC objects that you can use for queuing and scheduling as well as a limited set of the marking objects.
Note The default type of policy is qos. You cannot apply QoS policies on egress interfaces.
The Cisco NX-OS device processes the QoS policies that you define based on whether they are applied to ingress or egress packets. The system performs actions for QoS policies only if you define them under the type qos service policies.
Note You can apply only ingress traffic actions for QoS policies on Layer 2 interfaces. You can apply both ingress and egress traffic actions on Layer 3 interfaces.
This section includes the following topics:
•Sequencing of Ingress Traffic Actions
•Sequencing of Egress Traffic Actions
Sequencing of Ingress Traffic Actions
The sequence of QoS actions on ingress traffic is as follows:
1. Queuing and scheduling
Sequencing of Egress Traffic Actions
The sequencing of QoS actions on egress traffic is as follows:
5. Queuing and scheduling
Note Mutation happens much closer to the beginning of the traffic actions on the ingress packets, and any further classification and policing is based on the changed QoS values. Mutation happens at the end of the traffic actions on the egress packets, right before queuing and scheduling.
High Availability Requirements for QoS Features
The Cisco NX-OS QoS software recovers its previous state after a software restart, and it is able to switch over from the active supervisor to the standby supervisor without a loss of state.
Note See the Cisco Nexus 7000 Series NX-OS High Availability and Redundancy Guide, Release 4.2 for complete information on high availability.
QoS Feature Configuration with MQC
You use MQC to configure QoS features. The MQC configuration commands are shown in Table 1-1.
Table 1-1 MQC Configuration Commands
Defines a class map that represents a class of traffic.
Defines a table map that represents a mapping from one set of field values to another set of field values. You can reference a table map from a policy map.
Defines a policy map that represents a set of policies to be applied to a set of class maps. Policy maps can reference table maps.
You can modify or delete MQC objects, except system-defined objects, when the objects are not associated with any interfaces. See Chapter 2 "Using Modular QoS CLI" for information on system-defined MQC objects.
Once a QoS policy is defined, you can attach the policy map to an interface using the interface configuration command shown in Table 1-2.
Table 1-2 Interface Command to Attach a Policy Map to an Interface
Applies the specified policy map to input or output packets on the interface.
For information about using MQC, see Chapter 2 "Using Modular QoS CLI."
Statistics are maintained for each policy, class action, and match criteria per interface. You can enable or disable the collection of statistics, you can display statistics using the show policy-map interface command, and you can clear statistics based on an interface or policy map with the clear qos statistics command. Statistics are enabled by default and can be disabled globally.
For information about monitoring QoS statistics, see Chapter 8 "Monitoring QoS Statistics."
Default QoS Behavior
The QoS queuing features are enabled by default. Specific QoS-type features, policing and marking, are enabled only when a policy is attached to an interface. Specific policies are enabled when that policy is attached to an interface.
By default, the device always enables a system default queuing policy, or system-defined queuing policy map, on each port and port channel. When you configure a queuing policy and apply the new queuing policy to specified interfaces, the new queuing policy replaces the default queuing policy and those rules now apply. For more information on the system-defined, default queuing policies and the default values that apply to each interface, see Chapter 2 "Using Modular QoS CLI."
The device enables other QoS features, policing and marking, only when you apply a policy map to an interface.