class
To attach an access control list (ACL) to a policy map, use the class Policy-map Configuration mode command.
To detach a class map from a policy map, use the no form of this command.
Note |
This command is available only when the switch is in quality of service (QoS) advanced mode. |
Syntax
class class-map-name
no class class-map-name
Parameters
class-map-name—Enter the name for an existing class map. If the class map does not exist, a new class map is created under the specified name.
Default Configuration
No class map is defined for the policy map.
Command Mode
Policy-map Configuration mode
User Guidelines
This command is the same as creating a class map and then binding it to the policy map. After the policy map is defined, use the service-policy command to attach it to a port or port channel.
Example
The following example defines a traffic classification (class map) called class1 containing an ACL called enterprise. The class is in a policy map called policy1. The policy-map policy1 now contains the ACL enterprise.
switchxxxxxx(config)# policy-map policy1
switchxxxxxx(config-pmap)# class class1