tnl-policy (PW template view)

Function

The tnl-policy command specifies a tunnel policy for PWs applying a PW template.

The undo tnl-policy command restores the default configuration.

By default, no tunnel policy is specified for PWs applying a PW template.

Format

tnl-policy tnlPolicyName

undo tnl-policy

Parameters

Parameter Description Value
tnlPolicyName

Specifies the name of a tunnel policy.

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

PW template view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
l2vpn write

Usage Guidelines

Usage Scenario

If no tunnel policy is configured, the tunnel management module searches for a tunnel according to the default policy. In VPWS, an LDP LSP is used by default and load balancing is performed if there are more than one LDP LSPs for the same destination address. If it is required that the sequence in which tunnels are selected and the number of tunnels for load balancing be specified or tunnels be selected based on peer IP addresses, run the tnl-policy command to specify a tunnel policy for PWs applying the PW template.

Prerequisites

  • A tunnel policy has been created.
  • MPLS L2VPN has been enabled.
  • A PW template has been created.

Configuration Impact

Applying a tunnel policy to a device changes the rules for forwarding services. You can manually configure the PW that each tunnel can bear by planning network resources and setting up tunnels with different QoS features. Then, network resources can be fully used.

Follow-up Procedure

Apply a configured PW template when creating an LDP or SVC VPWS connection on an interface.

Precautions

The tunnel policy applied by a PW must already be created in the system view. Otherwise, the VPWS connection cannot go Up.

If a tunnel policy is configured in a PW template and another tunnel policy is configured using the mpls l2vc or mpls static-l2vc command on the interface, the tunnel policy configured on the interface prevails.

Example

# Specify a tunnel policy named policy1 for PWs applying the PW template named pwt.
<HUAWEI> system-view
[~HUAWEI] tunnel-policy policy1
[~HUAWEI-tunnel-policy-policy1] quit
[~HUAWEI] mpls
[*HUAWEI-mpls] quit
[*HUAWEI] mpls l2vpn
[*HUAWEI-l2vpn] quit
[*HUAWEI] pw-template pwt
[*HUAWEI-pw-template-pwt] tnl-policy policy1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >