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

Function

The if-match ip next-hop command configures a rule for matching routes based on the next hop for a tunnel selector.

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

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

Format

if-match ip next-hop ip-prefix ip-prefix-name

undo if-match ip next-hop [ ip-prefix ip-prefix-name ]

Parameters

Parameter Description Value
ip-prefix ip-prefix-name

Specifies the name of an IP address prefix list that is used for route filtering.

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

The if-match ip next-hop command can be run in the tunnel-selector view in the following scenarios:

  • The ASBR in inter-AS VPN Option B networking needs to apply a tunnel policy to VPNv4 routes. For example, the ASBR needs to have the VPNv4 routes recurse to MPLS TE tunnels.
  • A PE in inter-AS VPN Option C networking needs to apply a tunnel policy to labeled BGP-IPv4 routes. For example, the PE needs to have the labeled BGP-IPv4 routes recurse 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.

    To filter routes based on next hops, use either an ACL (using the if-match ip next-hop acl command) or IP prefix list.

Prerequisites

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

An IP prefix list has been configured using the ip ip-prefix command based on the next hops of routes.

Follow-up Procedure

Run the apply tunnel-policy command in the tunnel-selector view to apply a tunnel policy to the matched routes.

Example

# Configure a rule for matching routes based on the next hop.
<HUAWEI> system-view
[~HUAWEI] acl 2000
[*HUAWEI-acl4-basic-2000] quit
[*HUAWEI] tunnel-selector abc permit node 10
[*HUAWEI-tunnel-selector] if-match ip next-hop ip-prefix aa
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >