A PW template defines common attributes for PWs, so it can be shared by different PWs. You can run the pw-template command to define some common attributes in a PW template to simplify PW configuration. After creating a PW on an interface, you can apply a PW template to the interface.
On the device, you can bind a PW template to a PW or reset the PW.
You can set the attributes for a PW through commands or a PW template. The attributes include the peer, tunnel policy, and control word. Importing the PW template can simplify the configuration of PWs with similar attributes.
Perform the following operations on the PEs.
The system view is displayed.
Run pw-template pw-template-name
A PW template is created and the PW template view is displayed.
A remote IP address is assigned to a PW template.
The control word function is enabled.
By default, the control word function is disabled.
For dynamic single-segment PWs, dynamic multi-segment PWs, and static single-segment PWs, VCCV in control word mode must be enabled on the UPEs. For static and mixed multi-segment PWs, VCCV in control word mode must be enabled on both the UPEs and SPEs.
The MTU in the PW template is specified.
By default, the MTU in a PW template is 1500.
A tunnel policy is configured for the PW template.
Configure a tunnel policy before you can apply this policy. If no tunnel policy is configured, an LSP tunnel is used and load balancing is not implemented. For details on how to configure a tunnel policy, see step 1 in Configuring and Applying a Tunnel Policy.
After modifying the attributes of a PW template, run the reset pw pw-template command in the user view to make the modification take effect. This will cause PW disconnection and reconnection. If multiple PWs use this template simultaneously, system operation is affected.