pw-template

Function

The pw-template command creates a PW template and displays the PW template view. You can configure the attributes for PWs in the PW template. The attributes include the remote peer, control word, MTU, and tunnel policy.

The undo pw-template command deletes a PW template.

By default, no PW template is created.

Format

pw-template pwname

undo pw-template pwname

Parameters

Parameter Description Value
pwname

Specifies the name of a PW template.

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

The string can contain spaces if it is enclosed in double quotation marks (").

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
l2vpn write

Usage Guidelines

Usage Scenario

A PW template is a set of common attributes of PWs, which are shared by different PWs. A PW template can simplify the configuration of PWs with similar attributes. For example, if there are multiple VPWS connections between two devices and the VPWS connections share the same peer address and control word function, you can define those attributes in a PW template. Then, you can apply the PW template when setting up VPWS connections between interfaces.

Prerequisites

MPLS L2VPN has been enabled.

Follow-up Procedure

Apply an existing PW template that has been configured when configuring an MPLS L2VPN connection on an interface.

Precautions

  • When a pw is being configured on an interface by using a pw template, if the pw attributes specified on the interface are inconsistent with those specified in the pw template, the pw attributes specified on the interface prevail.
  • After the configuration is modified, you need to run the reset pw pw-template pwname command for the new configuration to take effect. This, however, may disconnect and re-establish the PWs that apply the pw template. if multiple PWs use This template at the same time, the system operation is affected.
  • the pw template being applied by a pw cannot be deleted.

Example

# Create a PW template named pwt1.
<HUAWEI> system-view
[~HUAWEI] mpls l2vpn
[*HUAWEI-l2vpn] quit
[*HUAWEI] pw-template pwt1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >