if-match acl
Function
The if-match acl command configures a matching rule in a traffic classifier based on an Access Control List (ACL).
The undo if-match acl command deletes a matching rule in a traffic classifier based on an ACL.
By default, a matching rule based on an ACL is not configured in a traffic classifier.
Format
if-match [ ipv6 ] acl { acl-number | acl-name }
undo if-match [ ipv6 ] acl { acl-number | acl-name }
Parameters
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 4999. The number of an ACL6 ranges from 2000 to 3999.
|
acl-name | Specifies an ACL name. |
The value is a string of 1 to 32 case-sensitive characters without spaces. The name starts with a letter and can contain letters, digits, and symbols such as the number sign (#), percentage symbol (%), and hyphen (-). |
Usage Guidelines
Usage Scenario
To classify packets based on the interface, 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, reference an ACL. You must first define an ACL and configure rules in the ACL. Then run the if-match acl command to configure a matching rule for traffic classification based on the ACL so that packets matching the same rule are processed 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 the traffic classifier is AND or OR, if an ACL contains multiple rules, the packet that matches only one ACL rule matches the ACL.
You can configure multiple ACL rules in a traffic classifier to match different types of packets. A traffic classifier allows a maximum of 1024 if-match rules on the AC6605, ACU2, AC6805, or AC6800V, and a traffic classifier allows a maximum of 256 if-match rules on the AC6507S, AC6508, or AC6005.