# VPWS with PW interfaces

Load **basic.vpws.init.cfg**

```
#IOS-XE (R1-R6, CE8,9)
config replace flash:basic.vpws.init.cfg
```



Create a VPWS service between CE9 and CE8. Use a pseudowire template that enables the CW and enables sequencing. Apply this template to an explicit PW interface.













































## Answer <a href="#id-5293d63c-054b-478a-a465-a17e432f01c8" id="id-5293d63c-054b-478a-a465-a17e432f01c8"></a>

```
#R4
template type pseudowire CE9_CE8
 encapsulation mpls
 sequencing both
 control-word include
!
interface pseudowire89
 source template type pseudowire CE9_CE8
 encapsulation mpls
 neighbor 6.6.6.6 89
!
int gi6
 no ip address
 service instance 1 eth
  encapsulation default
exit
!
l2vpn xconnect context CE9_CE8
 member pseudowire89
 member gi6 service-instance 1

#R6
template type pseudowire CE9_CE8
 encapsulation mpls
 sequencing both
 control-word include
!
interface pseudowire89
 source template type pseudowire CE9_CE8
 encapsulation mpls
 neighbor 4.4.4.4 89
!
int gi6
 no ip address
 service instance 1 eth
  encapsulation default
exit
!
l2vpn xconnect context CE9_CE8
 member pseudowire89
 member gi6 service-instance 1
```



## Explanation <a href="#fd9b53e0-9380-4762-95c0-58675753dd17" id="fd9b53e0-9380-4762-95c0-58675753dd17"></a>

There are several ways to configure an xconnect (VPWS) on IOS-XE with custom options such as CW and sequencing.



One way is to configure the options under a pw-class. This is the older style and doesn’t have as many options as the newer pseudowire template style. The pw-class can be applied to an xconnect directly under the interface.

```
pseudowire-class name
!
int Gi1
 service-instance 1 eth
  encapsulation default
  xconnect 1.1.1.1 vcid pw-class name
```



The new style is to use a pseudowire template. This is applied to the neighbor under the l2vpn xconnect context.

```
template type pseudowire name
!
l2vpn xconnect context name
 member Gi1 service-instance 1 eth
 member 1.1.1.1 vcid template name
```



Additionally, the template can be applied to an explicit PW interface, as we did in this lab:

```
template type pseudowire CE9_CE8
 encapsulation mpls
 sequencing both
 control-word include
!
interface pseudowire89
 source template type pseudowire CE9_CE8
 neighbor 1.1.1.1 vcid
```



## Verification <a href="#id-966da408-bbbf-4ba1-9565-20f51ff94ce8" id="id-966da408-bbbf-4ba1-9565-20f51ff94ce8"></a>

Verification is the same in general as a normal VPWS service, however we should also verify that sequencing is enabled.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FfqUoC5xemvRdzwWuPwKZ%2Fimage.png?alt=media&#x26;token=f75b259c-0c01-4364-8319-68948df00b55" alt=""><figcaption></figcaption></figure></div>



See the “VPWS with Sequencing” lab for more details on VPWS sequencing.
