< Home

pw-template

Function

The pw-template command creates a PW template. In the PW template, you can set attributes for a PW, such as the peer, control word, and tunnel policy.

The undo pw-template command deletes a PW template.

By default, no PW template is created.

Format

pw-template pw-template-name

undo pw-template pw-template-name

Parameters

Parameter Description Value
pw-template-name Specifies the PW template name.

The value is a string of 1 to 19 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Importing a PW template simplifies the configuration of PWs with similar attributes.

Prerequisites

L2VPN has been enabled by running the mpls l2vpn command.

Precautions
  • If a PW template is applied to a PW, the PW template cannot be deleted.

  • When a PW template is applied to a PW, the PW uses the PW attributes specified on the interface if the PW attributes specified on the interface are different from those specified in the template.

  • When modifying attributes in a PW template, run the reset pw command to make the modification take effect. This will cause PW disconnection and reconnection.

  • After a PW is bound to a link detection protocol, the remote IP address in the PW template cannot be changed. To change the remote IP address, unbind the PW from the link detection protocol.

Example

# Create a PW template named pwt1.

<HUAWEI> system-view
[HUAWEI] pw-template pwt1
[HUAWEI-pw-template-pwt1] 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >