The if-match acl command sets an ACL-based filtering rule.
The undo if-match acl command cancels the configuration.
By default, no ACL-based filtering rule is set.
Parameter | Description | Value |
---|---|---|
acl-number |
Specifies the number of a basic ACL. |
The value is an integer ranging from 2000 to 2999. |
acl-name |
Specifies the name of a named basic ACL. |
The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, case sensitive). |
Usage Scenario
To set an ACL-based filtering rule, run the if-match acl command.
Prerequisites
An acl has been created using the acl command and a route-policy has been configured using the route-policy command.
Precautions
An ACL name is a character string that starts with a letter. For example, "2a" is an invalid ACL name.
The if-match acl command and the if-match ip-prefix command are mutually exclusive. If you run the if-match ip-prefix command after running the if-match acl command, the configuration of the if-match ip-prefix command overrides the configuration of the if-match acl command. For a named ACL, when the rule command is used to configure a filtering rule, only the source address range specified in source takes effect on the filtering rule. The if-match acl command is generally used to match traffic and is not recommended for route matching. To use a route-policy to implement precise route matching, you are advised to configure filtering rules that are based on IP prefix lists in the route-policy.