C Commands

class (policy map type qos)

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 }

Syntax Description

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.

Command Default

None

Command Modes

Policy map type qos configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

Policy actions in the first class that matches the traffic type are performed.

This command does not require a license.

Examples

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)# 

Related Commands

Command

Description

show class-map qos

Displays class maps.

show policy-map

Displays policy maps and statistics.

class type queuing (policy map type queuing)

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

Syntax Description

class-map-name

Reference to a system-defined class map. For a list of the system-defined type queuing class maps, see Table 1.

Command Default

None

Command Modes

policy map type queuing configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

Policy actions in the first class that matches the traffic type are performed.

This command does not require a license.

Examples

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)# 

Related Commands

Command

Description

show class-map queuing

Displays class maps.

show policy-map

Displays policy maps and statistics.

class-map type network-qos match-any

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 }

Syntax Description

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.

Command Default

type—qos

Command Modes

Global configuration

Command History

Release

Modification

5.1(1)

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

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)#

Related Commands

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.

class-map

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 ] }

Syntax Description

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.

Note    This option does not work. The match criteria is always treated as match-any.

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.

Command Default

type—qos

Command Modes

Global configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

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.

Examples

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)#

Related Commands

Command

Description

show class-map qos

Displays class maps.

class-map type queuing match-any

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 }

Syntax Description

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.

Command Default

None

Command Modes

Global configuration

Command History

Release

Modification

5.1(1)

Added the WORD argument.

4.0

This command was introduced.

Usage Guidelines

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.

Examples

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)#

Related Commands

Command

Description

show class-map queuing

Displays class maps.

match cos

Defines the class of traffic in type queuing class maps.

clear qos statistics

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 } ] ]

Syntax Description

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.

Command Default

None

Command Modes

Any command mode

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

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.

Examples

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#

Related Commands

Command

Description

qos statistics

Enables or disables QoS statistics.

show qos statistics

Displays QoS statistics.

clear qos policies

To clear the default quality of service (QoS) policies, use the clear qos policies command.

clear qos policies

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

5.1(1)

This command was introduced.

Usage Guidelines

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.

Examples

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#

clear qos policies 8e4q4q

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

Syntax Description

This command has no arguments or keywords.

Command Default

VDC

Command Modes

EXEC mode

Command History

Release

Modification

6.1(3)

This command was introduced.

Usage Guidelines

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:

  • All the user defined and cloned 8e-4q4q template queuing policies should be detached manually from all the interfaces in each VDC.
  • The default-nq-8e-4q4q-policy or the user defined or the cloned 8e-4q4q template network-qos policy should be detached from the system qos.
  • All the user defined and cloned 8e-4q4q template network-qos policies should be removed manually from the default VDC.
  • All the user defined 8e-4q4q template queuing policies should be removed manually from all the VDCs.
  • Use the CLI command clear qos policies 8e-4q4q in default VDC to clear the default 8e-4q4q template policies. This command clears PPF (Portability Policy Format) nodes of 8e-4q4q template policies.
  • After executing clear qos policies 8e-4q4q command, the user MUST do downgrade. Otherwise the behavior will be unexpected. This command does not require a license.

Note


Reloading a F series module will bring up the default 8e-4q4q template policies.

Examples

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#

Related Commands

Command

Description

clear qos policies

Clears the default QoS policies.

congestion-control

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 ] ]

Syntax Description

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.

Command Default

None

Command Modes


Policy-map type network qos configuration

Command History

Release

Modification

5.1(1)

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

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)# 

Related Commands

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.