How to configure a traffic classifier on S series switches

For S series switches (except the S1700), you need to complete the following tasks before configuring a traffic classifier:
- Configure link layer attributes of interfaces to ensure that the interfaces work properly.
- If an ACL is configured as a traffic classification rule, configure the ACL.
The configuration procedure is as follows:
1. Run the system-view command to enter the system view.
2. Run the traffic classifier classifier-name [ operator { and | or } ] [ precedence precedence-value ] command to create a traffic classifier, and enter the traffic classifier view, or enter the view of an existing traffic classifier.
The precedence precedence-value parameter can be configured on S series modular switches, but cannot be configured on S series fixed switches.
The and parameter indicates that the relationship between rules is AND. After the parameter is specified, the following situations occur:
1. If a traffic classifier contains ACL rules, packets match the traffic classifier only when the packets match one ACL rule and all the non-ACL rules.
2. If a traffic classifier does not contain an ACL rule, packets match the traffic classifier only when the packets match all the non-ACL rules.
The or parameter indicates that the relationship between rules is OR. After this parameter is specified, packets match a traffic classifier if the packets match one or more rules.
By default, the relationships between rules in a traffic classifier on an S series modular switch and those on an S series fixed switch are OR and AND, respectively.
3. Configure matching rules based on actual requirements.
Non-conflicting rules can be configured in a traffic classifier. You can configure rules based on actual requirements.
4. Run the quit command to exit from the traffic classifier view.
For example, configure a traffic classifier to match packets with the VLAN ID being 100.
[HUAWEI] traffic classifier c1 operator or
[HUAWEI-classifier-c1] if-match vlan-id 100
[HUAWEI-classifier-c1] if-match vlan-id 200
[HUAWEI-classifier-c1] quit
Note: MQC cannot be configured on the S2700SI.

Scroll to top