< 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 | ip-prefix ip-prefix-name }

undo if-match ip next-hop { acl acl-number | 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.
ip-prefix ip-prefix-name Specifies the name of an IP prefix list. The name must be unique and is a string of 1 to 169 case-sensitive characters without any spaces.

When 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 in the following scenarios:

  • The ASBR or SPE in inter-AS VPN Option B or HoVPN networking needs to apply a tunnel policy to VPNv4 routes to, for example, have the VPNv4 routes iterated to MPLS TE tunnels.

  • The PE in inter-AS VPN Option C networking needs to apply a tunnel policy to BGP-IPv4 labeled routes to, for example, have the BGP-IPv4 labeled 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.

Run the tunnel-selector command to creat the tunnel selector.

An IP prefix list is configured using the ip ip-prefix 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.

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