# VPWS with FAT-PW

Load **vpws.fat.pw\.init.cfg**

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

Configure a VPWS between CE1 and CE8. Enable FAT-PW so that traffic is load balanced in the core using the multiple available ECMP paths between R1 and R6.

CE1 and CE8 are already pre-configured with multiple IP addresses for testing. Configure load balancing for both SRC/DST IP.

## Answer <a href="#id-34c5d2da-0152-4b2a-a49a-bde3f82f8998" id="id-34c5d2da-0152-4b2a-a49a-bde3f82f8998"></a>

```
#R1
int gi4
 no ip address
 service instance 1 eth
  encapsulation default
 exit
!
template type pseudowire FAT
 encapsulation mpls
 load-balance flow ip src-dst-ip
 load-balance flow-label both
!
l2vpn xconnect context CE1_CE8
 member gi4 service-instance 1
 member 6.6.6.6 18 template FAT

#R6
int gi6
 no ip address
 service instance 1 eth
  encapsulation default
 exit
!
template type pseudowire FAT
 encapsulation mpls
 load-balance flow ip src-dst-ip
 load-balance flow-label both
!
l2vpn xconnect context CE1_CE8
 member gi6 service-instance 1
 member 1.1.1.1 18 template FAT
```

## Explanation <a href="#bf4a1788-68e9-430a-8f42-ac73fd34fb90" id="bf4a1788-68e9-430a-8f42-ac73fd34fb90"></a>

The **FAT-PW** feature (Flow-aware Transport for Pseudowires) enables proper per-flow load balancing in the MPLS core. When this feature is enabled, the router adds an additional label at the bottom of the stack that identifies a flow. The egress PE simply discards this label. Its only purpose is to force LSRs to properly keep all flows in the same ECMP path.

Without this feature, all traffic would take the same single path. This is because all traffic in the pseudowire will have the same bottom service label. When MPLS is used, P routers use the bottom label for the ECMP hash. This allows a P router to not need to inspect upper layer headers such as the L3 src/dst IP.

Negotiation of the FAT-PW feature requires LDP, because both routers must agree that they will receive a “bogus” bottom label that must be discarded.

To enable FAT-PW we must define the load balancing method, and then enable the flow-label in either one or both directions.

```
template type pseudowire name
 load-balance flow [ethernet|ip] [dst-mac|src-mac|src-dst-mac|dst-ip|src-ip|src-dst-ip]
 load-balance flow-label both|receive|transmit
```

We can see that the flow label is negotioated in the LDP mapping message for FEC128:

<figure><img src="/files/Ly5bA8uaORckSA4P7oTn" alt=""><figcaption></figcaption></figure>

We can also verify this on the CLI:

<div align="left"><figure><img src="/files/ilEURHXFRda4hivPacp5" alt=""><figcaption></figcaption></figure></div>

We can see that traffic sourced from CE1 now has three labels as it leaves R1. The bottom label is the flow label.

<figure><img src="/files/Lr5rZ2Pdyor07Z5vBs7P" alt=""><figcaption></figcaption></figure>

Note that this can also be enabled on IOS-XR using:

```
l2vpn
 pw-class FAT
  encapsulation mpls
   load-balancing
    flow-label both
```

## Further Reading <a href="#id-1e5c1a30-7ed6-4c98-a594-33b7c16ff85a" id="id-1e5c1a30-7ed6-4c98-a594-33b7c16ff85a"></a>

<https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/mp_l2_vpns/configuration/xe-3s/asr903/16-12-1/b-mpls-l2-vpns-xe-16-12-asr900/b-mpls-l2-vpns-xe-16-12-asr900_chapter_01.html#fat-pw-load-balancing>

Nick Russo, SPv4 Guide, pg. 1582


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ccie-sp.gitbook.io/ccie-spv5.1-labs/labs/vpws/vpws-with-fat-pw.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
