Configuring Policy Maps
This chapter contains the following sections:
Information About Policy Types
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
Creating 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.
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
-
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.
Configuring Type QoS Policies
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. |
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
Configuring Type Network QoS Policies
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)#
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 8 |
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
Configuring Type Queuing Policies
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. |
Verifying the Policy Map Configuration
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. |