< Home

if-match ip next-hop (tunnel-selector view)

Function

The if-match ip next-hop command configures route filtering based on the next hop.

The undo if-match ip next-hop command cancels the setting.

By default, route filtering based on the next hop is not configured.

Format

if-match ip next-hop { acl { acl-number | acl-name } | ip-prefix ip-prefix-name }

undo if-match ip next-hop [ acl { acl-number | acl-name } | ip-prefix ip-prefix-name ]

Parameters

Parameter Description Value
acl acl-number Specifies the number of a basic ACL. The value is an integer ranging from 2000 to 2999.
acl 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.

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

Usage Guidelines

Usage Scenario

This command can be run in the tunnel selector view on the SPE in HVPN networking needs to apply a tunnel policy to VPNv4 routes to, for example, have the VPNv4 routes iterated to MPLS TE tunnels.

The if-match ip next-hop command is used to apply a tunnel policy to the VPNv4 or BGP-IPv4 labeled routes with a specified next hop, not all VPNv4 or BGP-IPv4 labeled routes.

Either an ACL or IP prefix list can be used to filter routes by next hop.

Prerequisite

The tunnel-selector command is run to create a tunnel selector.

An IP prefix list is configured using the ip ip-prefix command, or an ACL is configured using the acl command in the system view or the acl name command to specify the next hop.

Follow-up Procedure

Run the apply tunnel-policy command in the tunnel selector view to apply a tunnel policy to the routes that pass the filtering.

Precautions

Creating an ACL before it is referenced is recommended. If a nonexistent ACL is referenced using the command, all routes match the ACL.

Creating an IP prefix list before it is referenced is recommended. By default, nonexistent IP prefix lists cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent IP prefix list is referenced using the current command, all routes match the IP prefix list.

Example

# Configure route filtering based on the next hop.

<HUAWEI> system-view
[HUAWEI] tunnel-selector abc permit node 10
[HUAWEI-tunnel-selector] if-match ip next-hop acl 2000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >