C Commands

This chapter describes the Cisco NX-OS quality of service (QoS) commands that begin with C.

class (control plane policy map)

To specify a control plane class map for a control plane policy map, use the class command. To delete a control plane class map from a control plane policy map, use the no form of this command.

class { class-map-name [ insert-before class-map-name2 ]}

no class class-map-name

 
Syntax Description

class-map-name

Name of the class map. The name is alphanumeric, case sensitive, and has a maximum of 64 characters.

insert-before class-map-name2

(Optional) Inserts the control plane class map ahead of another control plane class map for the control plane policy map. The class map name is alphanumeric, case sensitive, and has a maximum of 64 characters.

 
Command Default

None

 
Command Modes

Control plane policy map configuration

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

You must create the control plane class maps before you reference them in this command.

This command does not require a license.

Examples

This example shows how to configure a class map for a control plane policy map:

switch# configure terminal
switch(config)# policy-map type control-plane copp-system-policy-customized
switch(config-pmap)# class ClassMapA
swtich(config-pmap-c)
 

This example shows how to configure a class map for a control plane policy map and insert it before an existing class map:

switch# configure terminal
switch(config)# policy-map type control-plane copp-system-policy-customized
switch(config-pmap)# class classMapB insert-before copp-stftp
switch(config-pmap-c)#
 

This example shows how to delete a class map from a control plane policy map:

switch# configure terminal
switch(config)# policy-map type control-plane copp-system-policy-customized
switch(config-pmap)# no class ClassMapA
switch(config-pmap)#
 

 
Related Commands

Command
Description

class-map type control-plane

Creates or configures a control plane class map.

police (policy map)

Configures policing for a class map in a control plane policy map.

policy-map type control-plane

Specifies a control plane policy map and enters policy map configuration mode.

show policy-map type control-plane

Displays configuration information for control plane policy maps.

 

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

no class class-map-name

 
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. The class map name can be a maximum of 40 characters. The name is case sensitive and can only contain alphabetic characters, numbers, hyphens, and underscores.

 
Command Default

None

 
Command Modes

Policy map type qos configuration

 
Command History

Release
Modification

4.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

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

By default, the class-default class of type qos is created under every policy map of type qos in the system and it is mapped to the QoS group 0. You cannot change this mapping.

You cannot remove the class-default of type qos. If you attempt to delete the class-default class, the switch returns an error message.

Examples

This example shows how to add a reference to a qos class map at the end of a policy map:

switch(config)# policy-map my_policy1
switch(config-pmap-qos)# class traffic_class2
switch(config-pmap-c-qos)#
 

This example shows how to remove a class map reference in a policy map:

switch(config)# policy-map my_policy1
switch(config-pmap-qos)# no class traffic_class1
switch(config-pmap-qos)#
 

 
Related Commands

Command
Description

set dscp

Assigns a DSCP value to the traffic class.

set precedence

Assigns a IP precedence to the traffic class.

set qos-group

Assigns a QoS group to the traffic class.

show class-map type qos

Displays type qos class maps.

show policy-map

Displays policy maps.

 

class class-default

To add a reference to the system default class that does not match any traffic class, use the class class-default command. To remove the system default class from the policy map, use the no form of this command.

class class-default

no class class-default

 
Syntax Description

This command has no arguments or keywords.

 
Command Default

None

 
Command Modes

QoS policy map configuration mode
Control-plane policy map configuration mode
QoS policy map in switch profile configuration mode

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

Traffic that fails to match any class is assigned to a default class of traffic called class-default. You cannot delete this class.

Examples

This example shows how to add a reference to the system default class at the end of a policy map in a switch profile:

switch# configure sync
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-sync)# switch-profile s5010
Switch-Profile started, Profile ID is 1
switch(config-sync-sp)# policy-map type qos my_policy1
switch(config-sync-sp-pmap-qos)# class class-default
switch(config-sync-sp-pmap-c-qos)#
 

 
Related Commands

Command
Description

set dscp

Sets the DSCP value for the QoS traffic.

set precedence

Sets the IP precedence value for the QoS traffic.

set qos-group

Assigns a QoS group identifier for a class of traffic.

show policy-map

Displays policy maps.

show switch-profile

Displays information about the switch profile and the configuration revision.

switch-profile

Creates or configures a switch profile.

 

class type network-qos

To add a reference to an existing network QoS class map in a policy map and enter the class mode, use the class type network-qos command. To remove a class from the policy map, use the no form of this command.

class type network-qos class-map-name

no class type network-qos class-map-name

 
Syntax Description

class-map-name

Reference to a network QoS class map. The class map name can be a maximum of 40 characters. The name is case sensitive and can only contain alphabetic characters, numbers, hyphens, and underscores.

 
Command Default

None

 
Command Modes

Policy map type network-qos configuration

 
Command History

Release
Modification

4.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

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

Examples

This example shows how to add a reference to a class map in a type network-qos policy map:

switch(config)# policy-map type network-qos nqos_policy
switch(config-pmap-nq)# class type network-qos nqos_class
switch(config-pmap-nq-c)#
 

This example shows how to remove a class map reference in a type network-qos policy map:

switch(config)# policy-map type network-qos nqos_policy
switch(config-pmap-nq)# no class type network-qos nqos_class
switch(config-pmap-nq)#
 

 
Related Commands

Command
Description

mtu

Enables jumbo frames on a traffic class.

multicast-optimize

Enables a class to send multiple packets.

pause no-drop

Enables CBFC pause characteristics on a traffic class.

queue-limit

Configures queue limits for the traffic class.

set cos

Assigns a CoS value for a class of traffic.

show class-map type network-qos

Displays type network-qos class maps.

show policy-map

Displays policy maps.

class 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 queuing class map. The class map name can be a maximum of 40 characters. The name is case sensitive and can only contain alphabetic characters, numbers, hyphens, and underscores.

 
Command Default

None

 
Command Modes

Policy map type queuing configuration

 
Command History

Release
Modification

4.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

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

Examples

This example shows how to add a reference to a class map in a type queuing policy map:

switch(config)# policy-map type queuing my_policy1
switch(config-pmap-que)# class type queuing 1p7q4t-out-q3
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 1p7q4t-out-q3
switch(config-pmap-que)#
 

 
Related Commands

Command
Description

show class-map type queuing

Displays the type queuing class maps.

show policy-map

Displays policy maps.

class-map

To create or modify a class map 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-all | match-any ] class-map-name

no class-map [ type qos ] [ match-all | match-any ] class-map-name

 
Syntax Description

type qos

(Optional) Specifies the component type qos for the class map. By default, the class map type is qos.

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.

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. This is the default action if match-all is not specified.

class-map-name

Name assigned to the QoS class map. The name can be a maximum of 40 characters. The name is case sensitive and can only contain alphanumeric characters, hyphens, and underscores.

The name class-default is reserved.

 
Command Default

type—qos

match-all

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.

4.1(3)N1(1)

The type qos keyword was added.

5.0(2)N1(1)

Support for match-all keyword was added.

 
Usage Guidelines

You can define a class map for each class of traffic to be used in QoS policies.

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. If no execution strategy is specified (match-any or match-all), then the default value of match-any is applied to the traffic class.

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 create a qos class map to match all traffic packets:

switch(config)# class-map type qos match-all my_class2
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 the error message that appears when you attempt to remove a class-fcoe class map:

switch(config)# no class-map class-fcoe
ERROR: Reserved class-map(s) cannot be deleted/modified
 
switch(config)#
 

 
Related Commands

Command
Description

description

Adds a summary purpose for the class map.

feature fcoe

Enables FCoE on the switch.

match

Configures traffic class criteria.

policy-map type qos

Creates or modifies a qos policy map.

service-policy

Attaches a policy map to an interface or system policy.

show class-map type qos

Displays qos class maps.

 

class-map type control-plane

To create or specify a control plane class map and enter class map configuration mode, use the class-map type control-plane command. To delete a control plane class map, use the no form of this command.

class-map type control-plane [ match-any ] class-map-name

no class-map type control-plane [ match-any ] class-map-name

 
Syntax Description

match-any

(Optional) Specifies to match any match conditions in the class map.

class-map-name

Name of the class map. The name is alphanumeric and case-sensitive. The maximum length is 64 characters.

 
Command Default

match-any

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

You cannot use match-any or class-default as names for control plane class maps.

You can delete only dynamic class-maps of type control-plane. You cannot delete static class-maps of type control-plane.

This command does not require a license.

Examples

This example shows how to specify a control plane class map and enter class map configuration mode:

switch# configure terminal
switch(config)# class-map type control-plane ClassMapA
switch(config-cmap)#
 

This example shows how to delete a control plane class map:

switch# configure terminal
switch(config)# no class-map type control-plane ClassMapA
switch(config)#
 

 
Related Commands

Command
Description

match access-group

Matches traffic with a specified access control list (ACL) group.

show class-map type control-plane

Displays control plane policy map configuration information.

 

class-map type network-qos

To create or modify a class map that defines a network QoS class of traffic and enter the class-map configuration mode, use the class-map type network-qos command. To remove a class map, use the no form of this command.

class-map type network-qos class_map_name

no class-map type network-qos class_map_name

 
Syntax Description

class-map-name

Name assigned to the class map. The name class-default is reserved. The name can be a maximum of 40 characters. The name is case sensitive and can only contain alphanumeric characters, hyphens, and underscores.

 
Command Default

None

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

4.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

Class maps of type network qos support only the match qos-group command. If a traffic packet matches any of the criteria configured for this class map with the match command, then this class map is applied to the packet. By default, traffic is filtered using the implicit match-any option.

Examples

This example shows how to create or modify a network qos class map named my_class1:

switch(config)# class-map type network-qos my_class1
switch(config-cmap-nq)#
 

This example shows how to remove a network qos class map:

switch(config)# no class-map my_class1
switch(config)#
 

 
Related Commands

Command
Description

feature fcoe

Enables FCoE on a switch.

match qos-group

Defines a traffic class that matches the QoS group values.

show class-map type network-qos

Displays network qos class maps configured in the system.

class-map type queuing

To create or modify a class map that defines a queuing class of traffic and enter the class-map configuration mode, use the class-map type queuing command. To remove the queuing class map, use the no form of this command.

class-map type queuing class_map_name

no class-map type queuing class_map_name

 
Syntax Description

class-map-name

Name assigned to the class map or a system-defined queuing class map name. The name class-default is reserved. The name can be a maximum of 40 characters. The name is case sensitive and can only contain alphanumeric characters, hyphens, and underscores.

 
Command Default

None

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

4.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

If you modify the queuing type class maps, the configuration for all ports of the specified port type also changes.

You cannot delete the system-defined queuing class map names.

Class maps of type queuing support only the match qos-group command. If a traffic packet matches any of the criteria configured for this class map with the match command, then this class map is applied to the packet. By default, traffic is filtered using the implicit match-any option.

Examples

This example shows how to create or modify a queuing class map:

switch(config)# class-map type queuing my_class1
switch(config-cmap-que)#
 

This example shows how to modify a system-defined queuing class map named class-default:

switch(config)# class-map type queuing match-any class-default
switch(config-cmap-que)#
 

This example shows how to remove a queuing class map:

switch(config)# no class-map type queuing my_class1
switch(config)#
 

 
Related Commands

Command
Description

feature fcoe

Enables FCoE on the switch.

match qos-group

Configures a traffic class that matches the QoS group values.

show class-map type queuing

Displays queuing class maps configured in the system.

 

clear copp statistics

To clear Control Plane Policing (CoPP) statistics, use the clear copp statistics command.

clear copp statistics

 
Syntax Description

This command has no arguments or keywords.

 
Command Default

None

 
Command Modes

Any configuration mode

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear the CoPP statistics:

switch# clear copp statistics
switch#
 

 
Related Commands

Command
Description

class-map type control-plane

Configures a control plane class map.

show policy-map interface control-plane

Displays the CoPP statistics for interfaces.

 

control-plane

To enter control-plane configuration mode, which allows users to associate attributes that are associated with the control plane of the device, use the control-plane command.

control-plane

 
Syntax Description

This command has no arguments or keywords.

 
Command Default

None

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

After you use the control-plane command, you can associate a service policy to police all traffic that is destined to the control plane.

Examples

This example shows how to enter the control plane configuration mode:

switch# configure terminal
switch(config)# control-plane
switch(config-cp)#
 

 
Related Commands

Command
Description

service-policy (control-plane)

Attaches a policy map to a control plane for aggregate control plane services.

show policy-map type control-plane

Displays the configuration of a class or all classes for the policy map of a control plane.