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.
Before you enable FCoE on the Cisco Nexus device, you must enable class-fcoe in the three types of qos policies (network QoS, queuing, and QoS) by entering the type qos policy maps command and applying at least one FCoE QoS policy under system 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:
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. Each system class has a default MTU and the system class MTU is configurable.
Multicast optimization—This configuration specifies if the performance of multicast traffic mapped to this class will be optimized.
Pause no-drop—No drop specifies lossless service for the system class. Drop specifies that tail drop is used (arriving packets are dropped when the queue reaches its allocated size) when a queue for this system class is full.
An additional parameter pfc-cos can be configured. This parameter identifies the class of service (CoS) values to assert priority flow control (PFC) when traffic for a no-drop system class is not mapped based purely on CoS experiences congestion.
You can change the buffer for the no-drop class.
Queue Limit—This configuration specifies the number of buffers that need to be reserved to the queues of this system class. This option is not configurable for no-drop system classes.
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. The input queuing policy is used to configure scheduling for queues in the CNA. The input queuing policy parameters are signaled to the CNA over the DCBX protocol. |
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.
Protocol—Classifies traffic based on the IPv4 Protocol field or the IPv6 Next Header 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. |
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 device provides two default system classes: a no-drop class for lossless service (class-fcoe) and a drop class for best-effort service (class-default). You can define up to four additional system classes for Ethernet traffic.
![]() Note | The Cisco Nexus 5500 Series device supports five user-defined classes and one default drop system class. |
The following predefined policy maps are used as default service policies:
network-qos: default-nq-policy
Input qos: default-in-policy
Input queuing: default-in-policy
Output queuing: default-out-policy
For the Cisco Nexus 5500 Series device, there are four pre-defined policy maps for FCoE:
service-policy type qos input fcoe-default-in-policy
service-policy type queuing input fcoe-default-in-policy
service-policy type queuing output fcoe-default-out-policy
service-policy type network-qos fcoe-default-nq-policy
When class-fcoe is not included in the qos policies, vFC interfaces do not come up and increased drops occur.
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 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 (including Fabric Extender host 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. For the Cisco Nexus 5500 Series device, the range is from 1 to 5. |
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 network qos policies can only be configured on the system qos attachment point. They are applied to the entire switch for a particular class.
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-nq)#
multicast-optimize
|
Enables multicast optimization. Multicast traffic in this class will be served by all available multicast queues.
| ||||
Step 8 |
switch(config-pmap-c-nq)#
no
multicast-optimize
| (Optional)
Disables multicast optimization. | ||||
Step 9 |
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 10 |
switch(config-pmap-c-nq)#
no pause
no-drop
| (Optional)
Removes the no-drop option from this class. | ||||
Step 11 |
switch(config-pmap-c-nq)#
queue-limit
number-bytes
bytes
|
Specifies the tail drop threshold on this interface. The threshold range is from 20480 to 204800 bytes. For the Cisco Nexus device, the range is from 20480 to 426880 bytes.
Use the pause no-drop buffer size option to change the buffer size and pause threshold for the no-drop class. | ||||
Step 12 |
switch(config-pmap-c-nq)#
no
queue-limit
number-bytes
bytes
| (Optional)
Disables the queue limit specification in this class. | ||||
Step 13 |
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 14 |
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 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. |
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 | switch#
configure
terminal
Enters global configuration mode. | ||
Step 2 | switch(config)#
show policy-map
vlan
vlan-number
Verify the existing status of the statistics on your switch. 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)# | ||
Step 3 | switch(config)#
qos statistics
Enable the statistics. 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)# | ||
Step 4 |
switch(config)#
vlan
configuration
vlan-number
Enter VLAN configuration mode for the specified VLAN. switch(config)#vlan configuration 13-59 | ||
Step 5 |
switch(config-vlan-config)#
no service-policy type qos
input
policy-name
Remove the policy from the VLAN. The policy-name is the name assigned to the policy map. switch(config-vlan-config)#no service-policy type qos input rq1 | ||
Step 6 |
switch(config-vlan-config)#
vlan
configuration
vlan-number
Enter VLAN configuration mode for the specified VLAN. switch(config-vlan-config)#vlan configuration 13 | ||
Step 7 |
switch(config-vlan-config)#
service-policy type qos
input
policy-name
Assign or reapply the policy map to the VLAN. The policy-name is the name assigned to the policy map. Note that the policy must be removed from all attachment points (VLANs and interfaces) before you enable the statistics on even one attachment point. switch(config-vlan-config)#service-policy type qos input rq1 | ||
Step 8 |
switch(config-vlan-config)#
show policy-map
vlan
vlan-number
Verify the status of the statistics on your switch. You can also use the show policy-map interface command. 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)#
|
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. |