if-match acl (Route-Policy view)

Function

The if-match acl command sets a matching rule that is based on the ACL.

The undo if-match acl command cancels the configuration.

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

Format

if-match acl acl-number

undo if-match acl acl-number

Parameters

Parameter Description Value
acl-number Specifies the number of a basic ACL. The value is an integer ranging from 2000 to 2999.

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

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.

Example

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

<sysname> system-view
[sysname] route-policy policy permit node 10
[sysname-route-policy] if-match acl 2000

Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.