Defining a class

The system predefines some classes and defines general match criteria for them. A user-defined class cannot be named the same as a system-defined class. You can use these predefined classes when defining a policy. The system-defined classes include:

To define a class:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Create a class and enter class view.

traffic classifier classifier-name [ operator { and | or } ]

By default, the operator of a class is AND.

The operator of a class can be AND or OR.

  • AND—A packet is assigned to a class only when the packet matches all the criteria in the class.

  • OR—A packet is assigned to a class if it matches any of the criteria in the class.

3. Configure match criteria.

if-match [ not ] match-criteria

For more information, see the if-match command in ACL and QoS Command Reference.