The if-match acl command configures a matching rule based on an Access Control List (ACL) in a traffic classifier.
The undo if-match acl command deletes a matching rule based on an ACL.
By default, a matching rule based on an ACL is not configured in a traffic classifier.
if-match [ ipv6 ] acl { acl-number | acl-name }
undo if-match [ ipv6 ] acl { acl-number | acl-name }
Parameter |
Description |
Value |
---|---|---|
ipv6 |
Indicates that IPv6 ACLs are matched. If this parameter is not specified, IPv4 ACLs are matched. |
- |
acl-number |
Specifies the number of an ACL. |
The value is an integer that ranges from 2000 to 5999, and the value of an ACL6 ranges from 2000 to 3999.
|
acl-name |
Specifies the name of an ACL. |
The value must be the name of an existing ACL. |
Usage Scenario
To classify packets based on the interface that receives packets, source IP address, destination IP address, protocol over IP, source and destination TCP port numbers, ICMP type and code, and source and destination MAC addresses, ARP packets, reference an ACL in a traffic classifier. You must first define an ACL and configure rules in the ACL, and then run the if-match acl command to configure a matching rule based on the ACL so that the device processes packets matching the same rule in the same manner.
Prerequisites
Create an ACL and configure rules in the ACL.
Create a traffic classifier using the traffic classifier command.
Precautions
Regardless of whether the relationship between rules in a traffic classifier is AND or OR, if an ACL contains multiple rules, the packet that matches one ACL rule matches the ACL.
Only the S5720-EI, S6720-EI, and S6720S-EI support traffic classifiers with advanced ACLs containing the ttl-expired field.
You can configure multiple ACL rules in a traffic classifier to match different types of packets.
If the vpn-instance parameter is specified in an ACL rule, a traffic policy that defines a traffic classifier matching this ACL rule does not take effect.
MTU-exceeded UDP packets will be fragmented. Only the first fragmented packet contains UDP information, and the other fragmented packets cannot be matched against ACL rules based on UDP information. Therefore, a traffic policy that contains if-match acl for matching UDP information does not take effect on fragmented packets. For example, if traffic policing is configured for traffic that contains a large number of fragmented packets and these fragmented packets do not match the UDP port number in an ACL rule, traffic policing is not performed on the fragmented packets. As a result, the actual rate is higher than the rate limit.
For S5720-HI, S5730-HI, S5731-H, S5731S-H, S5732-H, S5731-S, S5731S-S, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S, on devices for which the resource mode of extended entry space cannot be configured, ACL6 rules can define only the protocol number, source port number, destination port number, source IPv6 address, and destination IPv6 address. Additionally, ACL6-based traffic policies that contain these ACL6 rules cannot be applied to sub-interfaces and VLANIF interfaces.
On the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735S-S, and S5735-S-I, if the first-fragment parameter is specified in an ACL rule, a traffic policy defining this ACL rule can be applied only to the inbound direction.