< Home

apply tunnel-policy (tunnel-selector view)

Function

The apply tunnel-policy command applies a tunnel policy to routes filtered by the if-match clause.

The undo apply tunnel-policy command cancels the setting.

By default, no tunnel policy is configured for filtered routes.

Format

apply tunnel-policy tunnel-policy-name

undo apply tunnel-policy

Parameters

Parameter Description Value
tunnel-policy-name Specifies the name of a tunnel policy to be applied to the routes that match the if-match clause. The value is a string of 1 to 39 case-sensitive characters, 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

In BGP/MPLS IP VPN networking, by default, LSPs are selected for VPNv4 and BGP labeled routes without performing load balancing. If you want to select other types of tunnels or configure load balancing for VPNv4 or BGP labeled routes, run the apply tunnel-policy command to apply a tunnel policy. The apply tunnel-policy command can be used in the following situations:
  • The RR on the backbone network of a VPN needs to apply a tunnel policy to VPNv4 routes learned from PEs.

If you want to apply a tunnel policy to only specific VPNv4 or BGP labeled routes in the situations mentioned above, first use the if-match clause to filter routes. The if-match commands that can be used are listed below:
  • if-match ip next-hop (tunnel-selector view)

    The command filters IPv4 routes by next hop.
  • if-match ipv6 next-hop (tunnel-selector view)

    The command filters IPv6 routes by next hop.
  • if-match rd-filter

    The command filters routes by RD.

Prerequisite

The tunnel-selector command is run to create a tunnel selector; if-match clauses are configured as needed.

Follow-up Procedure

If the tunnel policy specified in the apply tunnel-policy command does not exist in the system, run the tunnel-policy command to create the tunnel policy.

Example

# Select policy1 for the VPN routes that are filtered by RD in the tunnel selector view.

<HUAWEI> system-view
[HUAWEI] tunnel-policy policy1
[HUAWEI-tunnel-policy-policy1] tunnel select-seq cr-lsp lsp load-balance-number 1 
[HUAWEI-tunnel-policy-policy1] quit
[HUAWEI] tunnel-selector tps permit node 10
[HUAWEI-tunnel-selector] if-match rd-filter 1
[HUAWEI-tunnel-selector] apply tunnel-policy policy1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >