< Home

tunnel-selector (system view)

Function

The tunnel-selector command creates a tunnel selector and displays the tunnel selector view.

The undo tunnel-selector command cancels the setting.

By default, no tunnel selector is created.

Format

tunnel-selector tunnel-selector-name { permit | deny } node node

undo tunnel-selector tunnel-selector-name [ node node ]

Parameters

Parameter Description Value
tunnel-selector-name Specifies the name of a tunnel selector. The value is a string of 1 to 40 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
permit

Specifies the matching mode of the tunnel selector to permit. If a route matches all the if-match clauses of a node, the route matches the node and all the actions defined by the apply clause are performed on the route. If a route does not match one if-match clause of a node, the route continues to match the next node.

-
deny

Specifies the matching mode of the tunnel selector to deny. If a route matches all the if-match clauses of a node, the route is denied and does not match the next node.

-
node node

Specifies the index of the node of the tunnel selector. The route first matches the node with a smaller index value.

The value is an integer ranging from 0 to 65535.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The tunnel-selector command is often used in BGP/MPLS IP VPN networking. A tunnel selector needs to be created in the following scenarios:

  • The SPE in the HVPN networking needs to apply a tunnel policy to VPNv4 routes that are received from UPEs.

Follow-up Procedure

Configure the following clauses after creating a tunnel selector (each node of the tunnel selector consists of two parts):

  • if-match clause: sets filtering conditions on a node. To filter routes by RD, run the if-match rd-filter command. To filter routes by next hop, run the if-match ip next-hop command.
  • apply clause: applies a tunnel policy to the routes filtered by the if-match clause using the apply tunnel-policy command.

In addition, the system will have routes iterated to expected tunnels only after applying a tunnel selector. The tunnel-selector command can be run in the BGP view for the application of a tunnel selector.

Precautions

A change in the tunnel selector may cause VPN services to be interrupted because BGP-VPNv4 or BGP labeled routes may fail to be iterated to tunnels.

Example

# Create a tunnel selector named tps, and set the node number to 10 and the matching mode to permit.

<HUAWEI> system-view
[HUAWEI] tunnel-selector tps permit node 10
[HUAWEI-tunnel-selector] 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >