How to configure a traffic classifier on S series switches

26

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.

Other related questions:
How to configure traffic classifier priorities on a CE series switch
When the classifier classifier-name behavior behavior-name [ precedence precedence-value ] command is used in the traffic policy view to bind a traffic classifier and a traffic behavior to a traffic policy, you can specify precedence-value to set a priority for the traffic classifier. In the command, precedence-value is an integer that ranges from 0 to 65535. A smaller value indicates a higher priority. If precedence-value is not specified, the system automatically allocates a priority to the traffic classifier. The allocated priority is a multiple of 5 that is closest to the highest priority of current traffic classifiers. For example, if the highest priority of current traffic classifiers is 7, the system allocates a priority of 10 to the traffic classifier when precedence-value is not specified.

How is bandwidth of different types of traffic guaranteed
Configure traffic classifiers to differentiate traffic, configure queue ef or queue af in traffic behaviors, bind the traffic classifiers and traffic behaviors to a traffic policy, and apply the traffic policy to an interface.

Differences between the and and or relationships between rules in a traffic classifier on S series switches
For S series switches (except the S1700), and and or indicate the relationship between rules in a traffic classifier. - and indicates that the relationship between rules is AND. After and 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. - or indicates that the relationship between rules is OR. After or is specified, packets match a traffic classifier as long as the packets match at least one rule. 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. Note: MQC cannot be configured on the S2700SI.

A traffic policy is bound to multiple pairs of traffic classifiers and traffic behaviors. What Is the sequence in which traffic classifiers and traffic behaviors are used
If the classifier classifier-name behavior behavior-name command is executed for a traffic policy multiple times, the configured behaviors are executed in the order in which they are configured. For example, a traffic policy contains the following four behaviors: classifier classifier1 behavior behavior1 classifier classifier2 behavior behavior2 classifier classifier3 behavior behavior3 classifier classifier4 behavior behavior4 The received packet is first checked against classifier1. If the packet matches classifier1, the packet is processed according to behavior1 and does not need to be checked against classifier2. If the packet does not match classifier1, the packet is checked against classifier2. If the packet matches classifier2, the packet is processed according to behavior2 and does not need to be checked against classifier3...

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top