MPLS MASTERCLASS · CHAPTER 8

VPLS: the customer LAN over MPLS

A virtual switch inside the core: VFI, bridge domain and service instance, one OSPF segment shared across sites, and the final choice between L3VPN, VPWS and VPLS.

13 min readVideos: Day 2, parts 4 and 5Level: intermediate

From point A to point B

Point A: you can join two sites with a pseudowire. Point B: you join all of a customer's sites in one LAN that crosses the MPLS core, add branches without maintenance windows, and choose wisely between L3VPN, VPWS and VPLS.

This chapter closes the masterclass with the same Day 2 lab: the IGP + LDP core and four customer routers on 172.16.1.0/24.

What you'll see
  1. Why VPLS scales better than a collection of pseudowires.
  2. The VFI: vpn id, member and the full mesh of pseudowires.
  3. Bridge domain and service instance: the ports of the virtual switch.
  4. How a VPLS forwards: MAC learning, flooding and split horizon.
  5. OSPF across four sites over the VPLS: DR, BDR and DROTHER.
  6. Three troubleshooting methods and a table to choose the service.

Why VPLS

Picture the request: “connect these two branches today; next week we're turning on two more.” With pseudowires, every pair of sites needs its own circuit. Growing means touching circuits that already work, sometimes with a maintenance window.

VPLS solves that problem. The provider gives the customer a switch: each site plugs into a port and all of them share one broadcast domain. To grow, you add a port or a PE to the existing service, without bringing sessions down.

The use case in the class is a customer WAN. Its sites exchange routes with their own OSPF across the VPLS: a data center with an SAP server, a file server that by policy can't move to the cloud, and a router that aggregates branches. The customer can add a wireless link as a backup, and OSPF reconverges over it if the MPLS circuit fails.

And the pseudowire? It still has its place. Between a company and its transit provider there's a single eBGP circuit: a pseudowire is the natural choice there. With 30 branches that must see each other, the natural choice is VPLS.

VFI, vpn id and member: the full mesh

The P routers stay untouched: they keep doing their IGP and LDP work. Everything is configured on the PEs, in three steps. The first creates the VFI (virtual forwarding instance), the VPLS context:

! Step 1 - VFI context: vpn id and one member per remote PE
PE-1(config)# l2vpn vfi context customerA
PE-1(config-vfi)# vpn id 159
PE-1(config-vfi)# member 4.4.4.4 encapsulation mpls

PE-2(config)# l2vpn vfi context customerA
PE-2(config-vfi)# vpn id 159
PE-2(config-vfi)# member 1.1.1.1 encapsulation mpls
  • l2vpn vfi context customerA: the name is local to each PE. It could differ on the other PE, but a standard per customer is a good idea.
  • vpn id 159: identifies the VPLS and must be the same on every PE in the service. In show l2vpn vfi you'll see that the pseudowire uses 159 as its VC ID. Cisco lets you set a different VC ID on each member; the lab uses the default.
  • member 4.4.4.4 encapsulation mpls: each member is another PE's loopback, with which a pseudowire is opened over targeted LDP. PE-1 points to 4.4.4.4 and PE-2 to 1.1.1.1.

With more PEs, each one carries one member per remote PE. That builds a full mesh of pseudowires among all the PEs in the VPLS. If the customer opens a site where there's no PE today, the new PE joins that full mesh and the others add it as a member.

VPLS: a full mesh of pseudowires that the customer sees as one switch Provider view: PE-1 (1.1.1.1) connects CE-A1 on Gi1 and CE-B1 on Gi2; PE-2 (4.4.4.4) connects CE-A2 and CE-B2. Both PEs run the VFI customerA with vpn id 159 and bridge-domain 2222, joined by a pseudowire with VC 159. A future PE-3 for a new site joins the full mesh with two more pseudowires. Split horizon: a frame received on one pseudowire is never sent out another one. Customer view: the four CE routers share one switch on 172.16.1.0/24: CE-B1 .1 and CE-B2 .2 are OSPF DROTHER, CE-A1 .3 is the BDR and CE-A2 .4 is the DR. PROVIDER VIEW · FULL MESH CE-A1 .3 CE-B1 .1 CE-A2 .4 CE-B2 .2 Gi1Gi2 Gi1Gi2 PE-1 · 1.1.1.1 VFI customerA · vpn id 159 bridge-domain 2222 PE-2 · 4.4.4.4 VFI customerA · vpn id 159 bridge-domain 2222 VC 159 PE-3 · NEW SITE one more member in each VFI Split horizon: a frame from one pseudowire never goes out another pseudowire. n PEs → n·(n−1)/2 pseudowires CUSTOMER VIEW · ONE LAN CE-B1 .1 DROTHER CE-B2 .2 DROTHER VPLS = VIRTUAL SWITCH 172.16.1.0/24 CE-A1 .3 BDR CE-A2 .4 DR OSPF: DR 0.0.0.4 · BDR 0.0.0.3 DROTHER ↔ DROTHER stays in 2WAY ping 255.255.255.255 → 3 replies

The VPLS as the provider sees it (a full mesh of pseudowires between PEs) and as the customer sees it (a switch with four ports on 172.16.1.0/24). Diagram: The House of Routing.

Full mesh scale. With n PEs, a VPLS needs n·(n−1)/2 pseudowires (RFC 4762). With 4 PEs that's 6; with 20 PEs, 190. For large networks there's H-VPLS, which reduces the mesh with spoke pseudowires.

Bridge domain and service instance

The second step creates the bridge domain: the switch itself. There you declare its ports, which are the customer interface with its service instance, and the VFI. The third step activates the service instance on the physical interface.

! Step 2 - bridge domain: customer port + VFI
PE-1(config)# bridge-domain 2222
PE-1(config-bdomain)# member GigabitEthernet1 service-instance 555
PE-1(config-bdomain)# member vfi customerA

! Step 3 - service instance on the customer interface
PE-1(config)# interface GigabitEthernet1
PE-1(config-if)# service instance 555 ethernet
PE-1(config-if-srv)# encapsulation default

! PE-2: same bridge domain and service instance on its GigabitEthernet1
  • bridge-domain 2222: the number is local and can change from one PE to another. The class recommendation: use the same one for the same customer.
  • member GigabitEthernet1 service-instance 555: connects the customer port to the switch. The number can vary between PEs, but inside the router it must match the one you configure on the interface.
  • member vfi customerA: joins the local switch to the full mesh of pseudowires.
  • service instance 555 ethernet + encapsulation default: the interface hands its traffic to the bridge domain. default means “take everything”, tagged or untagged. You can be more selective with encapsulation dot1q, dot1ad or untagged.
Three steps to build VPLS on a PE Step 1, the VFI context: l2vpn vfi context customerA, vpn id 159 and one member per remote PE with encapsulation mpls, which builds the full mesh of pseudowires. Step 2, the bridge domain: bridge-domain 2222 with the customer port as member with service-instance 555, and member vfi customerA. Step 3, the service instance on the interface: service instance 555 ethernet with encapsulation default. Like a route-map: select, associate, apply. The VFI name, the bridge domain number and the service instance number are local; vpn id 159 must match on every PE. 1 · VFI CONTEXT l2vpn vfi context customerA vpn id 159 member 4.4.4.4 encapsulation mpls → full mesh of pseudowires 2 · BRIDGE DOMAIN bridge-domain 2222 member Gi1 service-instance 555 member vfi customerA → the virtual switch 3 · SERVICE INSTANCE interface GigabitEthernet1 service instance 555 ethernet encapsulation default → the port goes live Like a route-map: select (VFI) → associate (bridge domain) → apply on the interface (service instance) Local: VFI name, bridge domain, service instance · Same on every PE: vpn id 159

The three VPLS steps on the PE: VFI context, bridge domain and service instance. Diagram: The House of Routing.

Jesús compares it to a route-map: first you select, then you associate, and finally you apply on the interface. This syntax (l2vpn vfi context, bridge-domain, member) is the one the Cisco IOS XE guide documents for VPLS. The classic form is still alive in many networks: l2 vfi NAME manual with vpn id and neighbor, and on Catalyst switches the VFI is bound to an SVI with xconnect vfi.

! Classic CLI (Cisco documentation, not used in the class)
PE-1(config)# l2 vfi customerA manual
PE-1(config-vfi)# vpn id 159
PE-1(config-vfi)# neighbor 4.4.4.4 encapsulation mpls
! On Catalyst switches the VFI is bound to an SVI
PE-1(config)# interface Vlan2222
PE-1(config-if)# xconnect vfi customerA

Once the second PE is configured, the ping from 40.40.40.40 to 30.30.30.30 gets replies. Wireshark shows the same structure as the pseudowire: the outer transport label, the inner VPLS label and, inside, the customer's Ethernet frame.

How it forwards: MAC learning and split horizon

A PE running VPLS behaves like an Ethernet switch. It learns MAC addresses in the data plane: when a frame arrives, it ties the source MAC to the port it came in on, whether that's a customer interface or a pseudowire. If the destination MAC is unknown, or the frame is broadcast or multicast, it floods it out every port of the bridge domain except the ingress one.

In a switched network, Spanning Tree prevents loops. In a VPLS core it isn't needed, thanks to split horizon: a PE never forwards out a pseudowire what it received on another pseudowire of the same VPLS. With a full mesh, every PE has already received the frame from the source PE. On Cisco, split horizon is on by default.

One OSPF segment across sites

With the VPLS up, the class moves all customers to OSPF. CE-B1 and CE-B2 drop BGP and their subinterfaces and join the same segment. That leaves four routers on 172.16.1.0/24, each with a fixed router ID:

RouterIP on 172.16.1.0/24Router IDLoopbacksOSPF role
CE-B1.10.0.0.110.10.10.10DROTHER
CE-B2.20.0.0.220.20.20.20DROTHER
CE-A1.30.0.0.330.30.30.30 and 31.31.31.31BDR
CE-A2.40.0.0.440.40.40.40 and 41.41.41.41DR
CE-A1(config)# interface Loopback0
CE-A1(config-if)# ip address 30.30.30.30 255.255.255.255
CE-A1(config-if)# interface Loopback1
CE-A1(config-if)# ip address 31.31.31.31 255.255.255.255
CE-A1(config-if)# interface GigabitEthernet0/1
CE-A1(config-if)# ip address 172.16.1.3 255.255.255.0
CE-A1(config-if)# no shutdown
CE-A1(config-if)# router ospf 1
CE-A1(config-router)# router-id 0.0.0.3
CE-A1(config-router)# network 0.0.0.0 255.255.255.255 area 0

! CE-A2: Loopback0 40.40.40.40, Loopback1 41.41.41.41, Gi0/1 172.16.1.4/24, router-id 0.0.0.4

With the fourth router on the segment, a state shows up that confuses many people: CE-B2 sees CE-B1 in 2WAY/DROTHER, and it doesn't move on. That's correct. On a broadcast network, OSPF elects a DR and a BDR; here the highest router IDs win, 0.0.0.4 as DR and 0.0.0.3 as BDR. DROTHERs form full adjacencies only with the DR and the BDR, and stay in 2WAY with each other.

Two tests close the exercise:

  • A ping 255.255.255.255 gets replies from the other three routers, as on any LAN.
  • CE-A1 advertises a new network, loopback 100.100.100.100/32, and every site learns it with metric 2: cost 1 for the loopback plus cost 1 for the segment. The core adds nothing, because for the customer's OSPF the VPLS is a single segment. The customer connects the new network without buying another circuit, which in the example cost 300 dollars a month.
CE-A1(config)# interface Loopback100
CE-A1(config-if)# ip address 100.100.100.100 255.255.255.255
CE-A1(config-if)# ip ospf network point-to-point

CE-B1# show ip route | include O
CE-A2# show ip route 100.100.100.100
CE-B1# ping 100.100.100.100 source 10.10.10.10

Compare it with the Day 1 L3VPN. There, the PE redistributes the customer routes into MP-BGP as VPNv4, with route distinguisher and route target, and on the other side they arrive as O IA. In VPLS the PE doesn't take part in the customer's OSPF: it only switches frames. The core also runs OSPF process 1, but they're separate domains, because the customer's OSPF travels encapsulated.

Scaling without maintenance windows

Adding CE-B1 and CE-B2 didn't require touching the VFI or the pseudowire. On each PE, two changes were enough: one more member in the bridge domain and the service instance on the new interface.

! A new port for the same VPLS: one more member, one more service instance
PE-1(config)# bridge-domain 2222
PE-1(config-bdomain)# member GigabitEthernet2 service-instance 555
PE-1(config-bdomain)# interface GigabitEthernet2
PE-1(config-if)# service instance 555 ethernet
PE-1(config-if-srv)# encapsulation default

! CE-B1 leaves BGP and joins the OSPF segment
CE-B1(config)# no router bgp 10
CE-B1(config)# no interface GigabitEthernet0/0.2222
CE-B1(config)# interface GigabitEthernet0/0
CE-B1(config-if)# ip address 172.16.1.1 255.255.255.0
CE-B1(config-if)# no shutdown
CE-B1(config-if)# router ospf 1
CE-B1(config-router)# router-id 0.0.0.1
CE-B1(config-router)# network 0.0.0.0 255.255.255.255 area 0

It's like plugging another cable into the switch. If the customer opens a site with a new PE, the change is also additive: its loopback becomes a member in the VFI of the other PEs.

To verify, these are the commands from the class:

PE-1# show l2vpn vfi
PE-1# show l2vpn atom summary
PE-1# show mpls l2transport summary
PE-1# show mpls l2transport binding
CE-B2# show ip ospf neighbor
CE-B2# ping 255.255.255.255
  • show l2vpn vfi: VFI name, VPN ID, bridge domain, attachment circuits and pseudowires with their peer. In the class: multipoint type, LDP signaling, VC 159 and peer 1.1.1.1.
  • show mpls l2transport summary and binding: active circuits per destination, and local and remote labels.
  • show ip ospf neighbor on the CEs: FULL with the DR and the BDR, 2WAY between DROTHERs.

Troubleshooting: three methods

Live, CE-B1 wouldn't form an OSPF neighborship. The IP was fine and the interface was up. The last change had been on the PE, so Jesús went straight there: GigabitEthernet2 was missing its service instance. With service instance 555 ethernet and encapsulation default, the neighborship came up.

That reasoning has a name. There are three basic methods, and the CCNA asks about them:

  1. Top-down: you start at layer 7 and work down. It fits when the symptom is in the application: the browser shows the text but not the images, perhaps because of a plugin or a stateful firewall blocking JPGs.
  2. Bottom-up: you start at the cable and work up. Is it plugged in? Is the interface configured? Can you reach the gateway? And from the gateway to the internet? It's the choice when you know nothing about the problem; according to Jesús, that's most cases.
  3. Divide and conquer (by layers): you look at the scenario and go straight to the suspect layer. It works when you know what to expect from the protocol, as with the missing service instance.

The underlying lesson: configure deterministically. If you know what should happen after each command, when it doesn't happen you know where to look.

L3VPN, VPWS or VPLS

L3VPN, VPWS and VPLS compared L3VPN: the customer sites route to the PE, which holds a VRF and exchanges VPNv4 routes with MP-BGP; the service is any-to-any and routed. VPWS or AToM: one pseudowire joins exactly two sites, like a logical cable, configured with xconnect and a VC ID. VPLS: several sites share one broadcast domain through a virtual switch, built with a VFI, a vpn id and a bridge domain. L3VPN VPWS · AToM VPLS VRF · MP-BGP CE CE CE CE CE 1 pseudowire a third site needs new pseudowires SWITCH CE CE CE CE any-to-any, routed (layer 3) VRF · RD · RT · VPNv4 point-to-point (layer 2) xconnect · VC ID point-to-multipoint (layer 2) VFI · vpn id · bridge domain Same foundation for all three: IGP + LDP in the core, service configured PE to PE.

Three services on the same foundation: L3VPN routes, VPWS joins two sites and VPLS joins many in one broadcast domain. Diagram: The House of Routing.

CriterionL3VPNVPWS (AToM)VPLS
TopologyAny-to-any, routedPoint-to-pointPoint-to-multipoint
What the customer seesA provider router at each siteA logical cableA virtual switch
Service layer3 (IP packets)2 (whole frame)2 (shared broadcast domain)
PE takes part in customer routingYes: PE-CE and MP-BGP VPNv4NoNo
Pieces on the PEVRF, RD, RT, MP-BGPxconnect, VC IDVFI, vpn id, member, bridge domain
Service signalingMP-BGP (VPN label)Targeted LDPTargeted LDP in a full mesh
Adding a siteVRF and PE-CE; routes imported by route targetOne new pseudowire per pairOne more member or port
Typical caseRouted WAN for many customerseBGP with an upstream, trunk between two sitesCustomer WAN with its own IGP

The rule from the class is simple: point-to-point, AToM; point-to-multipoint, VPLS. If the customer wants the provider to route for it, L3VPN. All three share the foundation: IGP + LDP in the core and the service always configured PE to PE.

Class videos

These two videos close the 2nd MPLS-VPLS Marathon, recorded live on March 20, 2021 with CSR 1000v routers in GNS3. The audio is in Spanish, with subtitles in Spanish, English, French and Portuguese.

Recorded live; Spanish audio with Spanish, English, French and Portuguese subtitles. When you play it, the video loads from YouTube. Day 2 playlist on YouTube

Test what you learned

1. You configure vpn id 159 on PE-1 and vpn id 160 on PE-2. What do you expect?

Answer. The pseudowire won't come up. The vpn id identifies the VPLS and, by default, is used as the VC ID: it must be the same on every PE in the service.

2. Can the bridge domain be 2222 on PE-1 and 3000 on PE-2?

Answer. Yes, the number is local. What must match inside each router is the service instance in the bridge domain and on the interface.

3. CE-B2 sees CE-B1 in 2WAY/DROTHER. Is something wrong?

Answer. No. On a broadcast segment, DROTHERs form full adjacencies only with the DR and the BDR; with each other they stay in 2WAY.

4. Why doesn't a VPLS core need Spanning Tree?

Answer. Because of the full mesh and split horizon: a PE never forwards out a pseudowire what it received on another one of the same VPLS, so no loops form between PEs.

5. A customer with 30 branches wants its routers to run OSPF with each other without the provider seeing its routes. Which service do you pick?

Answer. VPLS. It's point-to-multipoint, grows by adding members and ports, and the PE doesn't take part in the customer's routing.

Key takeaways

  • VPLS is a point-to-multipoint virtual switch: it grows by adding members and ports without touching what already works.
  • Three steps on the PE: l2vpn vfi context (vpn id and member), bridge-domain (ports and VFI) and service instance on the interface.
  • The vpn id must match on every PE; the VFI name, the bridge domain and the service instance are local.
  • Full mesh and split horizon prevent loops in the core; with n PEs there are n·(n−1)/2 pseudowires.
  • The customer's OSPF sees the VPLS as a broadcast segment: DR, BDR and DROTHERs in 2WAY.
  • To troubleshoot: top-down, bottom-up or divide and conquer, depending on what you know about the problem.
  • Point-to-point, AToM; point-to-multipoint, VPLS; if the provider must route, L3VPN.

Official resources

Source and credits. Chapter written from the MPLS Masterclass that Jesús Espinoza recorded live in March 2021. Text drafted with AI assistance and reviewed; original diagrams by The House of Routing. Technical data and configuration were checked against official Cisco documentation and IETF RFCs.

Navigate