if-match ip-prefix (tunnel-selector view)

Function

The if-match ip-prefix command configures a tunnel selector to use an IP prefix list as a route filtering rule.

The undo if-match ip-prefix command restores the default configuration.

By default, a tunnel selector does not use any IP prefix list as a route filtering rule.

Format

if-match ip-prefix ip-prefix-name

undo if-match ip-prefix ip-prefix-name

Parameters

Parameter Description Value
ip-prefix ip-prefix-name

Specifies the name of an IP prefix list.

The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

Tunnel-selector view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

To enable a device to match routes against a specified IP prefix list and determine whether to permit or deny the routes based on matching results, run the if-match ip-prefix command to configure a tunnel selector to use the IP prefix list as a route filtering rule.

The if-match ip-prefix command must be used with the ip ip-prefix command. For example:

  • If the if-match ip-prefix aa command is configured but the ip ip-prefix aa command is not configured, all routes will be permitted.
  • If the if-match ip-prefix aa and ip ip-prefix aa permit 1.1.1.1 32 commands are both configured, BGP routes with IP prefix 1.1.1.1/32 will be permitted.

Prerequisites

A tunnel selector has been configured using the tunnel-selector command.

Configuration Impact

Routes are filtered by IP prefix. Only routes matching the specified IP prefix list are permitted.

Example

# Configure a tunnel selector to use IP prefix list p1 as a route filtering rule.
<HUAWEI> system-view
[~HUAWEI] ip ip-prefix p1 permit 1.1.1.1 24
[*HUAWEI] tunnel-selector policy permit node 10
[*HUAWEI-tunnel-selector] if-match ip-prefix p1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >