< Home

if-match acl (Route-Policy view)

Function

The if-match acl command sets a matching rule that is based on the Access Control List (ACL).

The undo if-match acl command deletes the matching rule based on the specified ACL.

By default, no matching rule based on the ACL is configured.

Format

if-match acl { acl-number | acl-name }

undo if-match acl { acl-number | acl-name }

Parameters

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 ACL. The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter.

Views

Route-Policy view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can run the if-match acl command to set a matching rule based on the ACL to match IPv4 prefixes.

Prerequisites

The if-match acl command can be used only after the route-policy command is used.

Precautions

The routing policy matches routes using the ACL. Routes that match the ACL will be checked by other if-match clauses of this node. Routes that do not match the ACL will be checked by the next node.

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 an ACL, when the rule command is used to configure a filtering rule, the filtering rule is effective only with the source address range that is specified by the source parameter and with the time period that is specified by the time-range parameter.

Example

# Set a matching rule that is based on ACL 2000.

<HUAWEI> system-view
[HUAWEI] route-policy policy permit node 10
[HUAWEI-route-policy] if-match acl 2000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >