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.
To add a reference to an existing qos class map in a policy map and enter the class mode, use the class command. To remove a class from the policy map, use the no form of this command.
class [ type qos ] { class-map-name | class-default } [ insert-before [ type qos ] before-class-map-name ]
no class { class-map-name | class-default }
type qos |
(Optional) Specifies the component type, which is qos for this class. By default, the type is qos. |
class-map-name |
Reference to a class map. |
class-default |
Specifies the reserved class name that matches all traffic not classified in other classes in a policy map. |
insert-before before-class-map-name |
(Optional) Specifies the position of this class in the policy. If not specified, the class is placed at the end of the classes in the policy. Policy actions in the first class that matches the traffic type are performed. |
None
Policy map type qos configuration
Release |
Modification |
---|---|
4.0 |
This command was introduced. |
Policy actions in the first class that matches the traffic type are performed.
This command does not require a license.
This example shows how to add a reference to a class map at the end of a policy map:
switch(config)# policy-map my_policy1 switch(config-pmap)# class traffic_class2 switch(config-pmap-c-qos)#
This example shows how to add a reference to a class map before an existing class map reference in a policy map:
switch(config)# policy-map my_policy1 switch(config-pmap-qos)# class insert-before traffic_class2 traffic_class1 switch(config-pmap-c-qos)#
This example shows how to add a reference to the class-default class map in a policy map:
switch(config)# policy-map my_policy1 switch(config-pmap-qos)# class class-default switch(config-pmap-c-qos)#
This example shows how to remove a class map reference in a policy map:
witch(config)# policy-map my_policy1 switch(config-pmap)# no class traffic_class1 switch(config-pmap)#
Command |
Description |
---|---|
show class-map qos |
Displays class maps. |
show policy-map |
Displays policy maps and statistics. |
To add a reference to an existing queuing class map in a policy map and enter the class mode, use the class type queuing command. To remove a class from the policy map, use the no form of this command.
class type queuing class-map-name
no class type queuing class-map-name
class-map-name |
Reference to a system-defined class map. For a list of the system-defined type queuing class maps, see Table 1. |
None
policy map type queuing configuration
Release |
Modification |
---|---|
4.0 |
This command was introduced. |
Policy actions in the first class that matches the traffic type are performed.
This command does not require a license.
This example shows how to add a reference to a class map at the end of a type queuing policy map:
switch(config)# policy-map type queuing my_policy1 switch(config-pmap-que)# class type queuing 8q2t-in-q4 switch(config-pmap-c-que)#
This example shows how to add a reference to a class map before an existing class map reference in a type queuing policy map:
switch(config)# policy-map type queuing my_policy1 switch(config-pmap-que)# class type queuing 8q2t-in-q4 insert-before type queuing 8q2t-in-q2 switch(config-pmap-c-que)#
This example shows how to remove a class map reference in a type queuing policy map:
switch(config)# policy-map type queuing my_policy1 switch(config-pmap-que)# no class type queuing 8q2t-in-q4 switch(config-pmap-que)#
Command |
Description |
---|---|
show class-map queuing |
Displays class maps. |
show policy-map |
Displays policy maps and statistics. |
To configure a class map and enter the type network qos configuration mode, use the class-map type network-qos command. To remove the class map of the type network qos, use the no form of this command.
class-map type network-qos match-any { class-map-name} { c-nq-4e-drop | c-nq-4e-ndrop | c-nq-4e-ndrop-fcoe | c-nq-6e-drop | c-nq-6e-ndrop | c-nq-6e-ndrop-fcoe | c-nq-7e-drop | c-nq-7e-ndrop-fcoe | c-nq-8e | eth }
no class-map type network-qos match-any { class-map-name} { c-nq-4e-drop | c-nq-4e-ndrop | c-nq-4e-ndrop-fcoe | c-nq-6e-drop | c-nq-6e-ndrop | c-nq-6e-ndrop-fcoe | c-nq-7e-drop | c-nq-7e-ndrop-fcoe | c-nq-8e | eth }
class-map-name |
Class-map name. The policy map names can contain alphabetic, hyphen, or underscore characters, are case sensitive, and can be up to 40 characters. |
c-nq-4e-drop |
Specifies the default 4e drop class. |
c-nq-4e-ndrop |
Specifies the default 4e no-drop class. |
c-nq-4e-ndrop-fcoe |
Specifies the default 4e no-drop Fibre Channel over Ethernet (FCoE) class. |
c-nq-6e-drop |
Specifies the default 6e drop class. |
c-nq-6e-ndrop |
Specifies the default 6e no-drop class. |
c-nq-6e-ndrop-fcoe |
Specifies the default 6e no-drop FCoE class. |
c-nq-7e-drop |
Specifies the default 6e drop class. |
c-nq-7e-ndrop-fcoe |
Specifies the default 7e no-drop FCoE class. |
c-nq-8e |
Specifies the default 8e drop class. |
eth |
Specifies the class map name of the type network qos. |
type—qos
Global configuration
Release |
Modification |
---|---|
5.1(1) |
This command was introduced. |
This command does not require a license.
This example shows how to configure the class map of the type network qos:
switch# configure terminal switch(config)# class-map type network-qos match-any eth switch(config)# This example shows how to remove the class map of the type network qos: switch# configure terminal switch(config)# no class-map type network-qos match-any eth switch(config)#
Command |
Description |
---|---|
show class-map network-qos |
Display type network-qos class maps. |
match cos (class map type network-qos) |
Defines the class of traffic in type network-qos class maps. |
To create or modify a class map that defines a class of traffic and enter the class-map configuration mode, use the class-map command. To remove a class map, use the no form of this command.
class-map [ type qos ] { [ match-any | match-all ] class-map-name | conform-color-in | conform-color-out | exceed-color-in | exceed-color-out }
no class-map [ type qos ] { class-map-name | [ match-any | match-all ] }
type qos |
(Optional) Specifies the component type qos for the class map. By default, the class map type is qos. |
||
match-any |
Specifies that if the packet matches any of the criteria configured for this class map with the match command, then this class map is applied to the packet. |
||
match-all |
Specifies that if the packet matches all the criteria configured for this class map with the match command, then this class map is applied to the packet. This is the default action if match-any is not specified.
|
||
class-map-name |
Name assigned to the class map. The name class-default is reserved. |
||
conform-color-in |
Specifies the type qos conform color class map in the input direction. This color-aware class map makes a policer color-aware for conform action. |
||
conform-color-out |
Specifies the type qos conform color class map in the output direction. This color-aware class map makes a policer color-aware for conform action. |
||
exceed-color-in |
Specifies the type qos exceed color class map in the input direction. This color-aware class map makes a policer color-aware for exceed action. |
||
exceed-color-out |
Specifies the type qos exceed color class map in the output direction. This color-aware class map makes a policer color-aware for exceed action. |
type—qos
Global configuration
Release |
Modification |
---|---|
4.0 |
This command was introduced. |
You cannot delete the system-defined queuing class map names. For more information about the class-map command, see the Cisco Nexus 7000 Series NX-OS Quality of Service Configuration Guide, Release 5.0.
Note | When you configure match all for a qos class map by entering the class-map type qos match-all command, the match-all option does not work. Instead, the match criteria is always treated as match any. |
This command does not require a license.
This example shows how to create or modify a qos class map:
switch(config)# class-map my_class1 switch(config-cmap-qos)#
This example shows how to remove a qos class map:
switch(config)# no class-map my_class1 switch(config)#
This example shows how to modify a qos color class map:
switch(config)# class-map conform-color-in switch(config-color-map)#
Command |
Description |
---|---|
show class-map qos |
Displays class maps. |
To modify a type queuing class map and enter the class-map configuration mode, use the class-map type queuing match-any command.
class-map type queuing match-any { queuing-class-map-name | WORD }
queuing-class-map-name |
System-defined queuing class map name. For the list of system-defined queuing class maps, see Table 1. |
WORD |
Hierarchical class-map name. It can be a string of 40 alphanumeric characters. |
None
Global configuration
Release |
Modification |
---|---|
5.1(1) |
Added the WORD argument. |
4.0 |
This command was introduced. |
The argument WORD is supported only on the F-Series Modules.
When a non-8e template is active, it allows you to specify a hierarchical queuing (both ingress and egress) policy.
If the packet matches any of the criteria configured for this class map with the match command, this class map is applied to the packet. Class maps of type queuing support only this option.
Any modification made to the class maps type queuing changes the configuration for all ports of the specified port type on all VDCs.
You cannot delete system-defined queuing class map names. For more information on using the class-map type queuing match-any command, see the Cisco Nexus 7000 Series NX-OS Quality of Service Configuration Guide, Release 5.0.
This command does not require a license.
This example shows how to modify a queuing class map:
switch(config)# class-map type queuing match-any 2q4t-in-q1 switch(config-cmap-que)#
Command |
Description |
---|---|
show class-map queuing |
Displays class maps. |
match cos |
Defines the class of traffic in type queuing class maps. |
To clear the quality of service (QoS) statistics, use the clear qos statistics command.
clear qos statistics [ { interface [ ethernet type /slot | port-channel number ] | [ vlan [vlan-id] ] } [ input | output ] [ type { qos | queuing } ] ]
interface |
(Optional) Specifies which interface to clear. |
ethernet |
(Optional) Specifies the statistics that are assigned to the Ethernet interface. |
port-channel |
(Optional) Specifies the statistics that are assigned to the port channel. |
vlan vlan-id |
(Optional) Specifies a VLAN to clear. Valid values are from 1 to 4094. |
input |
(Optional) Clears only input statistics. |
output |
(Optional) Clears only output statistics. |
type |
(Optional) Specifies the type of statistics to clear. |
qos |
Specifies to clear QoS statistics. |
queuing |
Specifies to clear queuing statistics. |
None
Any command mode
Release |
Modification |
---|---|
4.0 |
This command was introduced. |
If you do not specify the interface or VLAN, the device clears the counters for all VLANs and interfaces.
This command does not require a license.
This example shows how to clear all the QoS statistics:
switch# clear qos statistics switch#
This example shows how to clear all input QoS statistics for VLAN 1:
switch# clear qos statistics vlan 1 input switch#
Command |
Description |
---|---|
qos statistics |
Enables or disables QoS statistics. |
show qos statistics |
Displays QoS statistics. |
To clear the default quality of service (QoS) policies, use the clear qos policies command.
clear qos policies
This command has no arguments or keywords.
None
EXEC mode
Release |
Modification |
---|---|
5.1(1) |
This command was introduced. |
Before you downgrade from Cisco NX-OS Release 5.2(x) or 5.1(x) or higher version to Cisco NX-OS Release 5.0(x) or an earlier release, remove all the user defined network-qos and queuing policies configured on F series modules. Use the clear qos policies command to remove the defaults for F series modules. An internal process failure can result if the QoS policies are not removed prior to the downgrade. Downgrade should be done after running this CLI command.
This command does not require a license.
This example shows how to clear the default qos policies:
switch# clear qos policies This will clear up all default qos configs from all the VDCs, Are you sure you want to continue(yes/no)? [no] y switch#
To clear default 8e-4q4q template network-qos and queuing policies from all the VDCs, use the clear qos policies 8e-4q4q command.
clear qos policies 8e-4q4q
This command has no arguments or keywords.
VDC
EXEC mode
Release |
Modification |
---|---|
6.1(3) |
This command was introduced. |
To make software downgrades non-disruptive from the version 6.1(3) and higher version to lower version, the following steps are required before the software downgrade:
Note | Reloading a F series module will bring up the default 8e-4q4q template policies. |
This example shows how to clear the 8e-4q4q template network-qos and queuing policies from all the VDC:
switch # configure terminal switch# clear qos policies 8e-4q4q This will clear up 8e-4q4q template configs from all the VDCs, Are you sure you want to continue(yes/no)? [no] y switch#
Command |
Description |
---|---|
clear qos policies |
Clears the default QoS policies. |
To configure congestion control, use the congestion-control command. To remove the congestion control configuration, use the no form of this command.
congestion-control [ random-detect threshold [ burst-optimized | mesh-optimized ] | tail-drop threshold [ burst-optimized | mesh-optimized ] ]
no congestion-control [ random-detect threshold [ burst-optimized | mesh-optimized ] | tail-drop threshold [ burst-optimized | mesh-optimized ] ]
random-detect |
(Optional) Specifies the weighted random early detection (WRED). |
threshold |
Specifies the threshold for the optimized traffic. |
burst-optimized |
(Optional) Specifies the burst-optimized traffic. |
mesh-optimized |
(Optional) Specifies the mesh-optimized traffic. |
tail-drop |
(Optional) Specifies the tail-drop algorithm for queue management. |
None
Policy-map type network qos configuration
Release |
Modification |
---|---|
5.1(1) |
This command was introduced. |
This command does not require a license.
This example shows how to configure congestion control:
switch# configure terminal switch(config)# policy-map type network-qos my_template switch(config-pmap-nqos)# class type network-qos eth switch(config-pmap-nqos-c)# congestion-control tail-drop threshold mesh-optimized switch(config-pmap-nqos-c)#
This example shows how to configure congestion control:
switch# configure terminal switch(config)# policy-map type network-qos my_template switch(config-pmap-nqos)# class type network-qos eth switch(config-pmap-nqos-c)# no congestion-control tail-drop threshold mesh-optimized switch(config-pmap-nqos-c)#
Command |
Description |
---|---|
mtu |
Configures the maximum transmission unit (MTU) size in a network qos policy. |
pause |
Configure no-drop per CoS. |
priority |
Marks the priority level in a traffic queue. |
shape |
Configures the traffic rate for a given traffic profile. |