Information About QoS Features

The configurable Cisco NX-OS quality of service (QoS) features on the switch allow you to classify the network traffic, police and prioritize the traffic flow, and provide congestion avoidance. The QoS features are configured using Cisco Modular QoS CLI (MQC).

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:

1. Define traffic classes.

2. Associate policies and actions with each traffic class.

3. Attach policies to logical or physical interfaces as well as at the global system level.

•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 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.

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 enables the configuration of QoS policies such as marking, bandwidth allocation, buffer allocation, and so on.

The system qos is a type of MQC target. A service policy can 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 system and their attributes. To ensure QoS consistency (and for ease of configuration), the switch distributes the system class parameter values to all its attached network adapters using the Data Center Bridging Exchange (DCBX) protocol.

If service policies are configured at the interface level, the interface-level policy always takes precedence over system class configuration or defaults.

The qos type is the default for the class-map and policy-map commands.

Policy Types

This section describes the policy types the switch supports and includes the following topics:

Note 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. 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.

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. This section includes the following topics:

Classification

Policy

A network-qos policy can only be attached to the system QoS target. The following characteristics can be set under this policy:

1. MTU—The MTU must 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.

2. Pause no-drop—No drop specifies lossless service for the system class. Drop specifies that tail drop is used when a queue for this system class is full. This identifies CoS values to assert priority flow control (PFC) when traffic for a no-drop system class not mapped based purely on CoS experiences congestion.

3. Congestion Control WRED —WRED attempts to anticipate and avoid congestion rather than control congestion once it occurs. You can configure congestion avoidance with WRED in egress policy maps.

Type queuing

A type queuing policy is used to define scheduling characteristics of queues associated with system classes. This section includes the following topics:

Classification

CoS—A class-map of type network-qos identifies a CoS.

Policy

These policies can be attached to the system qos target or to any interface. Output queueing policy is used to configure output queues on the switch associated with system classes. The output queuing policy parameters are signaled to the adapter over the DCBX protocol. The following characteristics can be configured under this policy:

Note If you configure any one of the two characteristics (bandwidth or priority), you cannot configure the other characteristic in the same policy map.

1. Bandwidth—Sets the guaranteed scheduling deficit weighted round robin (DWRR) percentage for the system class. You can configure the bandwidth and bandwidth remaining on egress queues to allocate a minimum percentage of the interface bandwidth to a queue.

2. Priority—Sets a system class for strict-priority scheduling. Only one system class can be configured for priority in an egress priority queue. If you do not specify the priority, the system-defined egress priority queues behave like normal queues. For the non-priority queues, you can configure how much of the remaining bandwidth to assign to each queue. By default, the device evenly distributes the remaining bandwidth among the nonpriority queues.

3. Shaping—Configures shaping on an egress queue to impose a maximum rate on it. You use the system-defined egress queue class. Use the system-defined egress queue class to apply the policy map.

Type qos

A type qos policy is used to classify traffic based on various ACLs and map it to classes. This section includes the following topics:

Classification

Access control lists—The incoming traffic is classified based on the ACLs.

Policy

This policy can be attached to any interface. It applies to input traffic only.

Cos—Sets the CoS corresponding to the system class which is defined by ACL.

Link-Level Flow Control

The IEEE 802.3x link-level flow control capability allows a congested receiver to communicate the far end to pause its data transmission for a short period of time. The link-level flow control feature applies to all the traffic on the link.

The transmit and receive directions are separately configurable. By default, link-level flow control is disabled for both directions.

On the switch, Ethernet interfaces do not auto-detect the link-level flow control capability. You must configure the capability explicitly on the Ethernet interfaces.

On each Ethernet interface, the switch can enable either priority flow control or link-level flow control (but not both).

Priority Flow Control

The priority flow control (PFC) capability allows you to apply pause functionality to specific classes of traffic on a link (instead of all the traffic on the link). PFC applies pause functionality based on the IEEE 802.1p CoS value. When the switch enables PFC, it communicates to the adapter which CoS values to apply the pause.

Ethernet interfaces use PFC to provide lossless service to no-drop system classes. PFC implements Pause frames on a per-class basis and uses the IEEE 802.1p CoS value to identify the classes that require lossless service.

In the switch, each system class has an associated IEEE 802.1p CoS value (assigned by default or configured on the system class). If PFC is enabled, the switch sends the no-drop CoS values to the adapter, which then applies PFC to these CoS values.

The default CoS value for the FCoE system class is 3 and this value is configurable.

By default, the switch negotiates to enable the PFC capability. If the negotiation succeeds, PFC is enabled and link-level flow control remains disabled (regardless of its configuration settings). If the PFC negotiation fails, you can either force PFC to be enabled on the interface or you can enable IEEE 802.x link-level flow control.

If PFC is not enabled on an interface, you can enable IEEE 802.3X link-level pause. By default, link-level pause is disabled.

MTU

The switch is a Layer 2 switch, and it does not support packet fragmentation. MTU configuration mismatch between ingress and egress interfaces may result in packets being truncated.

When configuring MTU, follow these guidelines:

•MTU is specified per system class. You cannot configure MTU on the interfaces.

•The system jumbomtu command defines the upper bound of any MTU in the system. System jumbo MTU has a default value of 9216 bytes. The minimum MTU is 2240 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 FCoE system class (for Fibre Channel and FCoE traffic) has a default MTU of 2240 bytes. This value cannot be modified.

•The default drop system class has a default MTU of 1538 bytes. You can configure this value.

•The switch sends the MTU configuration to network adapters that support DCBXP.

•When an MTU size change is made to a system where traffic is flowing, there will be packet drops.

Trust Boundaries

The trust boundary is enforced by the incoming interface as follows:

•By default, all Ethernet interfaces are trusted interfaces. A packet tagged with an 802.1p CoS value is classified into a system class using the value in the packet.

•Any packet that is not tagged with an 802.1p CoS value is tagged with the default untagged CoS value, which is zero.

After the system applies the untagged CoS value, QoS functions in the same way as it does for a packet that entered the system tagged with the CoS value.

Ingress Classification Policies

You can classify traffic by matching packets based on an existing access control list (ACL).

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.

The bandwidth allocation limit applies to all traffic on the interface.

Each Ethernet interface supports up to eight queues (one for each CoS). The default CoS to queue mapping of each of these queues is listed in Table 30-1. You can also configure a strict priority queue. This queue is serviced before all other queues.

Note The following table lists the default mapping, but CoS to queue mapping can be changed by the user. Also, no-drop traffic can only be mapped to the following three queues: out-q-default, pq1, and out-q2.

Type queuing class maps that are defined by the system are listed in Table 30-1.

QoS for Traffic Directed to the CPU

The switch 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 BPDU frames, is given higher priority to ensure delivery.

Configuration Guidelines and Limitations

To maintain optimal switch performance, follow these guidelines when configuring system classes and policies:

•One or more CoS are mapped to a queue number (see Table 30-1). A maximum of three no- drop queues can be configured. No-drop traffic can only be mapped to the three queues: out-q-default, pq1, and out-q2. Queue 0-2 can be no-drop only.

•If priority flow control is enabled on an Ethernet interface, pause will never be applied to traffic with a drop system class. PFC does not apply pause to drop classes and the link-level pause feature is never enabled on an interface with PFC.

•If FCoE is enabled in the first setup, CoS 3 is mapped to queue 0, and it belongs to a class that is no-drop.

•When configuring QoS, the no-drop VL, priority grouping, and ETS must be identical for the switch and the Fibre Channel Forwarder (FCF).

When configuring EtherChannel interfaces, note the following guidelines:

•The service policy configured on an EtherChannel applies to all member interfaces.

•The priority flow control configured on an EtherChannel applies to all member interfaces.

Configuring PFC and LLC

This section describes how to configure the Priority Flow Control (PFC) and Link-Level Flow Control (LLC) on Ethernet interfaces supported by the switch and includes the following topics:

The Ethernet interface can operate in two different modes: FCoE mode or standard Ethernet mode.

If the interface is operating in FCoE mode, the Ethernet link is connected at the server port using a converged network adapter (CNA).

If the interface is operating in standard Ethernet mode, the Ethernet link is connected at the server port with a standard Ethernet network adapter (NIC). The network adapter must support DCBX protocol for PFC or ingress policing to be supported on the interface.

Note You must configure a system class with the pause no-drop parameter for PFC to operate on Ethernet traffic (PFC will be applied to traffic that matches the CoS value configured for this class).

Configuring Priority Flow Control

By default, Ethernet interfaces negotiate PFC capability with the network adapter using the DCBX protocol. When PFC is enabled, PFC is applied to traffic that matches the CoS value configured for the no-drop class. You can override the negotiation result by force-enabling the PFC capability.

To force-enable PFC on an interface, perform this task:

Command

Purpose

Step 1

switch # configure terminal

Enters configuration mode.

Step 2

switch(config)# interface type slot/port

Specifies the interface to be changed.

Step 3

switch(config-if)# priority-flow-control mode {auto | on}

Sets PFC mode for the selected interface.

Specify to force-enable PFC.

Specify auto to negotiate PFC capability.

Step 4

switch(config-if)# no priority-flow-control mode on

(Optional) Disables the PFC setting for the selected interface.

The following example shows how to force-enable PFC on an interface:

switch# configure terminal

switch(config)# interface ethernet 1/2

switch(config-if)# priority-flow-control mode on

Configuring IEEE 802.3x Link-Level Flow Control

By default, link-level flow control capability on Ethernet interfaces is disabled. You can enable link-level flow-control capability for the transmit and receive directions.

To enable link-level flow control capability, perform this task:

Command

Purpose

Step 1

switch # configure terminal

Enters configuration mode.

Step 2

switch(config)# interface type slot/port

Specifies the interface to be changed.

Step 3

switch(config-if)# flowcontrol [receive {on | off} | send {on | off}]

Enables IEEE 802.3x link-level flow control for the selected interface. Set receive and/or send on or off.

Configuring System Class Maps

You can create or modify a class map with the class-map command. The class map is a names object that represents a class of traffic. In the class map, you specify a set of match criteria for classifying the packets. You can then reference class maps in policy maps.

To configure class maps, perform this task:

Command

Purpose

Step 1

switch # configure terminal

Enters configuration mode.

Step 2

switch(config)# class-map [type

{network-qos | qos | queuing}]

class-name

Creates or accesses a named object that represents a specified class of traffic. Class map names can contain alphabetic, hyphen, or underscrore characters, are case sensitive, and can be up to 40 characters.

qos—Classification mode; this is the default mode. CLI prompt: switch(config-cmap-qos)#

queuing—Queuing mode. CLI prompt: (config-cmap-que)#

Step 3

switch(config)# no class-map [type

{network-qos | queuing | qos | queuing}]

class-name

(Optional) Deletes the specified class map.

Note You cannot delete the two system defined class maps, class-fcoe, and class-default.

The following example configures a class map with class name class1 for type qos:

switch# configure terminal

switch(config)# class-map type qos class1

Configuring ACL Classification

You can classify traffic by matching packets based on an existing access control list (ACL). Traffic is classified by the criteria defined in the ACL. The permit and deny ACL keywords are ignored in the matching; even if a match criteria in the access-list has a deny action, it is still used for matching for this class.

To configure ACL classification, perform this task:

Command

Purpose

Step 1

switch # configure terminal

Enters configuration mode.

Step 2

switch(config)# class-map type qosclass-name

Creates a named object that represents a class of traffic. Class map names can contain alphabetic, hyphen, or underscore characters, are case sensitive, and can be up to 40 characters.

Step 3

switch(config-cmap-qos)# match access-group

nameacl-name

Configures traffic class by matching packets based on acl-name. The permit and deny ACL keywords are ignored in the matching.

Note You can only define a single ACL in a class-map.

Step 4

switch(config-cmap-qos)# no match

access-group nameacl-name

(Optional) Removes the match from the traffic class.

This example shows how to classify traffic by matching packets based on existing ACLs:

switch# configure terminal

switch(config)# class-map type qos class_acl

switch(config-cmap-qos)# match access-group name acl1

This example shows how to classify traffic by matching packets after creating MAC ACL:

switch# config

switch(config)# mac access-list acl1

switch(config-mac-acl)# permit 0000.aaaa.bbbb 0000.0000.ffff any

switch(config-mac-acl)# exit

switch(config)# class-map type qos class1

switch(config-cmap-qos)# match access-group name acl1

switch(config-cmap-qos)# exit

Use the show class-map command to display the ACL class map configuration:

switch# show class-map class1

Configuring CoS Classification

You can classify traffic based on the value of the CoS, which represents a system class. You can set the value of the CoS within a policy map using the set cos command.

Creates a named object that represents a class of traffic for type network-qos. For type queuing, only pre-defined class names are supported. Class map names can contain alphabetic, hyphen, or underscore characters, are case sensitive, and can be up to 40 characters.

Step 3

switch(config-cmap-que)# match cos cos-value

Configures the traffic class by matching packets based on CoS values. Values can range from 0 to 7.

Step 4

switch(config-cmap-qos)# no match coscos-value

(Optional) Removes the match from the traffic class.

This example shows how to classify traffic based on the value of the CoS:

switch# configure terminal

switch(config)# class-map type queuing match-any 1p7q4t-out-q7

switch(config-cmap-que)# match cos 7

Use the show class-map command to display the QoS class map configuration:

switch# show class-map type queuing 1p7q4t-out-q7

Configuring Policy Maps

This section describes how to configure policy maps and includes the following topics:

The following predefined policy maps are used as default service policies:

•network-qos: p-nq-8e

•queuing output: default-out-policy

To create a policy map, perform this task:

Command

Purpose

Step 1

switch # configure terminal

Enters configuration mode.

Step 2

switch(config)# policy-map [type

{network-qos | qos | queuing}]

policy-name

Creates a named object representing 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.

•qos—Classification mode; this is the default mode. CLI prompt: switch(config-pmap-c-qos)#

•queuing—Queuing mode. CLI prompt: switch(config-pmap-c-que)#

The associated class map must be the same type as the policy map type.

Step 5

switch(config-pmap)# no class [type

{network-qos | qos | queuing}]

class-name

(Optional) Deletes the class map association.

This example shows how to configure a policy map after defining an ACL and a class map:

switch(config)# mac access-list mac-acl2

switch(config-mac-acl)# permit 0000.aaaa.bbbb 0000.0000.ffff any

switch(config-mac-acl)# exit

switch(config)# class-map type qos my-class

switch(config-cmap-qos)# match access-group name mac-acl2

switch(config-cmap-qos)# exit

switch(config)# policy-map type qos pm-qos-1

switch(config-pmap-qos)# class type qos my-class

switch(config-pmap-c-qos)# set cos 2

switch(config-pmap-c-qos)#

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 system for a particular class.

To configure a type network qos policy, perform this task:

Command

Purpose

Step 1

switch # configure terminal

Enters configuration mode.

Step 2

switch(config)# policy-map [type

{network-qos | qos | queuing}]

policy-name

Creates a named object representing 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-qosclass-name

Associates a class map with the policy map, and enters configuration mode for the specified system class.

Note The associated class map must be the same type as the policy map type.

Note The mtu-value you configure must be less than value set by the system jumbomtu command.

(Optional) Enables the WRED protocol.

Step 5

switch(config-pmap-nq-c)# no mtu

(Optional) Resets the MTU value in this class.

Step 6

switch(config-pmap-nq-c)# no congestion-control random-detect

(Optional) Removes the congestion-control random detect feature.

Step 7

switch(config-pmap-nq-c)# pause no-drop

Configures a no-drop class. If you do not specify this command, the default policy is drop.

The operation for drop policy is simple tail drop, where arriving packets are dropped if the queue increases to its allocated size.

Step 8

switch(config-pmap-nq-c)# no pause no-drop

(Optional) Removes the no-drop option from this class.

The following example shows how to define a type network-qos policy map including a class with MTU and pause no-drop and a class with random detect:

switch# configure terminal

switch(config)# class-map type network-qos class-que1

switch(config-cmap-nq)# match cos 5

switch(config-cmap-nq)# exit

switch(config)# policy-map type network-qos policy-que1

switch(config-pmap-nq)# class type network-qos class-que1

switch(config-pmap-nq-c)# mtu 5000

switch(config-pmap-nq-c)# pause no-drop

switch(config-pmap-nq-c)# exit

switch(config-pmap-nq)# exit

switch(config)# class-map type network-qos class-que2

switch(config-cmap-nq)# match cos 4

switch(config-cmap-nq)# exit

switch(config)# policy-map type network-qos policy-que1

switch(config-pmap-nq)# class type network-qos class-que2

switch(config-pmap-nq-c)# congestion-control random-detect

switch(config-pmap-nq-c)#

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 cos and can be attached to the system or to individual interfaces for output traffic.

To configure a type queuing policy, perform this task:

Command

Purpose

Step 1

switch # configure terminal

Enters configuration mode.

Step 2

switch(config)# policy-map type queuing

policy-name

Creates a named object representing a set of policies that are to be applied to a set of traffic classses. Policy map names can contain alphabetic, hyphen, or or underscore characters, are case sensitive, and can be up to 40 characters.

Step 3

switch(config-pmap-que)# class type

queuingclass-name

Associates a class map with the policy map, and enters configuration mode for the specified system class.

(Optional) Removes the bandwidth or shape specification from this class.

Step 6

switch(config-pmap-c-que)# priority

Specifies that traffic in this class is mapped to a strict priority queue. The priority specification is applicable only with the bandwidth remaining percent option.

Note Only one class in each policy map can have strict priority set on it.

Step 7

switch(config-pmap-c-que)# no priority

(Optional) Removes the strict priority queuing from the traffic in this class.

The following example shows how to define a type queuing policy map that includes a class type with bandwidth as priority and a class type with shape:

switch# configure terminal

switch(config)# policy-map type queuing policy-que2

switch(config-pmap-que)# class type queuing 1p7q4t-out-q5

switch(config-pmap-c-que)# bandwidth remaining percent 25

switch(config-pmap-c-que)# priority

switch(config-pmap-c-que)# exit

switch(config-pmap-que)# class type queuing 1p7q4t-out-q4

switch(config-pmap-c-que)# shape percent 35

switch(config-pmap-c-que)#

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 for input traffic only.

If the type qos policy is active onany interface or port-channel, you cannot apply a non-default

Note Type qos can only be applied on an interface or port-channel when system network-qos policy is p-nq-8e, which is the default. If the type qos policy is active on any interface or port-channel, we cannot apply non-default network-qos policy to it.

To configure type qos policies that have a pre-defined class type, perform this task:

Command

Purpose

Step 1

switch # configure terminal

Enters configuration mode.

Step 2

switch(config)# policy-map type qos

policy-name

Creates a named object representing 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 type

qosclass-name

Associates a class map with the policy map, and enters configuration mode for the specified system class.

Note The associated class map must be the same type as the policy map type.

Step 4

switch(config-pmap-c-qos)# set cos cos-value

Configures one of more cos values to match for classification of traffic in this class-map. The range of cos-value is from 0 to 7. There is no default value.

Step 5

switch(config-pmap-c-qos)# no set cos cos-value

(Optional) Removes the cos values from this class.

The following example shows how to define a type qos policy map after defining a class type:

switch# configure

switch(config)# class-map type qos class1

switch(config-cmap-qos)# policy-map type qos policy1

switch(config-pmap-qos)# class type qos class1

switch(config-pmap-c-qos)# set cos 3

switch(config-pmap-c-qos)#

Attaching System Service Policy

The service-policy command is used to associate the system class policy map as the service policy for the system.

To associate the system policy map as the service policy, perform this task:

Command

Purpose

Step 1

switch # configure terminal

Enters configuration mode.

Step 2

switch(config)# system qos

Enters system class configuration mode.

Step 3

switch(config-sys-qos)# service-policy

type {network-qos | qos | queuing}

[input | output]policy-name

Specifies the policy map to use as the service policy for the system. There are three policy map configuration modes:

•network-qos—Network-wide (system qos) mode.

•qos—Classification mode (system qos input or interface input only).

•queuing—Queuing mode (input and output at system qos and interface).

Note There is no default policy map configuration mode; you must specify the type. The input keyword specifies that this policy map should be applied to traffic received on an interface. The output keyword specifies that this policy map should be applied to traffic transmitted from an interface. You can only apply input to a qos policy; you can apply both to a queuing policy.

The following example sets a no-drop Ethernet policy map as the system class:

switch(config)# class-map type network-qos ethCoS4

switch(config-cmap-nq)# match cos 4

switch(config-cmap-nq)# exit

switch(config)# policy-map type network-qos ethNoDrop

switch(config-pmap-nq)# class type network-qos ethCoS4

switch(config-pmap-nq-c)# pause no-drop

switch(config-pmap-nq-c)# exit

switch(config-pmap-nq)# exit

switch(config)# system qos

switch(config-sys-qos)# service-policy type network-qos ethNoDrop

Restoring the Default System Service Policies

If you have created and attached new policies to the system qos configuration, you must reapply the default policies to restore the system.

Enabling Jumbo MTU

To enable jumbo MTU for the entire switch, set the MTU to its maximum size (9216 bytes) in the policy map for the default Ethernet system class (class-mtu).

The following example configures the default Ethernet system class to support the jumbo MTU:

switch # configure terminal

switch(config)# class-map type network-qos class-mtu

switch(config-cmap-nq)# match cos 0-7

switch(config-cmap-nq)# exit

switch(config)# policy-map type network-qos policy-mtu

switch(config-pmap-nq)# class type network-qos class-mtu

switch(config-pmap-nq-c)# mtu 9216

switch(config-pmap-nq-c)# exit

switch(config-pmap-nq)# exit

switch(config)# system qos

switch(config-sys-qos)# service-policy type network-qos policy-mtu

Note The system jumbomtu command defines the maximum MTU size for the switch. However, jumbo MTU is only supported for system classes that have MTU configured.

Configuring QoS on Interface Policy

An input qos policy is a service policy applied to incoming traffic on an Ethernet interface for classification. For type queuing, the output policy is applied to all outgoing traffic that matches the specified class. When you configure an input queuing policy on an interface or EtherChannel, the switch sends the configuration data to the adapter using the DCBX protocol.

To configure the interface service policy, perform this task:

Command

Purpose

Step 1

switch # configure terminal

Enters configuration mode.

Step 2

switch(config)# interface {ethernet

slot/port | port-channel

channel-number}

Enters configuration mode for the specified interface.

Note The service policy on a port channel applies to all member interfaces.

Step 3

switch(config-if)# service-policy [type

{qos | queuing}] [input |

output] policy-name

Specifies the policy map to use as the service policy for the system. There are two policy map configuration modes:

•qos—Classification mode; this is the default mode.

•queuing—Queuing mode.

Note The input keyword specifies that this policymap should be applied to traffic received on an interface. The output keyword specifies that this policy map should be applied to traffic transmitted from an interface. You can only apply input to a qos policy; you can apply both to a queuing policy.

Step 4

switch(config-if)# service-policy [type

{qos | queuing}] [input] policy-name

Applies the policy map to the interface.

Note There is a restriction that system type qos policy cannot be the same as any of the type qos policy applied to an interface or EtherChannel.

The following example shows how to apply a policy to an Ethernet interface:

switch# configure terminal

switch(config)# class-map type qos class-qos-1

switch(config-cmap-qos)# exit

switch(config)# policy-map type qos policy-qos-1

switch(config-pmap-c-qos)# exit

switch(config-pmap-qos)# exit

switch(config)# interface ethernet 1/20

switch(config-if)# service-policy type qos input policy-qos-1

QoS Configuration Examples

This section displays some QoS configuration examples and includes the following topics:

Note This command clears all queuing counters including other non-QoS packet counters.

The following example shows how to display the class maps defined on the switch:

switch # show class-map

Type queuing class-maps

========================

class-map type queuing match-any 1p7q4t-out-pq1

Description: Classifier for egress priority queue of type 1p7q4t

match cos 1

class-map type queuing match-any 1p7q4t-out-q2

Description: Classifier for egress queue 2 of type 1p7q4t

match cos 2

class-map type queuing match-any 1p7q4t-out-q3

Description: Classifier for egress queue 3 of type 1p7q4t

match cos 0

class-map type queuing match-any 1p7q4t-out-q4

Description: Classifier for egress queue 4 of type 1p7q4t

match cos 4

class-map type queuing match-any 1p7q4t-out-q5

Description: Classifier for egress queue 5 of type 1p7q4t

match cos 5

class-map type queuing match-any 1p7q4t-out-q6

Description: Classifier for egress queue 6 of type 1p7q4t

match cos 6

class-map type queuing match-any 1p7q4t-out-q7

Description: Classifier for egress queue 7 of type 1p7q4t

match cos 7

class-map type queuing match-any 1p7q4t-out-q-default

Description: Classifier for egress default queue of type 1p7q4t

match cos 3

Type network-qos class-maps

===============================

class-map type network-qos c-nq-8e

match cos 0-7

class-map type network-qos c-nq-5e-drop

match cos 3-7

class-map type network-qos c-nq-6e-drop

match cos 2-7

class-map type network-qos c-nq-5e-ndrop

match cos 0-2

class-map type network-qos c-nq-6e-ndrop

match cos 0-1

The following example shows how to display the policy maps defined on the switch:

switch # show policy-map

Type queuing policy-maps

========================

policy-map type queuing default-out-policy

class type queuing 1p7q4t-out-q3

bandwidth percent 12

class type queuing 1p7q4t-out-pq1

bandwidth percent 12

class type queuing 1p7q4t-out-q2

bandwidth percent 12

class type queuing 1p7q4t-out-q-default

bandwidth percent 12

class type queuing 1p7q4t-out-q4

bandwidth percent 12

class type queuing 1p7q4t-out-q5

bandwidth percent 12

class type queuing 1p7q4t-out-q6

bandwidth percent 12

class type queuing 1p7q4t-out-q7

bandwidth percent 12

Type network-qos policy-maps

================================

policy-map type network-qos p-nq-5e

class-map c-nq-5e-drop

class-map c-nq-5e-ndrop

pause no-drop

mtu 2240

policy-map type network-qos p-nq-6e

class-map c-nq-6e-drop

class-map c-nq-6e-ndrop

pause no-drop

mtu 2240

policy-map type network-qos p-nq-8e

class-map c-nq-8e

switch #

The following example shows how to display the policy maps attached on the system qos:

switch # show policy-map system

Type network-qos policy-maps

================================

policy-map type network-qos p-nq-8e

class-map c-nq-8e

match cos 0-7

Service-policy (queuing) output: default-out-policy

policy statistics status: enabled

Class-map (queuing): 1p7q4t-out-q3 (match-any)

bandwidth percent 12

Class-map (queuing): 1p7q4t-out-pq1 (match-any)

bandwidth percent 12

Class-map (queuing): 1p7q4t-out-q2 (match-any)

bandwidth percent 12

Class-map (queuing): 1p7q4t-out-q-default (match-any)

bandwidth percent 12

Class-map (queuing): 1p7q4t-out-q4 (match-any)

bandwidth percent 12

Class-map (queuing): 1p7q4t-out-q5 (match-any)

bandwidth percent 12

Class-map (queuing): 1p7q4t-out-q6 (match-any)

bandwidth percent 12

Class-map (queuing): 1p7q4t-out-q7 (match-any)

bandwidth percent 12

switch#

The following example shows how to display the policy maps attached to an interface:

switch(config-if)# show policy-map interface ethernet 1/15

Global statistics status : enabled

Ethernet1/15

Service-policy (queuing) output: default-out-policy

policy statistics status: enabled

Class-map (queuing): 1p7q4t-out-q3 (match-any)

Class-map (queuing): 1p7q4t-out-pq1 (match-any)

Class-map (queuing): 1p7q4t-out-q2 (match-any)

Class-map (queuing): 1p7q4t-out-q-default (match-any)

Class-map (queuing): 1p7q4t-out-q4 (match-any)

Class-map (queuing): 1p7q4t-out-q5 (match-any)

Class-map (queuing): 1p7q4t-out-q6 (match-any)

Class-map (queuing): 1p7q4t-out-q7 (match-any)

The following example shows how to display information related to the counters by entering the show queuing interface command:

Note In the following output, the display following Statistics for CoS provides information related to the counters. When you use the clear statistics device all command, the details about counters is cleared. The clear statistics device all command clears all queuing counters including other non-QoS packet counters, while the clear qos statistics command clears policy statistics specified for type qos packet counters only.

switch # show queuing interface ethernet 1/18

Queuing Configs for interface 0x1a011000(System)

Port QOS is enabled

Transmit queues [type = 1p7q4t]

Queue ID COS Scheduling

-------------------------------------------------------

1p7q4t-out-q3 0 WRR

1p7q4t-out-pq1 1 WRR

1p7q4t-out-q2 2 WRR

1p7q4t-out-q-default 3 WRR

1p7q4t-out-q4 4 WRR

1p7q4t-out-q5 5 WRR

1p7q4t-out-q6 6 WRR

1p7q4t-out-q7 7 WRR

Queue ID B/W Shape

-------------------------------------------------------

1p7q4t-out-q-default BW percent Gua:30, Rem:0, RemReal:0

-

1p7q4t-out-pq1 BW percent Gua:20, Rem:0, RemReal:0

-

1p7q4t-out-q2 BW percent Gua:10, Rem:0, RemReal:0

-

1p7q4t-out-q3 BW percent Gua:5, Rem:0, RemReal:0

-

1p7q4t-out-q4 BW percent Gua:10, Rem:0, RemReal:0

-

1p7q4t-out-q5 BW percent Gua:15, Rem:0, RemReal:0

-

1p7q4t-out-q6 BW percent Gua:5, Rem:0, RemReal:0

-

1p7q4t-out-q7 BW percent Gua:5, Rem:0, RemReal:0

-

-------------------------------------------------------

Queuing configs for 1p7q4t-out-q-default**

Group-id: 0

Flags: 0x1

BW percent Gua:30, Rem:0, RemReal:0

Queuing configs for 1p7q4t-out-pq1**

Group-id: 1

Flags: 0x1

BW percent Gua:20, Rem:0, RemReal:0

Queuing configs for 1p7q4t-out-q2**

Group-id: 2

Flags: 0x1

BW percent Gua:10, Rem:0, RemReal:0

Queuing configs for 1p7q4t-out-q3**

Group-id: 3

Flags: 0x1

BW percent Gua:5, Rem:0, RemReal:0

Queuing configs for 1p7q4t-out-q4**

Group-id: 4

Flags: 0x1

BW percent Gua:10, Rem:0, RemReal:0

Queuing configs for 1p7q4t-out-q5**

Group-id: 5

Flags: 0x1

BW percent Gua:15, Rem:0, RemReal:0

Queuing configs for 1p7q4t-out-q6**

Group-id: 6

Flags: 0x1

BW percent Gua:5, Rem:0, RemReal:0

Queuing configs for 1p7q4t-out-q7**

Group-id: 7

Flags: 0x1

BW percent Gua:5, Rem:0, RemReal:0

Statistics per COS

COS Packet(RX) Packet(TX) Pause(RX) Pause(TX)

-------------------------------------------------------

0 0 98 0 0

1 0 552000 0 0

2 4708981456 0 0 1909911

3 97 628608570 0 2505454392

4 0 0 0 0

5 0 0 0 0

6 0 0 0 0

7 0 0 0 0

Verifying Jumbo MTU

To verify that jumbo MTU is enabled, enter the show interface ethernet slot/port command for an Ethernet interface that carries traffic with jumbo MTU.

The following example shows how to display summary jumbo MTU information for Ethernet 1/2 (the relevant part of the output is shown in bold font):