apply tunnel-policy

Function

The apply tunnel-policy command applies a tunnel policy to a tunnel selector.

The undo apply tunnel-policy command cancels the setting.

By default, no tunnel policy is configured for tunnel selector.

Format

apply tunnel-policy tunnel-policy-name

undo apply tunnel-policy

Parameters

Parameter Description Value
tunnel-policy-name

Name of the tunnel policy applied to the route.

The value is a string of 1 to 39 case-sensitive characters, spaces not supported.

Views

Tunnel-selector view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

In BGP/MPLS IP VPN networking, VPNv4 and labeled BGP routes direct traffic to LSPs by default, and load balancing is not performed. If you want to select other types of tunnels or configure load balancing for VPNv4 or labeled BGP routes, run the apply tunnel-policy command to apply a tunnel policy. The apply tunnel-policy command can be used in the following situations:

  • An ASBR in inter-AS VPN Option B networking needs to apply a tunnel policy to VPNv4 routes learned from PEs.
  • The RR on a VPN backbone network needs to apply a tunnel policy to VPNv4 routes learned from PEs.
  • A PE in inter-AS VPN Option C networking needs to apply a tunnel policy to received labeled BGP routes.

    If you want to apply a tunnel policy only to specific VPN or labeled BGP routes in the preceding situations, first use the if-match clause to filter routes. The if-match clauses that can be used are listed below:
  • if-match ip next-hop (tunnel-selector view) This clause filters routes by the specific IPv4 next hop.
  • if-match ipv6 next-hop (tunnel-selector view) This clause filters routes by the specific IPv6 next hop.
  • if-match rd-filter This clause filters routes by the RD.

Prerequisites

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

The if-match clauses have been 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 policy 1 for the VPN routes that are filtered based on the RD 100:3 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] ip rd-filter 1 deny 100:3
[*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 >