The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter contains the following sections:
The device supports a number of policy types. You create class maps in the policy types.
There are three policy types:
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.
Type queuing—A type queuing policy is used to define the scheduling characteristics of the queues associated with 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:
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.
Note |
|
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.
Note | The applied type qos policies must have the corresponding classes defined in the type network-qos policy. |
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 | When you apply a type qos service policy on a FEX fabric port, it is not rejected. However, the type QoS service policy is never applied. |
Configuring Policy Maps
The policy-map command is used to create a named object that represents a set of policies that are to be applied to a set of traffic classes.
The following predefined policy maps are used as default service policies:
You need to create a policy map to specify the policies for any user-defined class. In the policy map, you can configure the QoS parameters for each class. You can use the same policy map to modify the configuration of the default classes.
The device distributes all the policy-map configuration values to the attached network adapters.
Before creating the policy map, define a class map for each new system class.
Type network qos policies can only be configured on the system qos attachment point. They are applied to the entire switch for a particular class.
Note | If FCoE QoS policy is configured and offloaded to FEX without configuring the FCoE Network QoS policy, offloaded QoS policy on the FEX is unable to identify the FCoE class and therefore, QoS policy will not be applied on the FCoE traffic. Hence it is required to have the FCoE network QoS policy configured before offloading the FCoE QoS policy to the FEX. |
Command or Action | Purpose | |||||
---|---|---|---|---|---|---|
Step 1 | switch# configure terminal |
Enters global configuration mode. | ||||
Step 2 |
switch(config)#
policy-map
type network-qos
policy-name
|
Creates a named object that represents a set of policies that are to be applied to a set of traffic classes. Policy-map names can contain alphabetic, hyphen, or underscore characters, are case sensitive, and can be up to 40 characters. | ||||
Step 3 |
switch(config-pmap-nq)#
class type
network-qos
class-name
|
Associates a class map with the policy map, and enters configuration mode for the specified system class.
| ||||
Step 4 |
switch(config-pmap-c-nq)#
mtu
mtu-value
|
Specifies the MTU value in bytes.
| ||||
Step 5 |
switch(config-pmap-c-nq)#
no mtu
| (Optional)
Resets the MTU value in this class. | ||||
Step 6 | switch(config-pmap-c-nq)#
pause
no-drop
| Configures a no-drop class. | ||||
Step 7 |
switch(config-pmap-c)#
pause
no-drop [pfc-cos
pfc-cos-value]
|
Configures a no-drop class. If you do not specify this command, the default policy is drop.
The pfc-cos-value range is from 0 to 7. This option is supported only for for a ACL-based system class (which filters traffic using criteria other than cos-based matches).
| ||||
Step 8 |
switch(config-pmap-c-nq)#
no pause
no-drop
| (Optional)
Removes the no-drop option from this class. | ||||
Step 9 |
switch(config-pmap-c-nq)#
set
cos
cos-value
|
Specifies a 802.1Q CoS value which is used to mark packets on this interface. The value range is from 0 to 7. | ||||
Step 10 |
switch(config-pmap-c-nq)#
no set
cos
cos-value
| (Optional)
Disables the marking operation in this class. |
This example shows how to define a type network-qos policy map:
switch# configure terminal switch(config)# policy-map type network-qos policy-que1 switch(config-pmap-nq)# class type network-qos class-que1 switch(config-pmap-c-nq)# mtu 5000 switch(config-pmap-c-nq)# set cos 4
Type qos policies are used for classifying the traffic of a specific system class identified by a unique qos-group value. A type qos policy can be attached to the system or to individual interfaces for ingress traffic only.
You can set a maximum of five QoS groups for ingress traffic.
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 | switch# configure terminal |
Enters global configuration mode. | ||
Step 2 | switch(config)# policy-map type qos policy-name |
Creates a named object that represents a set of policies that are to be applied to a set of traffic classes. Policy-map names can contain alphabetic, hyphen, or underscore characters, are case sensitive, and can be up to 40 characters. | ||
Step 3 | switch(config-pmap-qos)# [class | class-default] type qos class-name |
Associates a class map with the policy map, and enters configuration mode for the specified system class.
| ||
Step 4 | switch(config-pmap-c-qos)# set qos-group qos-group-value |
Configures one or more qos-group values to match on for classification of traffic into this class map. The list below identifies the ranges of the qos-group-value . There is no default value. |
This example shows how to define a type qos policy map:
switch# configure terminal switch(config)# policy-map type qos policy-s1 switch(config-pmap-qos)# class type qos class-s1 switch(config-pmap-c-qos)# set qos-group 2
Type queuing policies are used for scheduling and buffering the traffic of a specific system class. A type queuing policy is identified by its QoS group and can be attached to the system or to individual interfaces (except for Fabric Extender host interfaces) for input or output traffic.
Command or Action | Purpose | |||||
---|---|---|---|---|---|---|
Step 1 | switch# configure terminal |
Enters global configuration mode. | ||||
Step 2 |
switch(config)#
policy-map
type queuing
policy-name
|
Creates a named object that represents a set of policies that are to be applied to a set of traffic classes. Policy-map names can contain alphabetic, hyphen, or underscore characters, are case sensitive, and can be up to 40 characters. | ||||
Step 3 |
switch(config-pmap-que)#
class type
queuing
class-name
|
Associates a class map with the policy map, and enters configuration mode for the specified system class. | ||||
Step 4 |
switch(config-pmap-c-que)#
priority
|
Specifies that traffic in this class is mapped to a strict priority queue.
| ||||
Step 5 |
switch(config-pmap-c-que)#
no
priority
| (Optional)
Removes the strict priority queuing from the traffic in this class. | ||||
Step 6 |
switch(config-pmap-c-que)#
bandwidth
percent
percentage
|
Specifies the guaranteed percentage of interface bandwidth allocated to this class. By default, no bandwidth is specified for a class.
| ||||
Step 7 |
switch(config-pmap-c-que)#
no bandwidth
percent
percentage
| (Optional)
Removes the bandwidth specification from this class. |
The qos statistics command must be enabled when you migrate to Cisco NX-OS release 7.3(0)N1(1) to enable statistics for policy maps. In addition, the existing policies need to be removed and reassigned to ensure the statistics work. Any new policy maps (that are not already configured on any interface) configured after enabling statistics would have the statistics enabled.
From Cisco NX-OS release 7.3(2)N1(1), the following changes are introduced:
You do not need to use the qos statistics command to enable the QoS statistics. By default, the QoS statistics is enabled.
The class-map and match statistics are not supported. Both these statistics are not displayed when you run the show policy-map interface command.
The policer statistics are still supported and the queuing statistics are added to the show policy-map interface command output. Note that the queuing statistics are supported only for the Ethernet interfaces.
The detailed procedure is as follows:
Enabling statistics can take up additional TCAM space. Hence, you must ensure that there is enough space available to perform this operation, given the existing configuration. Refer to CSCuq00149 for details on whether the statistics can be enabled on your switch.
Step 1 | Enter global
configuration mode:
switch# configure terminal | ||||
Step 2 | (Optional)
Verify the
existing status of the statistics on your switch:
switch(config)# show policy-map vlan vlan-number | ||||
Step 3 | (Optional)
Enable the
statistics, if the existing status of the statistics is disabled on your
switch:
switch(config)# qos statistics
| ||||
Step 4 | Enter VLAN
configuration mode for the specified VLAN:
switch(config)# vlan configuration vlan-number | ||||
Step 5 | Remove the
policy from the VLAN:
switch(config-vlan-config)# no service-policy type qos input policy-name The policy-name is the name assigned to the policy map. | ||||
Step 6 | Enter VLAN
configuration mode for the specified VLAN:
switch(config-vlan-config)# vlan configuration vlan-number | ||||
Step 7 | Assign or
reapply the policy map to the VLAN:
switch(config-vlan-config)# service-policy type qos input policy-name
| ||||
Step 8 | Verify the
status of the statistics on your switch:
switch(config-vlan-config)# show policy-map vlan vlan-number
|
This example shows how to enable and display QoS statistics.
switch(config)# show policy-map vlan 13 Global statistics status: disabled Vlan 13 Service-policy (qos) input: rq1 policy statistics status: disabled Class-map (qos): rq1 (match-any) Match: cos 4 set qos-group 2 Class-map (qos): class-default (match-any) Match: any set qos-group 0 switch(config)# qos statistics Warning: Turning on the statistics would increase the TCAM utilisation. Disable the CLI if this is not intended. Note that the policies need to be removed and re-applied, for statistics to take effect. switch(config)#vlan configuration 13-59 switch(config-vlan-config)#no service-policy type qos input rq1 switch(config-vlan-config)#vlan configuration 13 switch(config-vlan-config)#service-policy type qos input rq1 switch(config-vlan-config)# show policy-map vlan 13 Global statistics status: enabled Vlan 13 Service-policy (qos) input: rq1 policy statistics status: enabled Class-map (qos): rq1 (match-any) 3094788 packets Match: cos 4 3094788 Match packets set qos-group 2 Class-map (qos): class-default (match-any) 0 packets Match: any set qos-group 0 switch(config-vlan-config)#
The following example shows the output of the show policy-map interface command in the Cisco NX-OS release 7.3(2)N1(1).
switch(config)# show policy-map interface ethernet 1/49 Global statistics status : enabled NOTE: Type qos policy-map configured on VLAN will take precedence over system-qos policy-map for traffic on the VLAN Ethernet1/49 Service-policy (qos) input: cos policy statistics status: enabled Class-map (qos): cos3 (match-all) Match: cos 3 set qos-group 2 police cir percent 60 bc 200 ms conformed 300579840 bytes, 899939640 bps action: transmit violated 43806000 bytes, 131155688 bps action: drop Class-map (qos): cos4 (match-all) Match: cos 4 set qos-group 4 Class-map (qos): class-default (match-any) Match: any set qos-group 0 Service-policy (queuing) input: fcoe-default-in-policy policy statistics status: disabled Class-map (queuing): class-fcoe (match-any) Match: qos-group 1 bandwidth percent 50 Class-map (queuing): class-default (match-any) Match: qos-group 0 bandwidth percent 50 Service-policy (queuing) output: fcoe-default-out-policy policy statistics status: disabled Class-map (queuing): class-fcoe (match-any) Match: qos-group 1 queue dropped pkts : 0 queue received pkts : 0 bandwidth percent 50 Class-map (queuing): class-default (match-any) Match: qos-group 0 queue dropped pkts : 57346780 queue received pkts : 155740874 bandwidth percent 50
Due to the way statistics and policers are attached to the TCAM entries, there are certain limitations to viewing the statistics:
Command |
Purpose |
---|---|
show policy-map [name] |
Displays the policy maps defined on the switch. Optionally, you can display the named policy only. |
show policy-map interface [interface number] |
Displays the policy map settings for an interface or all interfaces. |
show policy-map system |
Displays the policy map settings attached to the system qos. |
show policy-map type {network-qos | qos | queuing} [name] |
Displays the policy map settings for a specific policy type. Optionally, you can display the named policy only. |
running-config ipqos |
Displays information about the running configuration for QoS. |
startup-config ipqos |
Displays information about the startup configuration for QoS. |