The if-match protocol command configures a matching rule based on a protocol in a traffic classifier.
The undo if-match protocol command deletes a matching rule based on a protocol in a traffic classifier.
By default, a matching rule based on a protocol is not configured in a traffic classifier.
Parameter |
Description |
Value |
---|---|---|
ip |
Specifies an IP protocol. |
- |
ipv6 |
Specifies an IPv6 protocol. |
- |
Usage Scenario
You can run the if-match protocol command to classify packets based on a protocol so that the device processes packets of the same protocol in the same manner.
Prerequisites
A traffic classifier has been created using the traffic classifier command in the system view.
Precautions
Currently, the device supports IPv4 and IPv6.
If you run the if-match protocol command in the same traffic classifier view multiple times, only the latest configuration takes effect.
If the relationship between rules in a traffic classifier is AND, and both the if-match protocol and if-match l2-protocol arp commands are configured in this traffic classifier, of the two, only the if-match l2-protocol arp command takes effect.