class
Syntax
class <CLASS> {drop | priority <PRIORITY> rate <RATE> [burst <BURST>]}
no class <CLASS> {drop | priority <PRIORITY> rate <RATE> [burst <BURST>]}
Description
Adds a class to a CoPP policy. If the class exists, the existing class is modified. Changes made to an active (applied) policy take effect immediately.
When adding or modifying a class in an active policy, CoPP immediately activates the change on the switch. In cases where insufficient hardware resources exist to support a class or its action, CoPP fails to activate the changed class on the switch. When this failure occurs, the active configuration on the switch will be out of sync with its definition. To diagnose and remedy this situation:
Use the
show copp-policy
command to determine which classes are out of sync between the active policy and its definition.Use the
reset copp-policy
command to synchronize the active policy with its definition. This synchronization changes the classes in the definition to match the classes in the active policy.
The
no
form of this command removes a class from a CoPP policy. Traffic for the removed class that is destined for the processor will be included in the default class. To stop a class of traffic from reaching the processor, set the class action to drop.
Command context
config-copp
Parameters
<CLASS>
Specifies the class to add or edit.
drop
Drop packets matching the selected class.
priority <PRIORITY>
Specifies the priority for packets matching the selected class. Range: 0 to 10.
rate <RATE>
Specifies the maximum rate, in kilobits per second (Kb/s), for packets matching the selected class. Range: 1 to 999999.
burst <BURST>
Specifies the maximum burst size, in kilobytes, for packets matching the selected class. Range: 1 to 130.
Authority
Administrators
Examples
Adding a class to handle OSPF multicast traffic with priority of 2 and rate of 2000:
switch(config-copp)# class ospf-multicast priority 2 rate 2000
Adding a class to drop LLDP packets:
switch(config-copp)# class lldp drop
Removing the class that handles LLDP packets. LLDP traffic destined to the processor will be included in the default class.
switch(config-copp)# no class lldp