# Redundant VPWS

Load **vpws.redundancy.init.cfg**&#x20;

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

#IOS-XR
configure
load bootflash:vpws.redundancy.init.cfg
commit replace
```

<figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F0c0Btb7t1sXcA7mRqgek%2Fimage.png?alt=media&#x26;token=2a288094-d77f-4fc5-93d5-b5f67d58dd5d" alt=""><figcaption></figcaption></figure>

* Configure a VPWS between R1 and CE8. (R1 is now acting as a CE).&#x20;
* Ensure that R1 has redundant connections for the VPWS to both R2 and R4.&#x20;
* The connection to R2 should be primary, and R4 should be standby.

R1 and CE8 are already configured with the 10.1.8.X/24 subnet.

## Answer <a href="#id-300d9ef6-eb13-422a-8e8b-ed5084a0b9c0" id="id-300d9ef6-eb13-422a-8e8b-ed5084a0b9c0"></a>

```
#R2
int gi6
 service instance 1 eth
  encapsulation default
 exit
!
l2vpn xconnect context R1_CE8
 member gi6 service-instance 1
 member 6.6.6.6 18 encapsulation mpls

#R4
int gi4
 service instance 1 eth
  encapsulation default
 exit
!
l2vpn xconnect context R1_CE8
 member gi4 service-instance 1
 member 6.6.6.6 18 encapsulation mpls

#R6
int gi6
 service instance 1 eth
  encapsulation default
 exit
!
l2vpn xconnect context R1_CE8
 member gi6 service-instance 1
 member 2.2.2.2 18 encapsulation mpls group R1_CE8 priority 1
 member 4.4.4.4 18 encapsulation mpls group R1_CE8 priority 2
```

## Explanation/Verification <a href="#b1b7ed7f-08d9-4dc9-a7f5-b543fe475911" id="b1b7ed7f-08d9-4dc9-a7f5-b543fe475911"></a>

Usually a psuedowire is not redundant. If a PE fails, there is no redundancy and the VPWS is hard down. To add redundancy to an L2 service it is a little more complicated than an L3 VPN service. With L3VPN we can use routing protocol knobs to control routing.

To add redundancy to an xconnect we can use the **group priority** feature. We can define multiple remote neighbors under the xconnect and specify them in the same group and give one a lower (better) priority than the other. The group is just a string, but it must match for all neighbors in the group.

On R6 we can see that there are two PWs. The PW to R4 is in the standby state. As long as the primary PW (to R2) is up, the PW to R4 will be in standby, waiting to take over.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FBnLjKBiyYXZ4jEnKL6ko%2Fimage.png?alt=media&#x26;token=09545ece-b448-4b78-95ba-5884ba39d3ce" alt=""><figcaption></figcaption></figure></div>

We can also see this using **show l2vpn service xconnect all**

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F0mTm9CZ7e2PopRMAqggJ%2Fimage.png?alt=media&#x26;token=f7f7b101-bd4a-4d20-a1a5-c65b2200abe9" alt=""><figcaption></figcaption></figure></div>

On R1, the router will see CE8’s MAC arriving via the link to R2, so all outgoing traffic will naturally use that link. This allows us to use active-active dual connections.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F8ynwB3wBNtnfqweZmJiL%2Fimage.png?alt=media&#x26;token=f490f474-8677-46b1-8d27-a041d23d0384" alt=""><figcaption></figcaption></figure></div>

Let’s simulate a PE failure by shutting all interfaces on R2 down. This will prompt R6 to switchover to the standby PW for this xconnect.

```
#R2
int range gi1-2
 shut
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FZolFy1UySk1l5Ydy5zBj%2Fimage.png?alt=media&#x26;token=d16d4638-398d-4e0d-b3cb-b546e88598fc" alt=""><figcaption></figcaption></figure></div>

Ping R1 from CE8. The MAC will flap over to the link facing R4. (Previously this was Gi5). This allows R1 to dynamically react to PE failure.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F6FM9BMe7jiWIjk8O2K3G%2Fimage.png?alt=media&#x26;token=840709e6-2d68-4937-8110-16a5e0359560" alt=""><figcaption></figcaption></figure></div>
