# Redundant VPWS (IOS-XR)

Load **vpws.redundancy.xr.init.cfg**

```
#IOS-XE (R1-R6, CE5)
config replace flash:vpws.redundancy.xr.init.cfg

#IOS-XR (XR1)
configure
load vpws.redundancy.xr.init.cfg
commit replace
y
```

<figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2Ftwq8xyEdY7SKFaTD2sLC%2Fimage.png?alt=media&#x26;token=3bfd2b7f-ea72-4330-995c-7b4a0ef815ad" alt=""><figcaption></figcaption></figure>



Configure a VPWS between R1 and CE5, using redundancy for R1. This is the same as the previous lab, but now CE5 is the CE instead of CE8. The connection to R2 should be primary, and R4 should be standby.



R1 and CE5 are already configured with the 10.1.5.X/24 subnet.













































## Answer <a href="#id-086ed98a-0c7b-49c9-bccb-b8fe9edfc429" id="id-086ed98a-0c7b-49c9-bccb-b8fe9edfc429"></a>

```
#R2
int gi6
 no ip address
 service instance 1 eth
  encapsulation default
 exit
!
l2vpn xconnect context R1_CE8
 member gi6 service-instance 1
 member 11.11.11.11 15 encapsulation mpls

#R4
int gi4
 no ip address
 service instance 1 eth
  encapsulation default
 exit
!
l2vpn xconnect context R1_CE8
 member gi4 service-instance 1
 member 11.11.11.11 15 encapsulation mpls

#XR1
interface GigabitEthernet0/0/0/3
 l2transport
 !
!
l2vpn
 xconnect group VPWS
  p2p R1_CE5
   interface GigabitEthernet0/0/0/3
   neighbor ipv4 2.2.2.2 pw-id 15
    backup neighbor 4.4.4.4 pw-id 15
```



## Explanation/Verification <a href="#id-7350b8d7-8b4c-4996-b8e7-695bef44b1cf" id="id-7350b8d7-8b4c-4996-b8e7-695bef44b1cf"></a>

Just like with IOS-XE, we can configure VPWS redundancy on IOS-XR. We do this with the **backup neighbor** statement.

```
l2vpn
 xconnect group VPWS
  p2p R1_CE5
   interface GigabitEthernet0/0/0/3
   neighbor ipv4 2.2.2.2 pw-id 15
    backup neighbor 4.4.4.4 pw-id 15
```



Under normal circumstances, the pseudowire to R2 is up, and to R4 is in standby mode.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FQMEPkwOnPRIpgbnzfqic%2Fimage.png?alt=media&#x26;token=a9d98718-4e9e-47dd-ab1d-0ba66ed8b979" alt=""><figcaption></figcaption></figure></div>



If we shutdown Lo0 on R2, XR1 quickly switches over to the pseudowire with R4:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FqVzIkdIP03jeVRj6XRIp%2Fimage.png?alt=media&#x26;token=f0f75985-1163-41a2-b91f-c5658c4829f6" alt=""><figcaption></figcaption></figure></div>



When R2 comes back, the pseudowire with R4 goes back to standby.
