From point A to point B
Point A: you can already build an MPLS core with OSPF and LDP and carry a customer's routes with an L3VPN. Point B: you join two sites as if a cable connected them, even with a routed core in between, and you can read every label that makes that cable possible in the capture.
Day 2 of the masterclass, the 2nd MPLS-VPLS Marathon, goes down one layer. Before configuring anything, Jesús clears up a common idea: a VPN doesn't have to be encrypted. A VLAN or QinQ segments traffic without encrypting anything, and an MPLS VPN doesn't encrypt either. Encryption comes in when we talk about IPsec or SSL.
- The two paths of MPLS L2VPN: point-to-point VPWS and point-to-multipoint VPLS.
- The core that holds everything up: IGP + LDP, plus targeted LDP between the PEs.
- AToM in port mode: one
xconnectand one VC ID to join two routers in eBGP. - The two pseudowire labels, in the capture and in the show commands.
- AToM in VLAN mode, where the VLANs at each end don't have to match.
- Verification with
show mpls l2transport, and interworking.
Layer 2 VPN: point-to-point or point-to-multipoint
MPLS L2VPN has two paths. The first is VPWS (Virtual Private Wire Service): a point-to-point virtual circuit between two PEs. It's called a pseudowire because it isn't a physical cable, although the customer experiences it as one. The second is VPLS (Virtual Private LAN Service): a point-to-multipoint service that works like a switch inside the core. VPLS is the topic of chapter 8.
At Cisco, the pseudowire is called AToM (Any Transport over MPLS). The name sums up what it does: it takes Ethernet, Frame Relay, ATM or PPP traffic from the customer, encapsulates it and delivers it at the other end. Today almost everything is Ethernet, so the service you'll see most is Ethernet over MPLS (EoMPLS).
What does a provider use it for? The class brings up several real cases:
- An eBGP session between a customer in Caracas and its transit provider in Spain, carried by a carrier.
- A trunk between two switches at different sites.
- A WISP that extends its network to an antenna in another city.
- A central firewall whose LAN interface receives traffic from remote sites.
The limit is clear: each pseudowire joins only two ends. To connect a third site you need another circuit, and one more for every new pair. That's why VPWS doesn't scale when the customer has many branches. That's where VPLS comes in.
The core: IGP + LDP
Every MPLS service rests on two pieces: an IGP and LDP. The IGP (OSPF, process 1, area 0) provides reachability between loopbacks. LDP discovers neighbors, forms adjacencies and advertises labels. LDP doesn't route: like BGP, it depends on the IGP. If the IGP has gaps, so will LDP, and no service will work.
The topology is the one from Day 1: PE-1 (1.1.1.1, labels 100-199), P1 (2.2.2.2, 200-299), P2 (3.3.3.3, 300-399) and PE-2 (4.4.4.4, 400-499), with /30 transit links. Setting a range per router is a teaching aid: if you see label 303, you know P2 assigned it. Jesús calls it hard coding: configure the device the way you expect it to work, not the way you think it will work by default.
! PE-1: label range, LDP and loopback in OSPF (only the core interface runs MPLS)
PE-1(config)# mpls label range 100 199
PE-1(config)# mpls label protocol ldp
PE-1(config)# interface Loopback0
PE-1(config-if)# ip address 1.1.1.1 255.255.255.255
PE-1(config-if)# ip ospf network point-to-point
PE-1(config-if)# ip ospf 1 area 0
PE-1(config-if)# interface GigabitEthernet3
PE-1(config-if)# ip address 10.10.10.1 255.255.255.252
PE-1(config-if)# ip ospf 1 area 0
PE-1(config-if)# mpls ip
PE-1(config-if)# router ospf 1
PE-1(config-router)# router-id 0.0.0.1
! P1: OSPF on every interface and LDP enabled from the OSPF process
P1(config)# mpls label range 200 299
P1(config)# mpls label protocol ldp
P1(config)# router ospf 1
P1(config-router)# router-id 0.0.0.2
P1(config-router)# network 0.0.0.0 255.255.255.255 area 0
P1(config-router)# mpls ldp autoconfig area 0
Three details from the class that save you time:
- MPLS and LDP are enabled only towards the inside of the core. Customer-facing interfaces don't get
mpls ipand, in L2VPN, they don't get an IP address either. - The loopback must be in OSPF. Live, P1 didn't receive 1.1.1.1 until
ip ospf 1 area 0was added on PE-1's Loopback0. mpls ldp autoconfig area 0enables LDP on every OSPF interface in the area.
On top of that core, the PEs open an extra LDP session between their loopbacks: targeted LDP. The two PEs aren't directly connected neighbors, so discovery is directed (extended discovery, in RFC 5036). The pseudowire label travels over that session. That's why the PE loopback must be reachable, and why LDP should use it as its transport address.
AToM in port mode: one command, one cable
Exercise 1 puts the provider in the role of a carrier. CE-B1 belongs to AS 10 (loopback 10.10.10.10) and CE-B2 to AS 20 (loopback 20.20.20.20). Both use the 172.16.1.0/24 segment, with .1 and .2. The /24 is deliberate: we're going to extend a single broadcast domain from one end to the other.
CE-B1(config)# interface Loopback0
CE-B1(config-if)# ip address 10.10.10.10 255.255.255.255
CE-B1(config-if)# 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 bgp 10
CE-B1(config-router)# bgp router-id 10.10.10.10
CE-B1(config-router)# network 10.10.10.10 mask 255.255.255.255
CE-B1(config-router)# neighbor 172.16.1.2 remote-as 20
CE-B2(config)# router bgp 20
CE-B2(config-router)# network 20.20.20.20 mask 255.255.255.255
CE-B2(config-router)# neighbor 172.16.1.1 remote-as 10
Without a circuit, the eBGP session cycles through Idle, Active and Connect. Now the PE steps in. In port mode, the pseudowire takes everything that arrives on the customer interface. One line on that interface is enough, and the interface has no IP:
! Port mode: the xconnect sits on the physical interface (no IP address)
PE-1(config)# interface GigabitEthernet2
PE-1(config-if)# xconnect 4.4.4.4 100 encapsulation mpls
PE-2(config)# interface GigabitEthernet2
PE-2(config-if)# xconnect 1.1.1.1 100 encapsulation mpls
Every part of the command matters:
- Peer: the remote PE's loopback (4.4.4.4 from PE-1, 1.1.1.1 from PE-2), not a physical interface. It's the destination of the targeted LDP session.
- VC ID: the virtual circuit ID, here 100, must be identical on both PEs. If it doesn't match, the pseudowire won't come up. It's a 32-bit value: more than 4 billion possible circuits, far beyond the 4,094 VLANs of a switch.
- encapsulation mpls: tells the router the circuit runs over MPLS.
Once the second end is configured, targeted LDP comes up and, a few seconds later, so does the BGP session. Look at what just happened. There are three routed /30 segments in the middle, and still CE-B1 and CE-B2 share one broadcast domain. A router normally separates broadcast domains; here the routed core does the opposite. For BGP, the next hop 172.16.1.1 is “right next door”, even with 4 hops or 200 routers in between.
Cisco also documents a template form: you define a pseudowire-class with encapsulation mpls and call it from the xconnect. It helps when many circuits share parameters, such as interworking.
! Equivalent form with a template (Cisco documentation, not used in the class)
PE-1(config)# pseudowire-class PW-MPLS
PE-1(config-pw-class)# encapsulation mpls
PE-1(config-pw-class)# interface GigabitEthernet2
PE-1(config-if)# xconnect 4.4.4.4 100 pw-class PW-MPLS
Transport and pseudowire: two labels
The pseudowire between PE-1 and PE-2: the transport label changes at every hop; the pseudowire label reaches the egress PE untouched. Diagram: The House of Routing.
With Wireshark on the link between P1 and P2, the class shows the label stack. Every customer frame carries two labels:
- Outer label (transport): carries the packet along the LSP to the remote PE's loopback. Towards PE-1 you see 200, which P1 assigned to 1.1.1.1. Towards PE-2 you see 303, which P2 assigned to 4.4.4.4. It changes at every hop (swap) and the penultimate hop removes it (PHP).
- Inner label (pseudowire or VC): identifies the circuit on the egress PE. Towards PE-1 it's 105; towards PE-2, 405. Each PE assigns its own and advertises it to the other over targeted LDP.
Under the two labels sits the customer's complete Ethernet frame and, inside it, the IP packet. That's why it's called Ethernet over MPLS. You confirm it with show xconnect peer 4.4.4.4 vcid 100 detail: on PE-1 the local label is 105 and the remote one is 405; on PE-2 it's the other way around.
What about the P routers? On P2, show ip route 20.20.20.20 returns nothing and show xconnect all is empty. The core knows neither the customer networks nor the circuits: it only knows how to reach the PE loopbacks. That's a core free of customer information.
AToM in VLAN mode
Port mode hands the whole interface to a single service. VLAN mode is finer-grained: the PE takes only the 802.1Q traffic of one subinterface. It's the same idea as router on a stick: one subinterface per VLAN over a trunk link.
The customers change first. With default interface you clean up the physical interface, and the IP moves to a subinterface with encapsulation dot1q. Without that line, IOS won't let you set the IP.
CE-B1(config)# default interface GigabitEthernet0/0
CE-B1(config)# interface GigabitEthernet0/0.2222
CE-B1(config-subif)# encapsulation dot1q 2222
CE-B1(config-subif)# ip address 172.16.1.1 255.255.255.0
CE-B2(config)# default interface GigabitEthernet0/0
CE-B2(config)# interface GigabitEthernet0/0.3333
CE-B2(config-subif)# encapsulation dot1q 3333
CE-B2(config-subif)# ip address 172.16.1.2 255.255.255.0
The same happens on the PEs: you clean up the physical interface and the xconnect moves to the subinterface. The VC ID is still 100 and the circuit encapsulation is still mpls, not dot1q.
! VLAN mode: same VC ID 100, different VLAN on each side
PE-1(config)# default interface GigabitEthernet2
PE-1(config)# interface GigabitEthernet2.2222
PE-1(config-subif)# encapsulation dot1q 2222
PE-1(config-subif)# xconnect 4.4.4.4 100 encapsulation mpls
PE-2(config)# default interface GigabitEthernet2
PE-2(config)# interface GigabitEthernet2.3333
PE-2(config-subif)# encapsulation dot1q 3333
PE-2(config-subif)# xconnect 1.1.1.1 100 encapsulation mpls
Port mode versus VLAN mode: the same VC ID 100 joins VLAN 2222 on one side with VLAN 3333 on the other. Diagram: The House of Routing.
The key detail: the VLANs don't have to match. CE-B1 uses 2222 and CE-B2 uses 3333, and the ping from 10.10.10.10 to 20.20.20.20 works. What joins the two segments is the VC ID. The VLAN is locally significant on each PE: RFC 4448 lets the egress PE rewrite the tag. To avoid confusion, number the subinterface like its VLAN: Gi2.2222 with dot1q 2222.
Verifying the pseudowire
L2VPN commands are spread across show xconnect, show mpls l2transport and show l2vpn. Jesús admits it in the class: there are several ways to see the same thing, and mastering them takes practice. These are the ones we used:
PE-1# show xconnect all
PE-1# show xconnect peer 4.4.4.4 vcid 100 detail
PE-1# show mpls l2transport binding
PE-1# show mpls l2transport summary
PE-1# show mpls l2transport vc 100
PE-1# show mpls l2transport vc detail
PE-1# show mpls l2transport hw-capability interface GigabitEthernet2
CE-B1# ping 20.20.20.20 source 10.10.10.10 repeat 100
show xconnect all: the circuits, the peer, the VC ID and the state.show mpls l2transport binding: destination, VC ID, local and remote labels, and MTU.show mpls l2transport summary: how many circuits there are per destination and how many are up.show mpls l2transport vc detail: the subinterface and VLAN, the state, the labels and the signaling protocol. That's where the targeted hello towards the remote PE shows up.show mpls l2transport hw-capability interface GigabitEthernet2: the transport types the interface supports.
If the circuit doesn't come up, walk the chain in order. Do the loopbacks ping each other? Is there an LDP session with the remote PE? Do the VC ID and the MTU match? Does the customer send the tag the subinterface expects?
Interworking and the three pieces
Interworking means joining different circuit types at each end: Frame Relay, ATM, PPP or HDLC on one side and Ethernet on the other. On Cisco you configure it in the pseudowire-class with interworking ethernet, which carries Ethernet frames, or interworking ip, which carries IP packets (routed interworking).
We close with the idea Jesús asks you to keep. Every MPLS model needs three pieces:
- An IGP in the core, with loopbacks.
- LDP on top of that IGP.
- The service between PEs: L3VPN, VPWS (per port or per VLAN) or VPLS.
The first two don't change; the third depends on the customer. In chapter 8, that piece is VPLS.
Class videos
These three videos open 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.
- Day 2 · Part 1MPLS L2VPN from scratch: VPWS, VPLS and the coreWatch video
- Day 2 · Part 2Pseudowire with xconnect: AToM in port modeWatch video
- Day 2 · Part 3VPWS per VLAN: a pseudowire with 802.1QWatch video
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 xconnect 4.4.4.4 100 on PE-1 and xconnect 1.1.1.1 101 on PE-2. What happens?
Answer. The pseudowire doesn't come up. The VC ID must be identical on both PEs; with 100 and 101, each end expects a different circuit.
2. Why is the xconnect peer the remote PE's loopback and not a physical interface?
Answer. Because the pseudowire is signaled with a targeted LDP session between loopbacks. The loopback is in OSPF, doesn't depend on a single link, and LDP uses it as its transport address.
3. In the capture you see labels 303 and 405. Which one is the transport label, and who assigned each one?
Answer. 303 is the outer transport label: P2 assigned it for 4.4.4.4. 405 is the inner pseudowire label: PE-2 assigned it for VC 100 and advertised it to PE-1 over targeted LDP.
4. In VLAN mode, CE-B1 uses VLAN 2222 and CE-B2 uses 3333. Does the circuit work?
Answer. Yes. The VLAN is locally significant on each PE; what joins the ends is VC ID 100. In the class, the end-to-end ping worked with different VLANs.
5. Does P2 know the customer network 20.20.20.20?
Answer. No. P routers only switch the transport label towards the PE loopbacks. They see no customer routes and no xconnect: the core stays free of customer information.
Key takeaways
- VPWS is point-to-point and VPLS is point-to-multipoint. An MPLS VPN segments traffic without encrypting it.
- Every MPLS service needs IGP + LDP in the core; the PEs add targeted LDP between their loopbacks.
- A pseudowire is one line:
xconnect, the remote PE's loopback, an identical VC ID andencapsulation mpls. - Each frame carries two labels: the outer transport label, which changes at every hop, and the inner pseudowire label, assigned by the egress PE.
- In VLAN mode the xconnect goes on the dot1q subinterface, and the VLANs at each end can differ.
- Verify with
show xconnectandshow mpls l2transport: VC ID, labels, MTU and targeted hello.
Official resources
- Understand MPLS L2VPN Pseudowire (Cisco)cisco.com
- Any Transport over MPLS · MPLS Layer 2 VPNs Configuration Guide (Cisco)cisco.com
- AToM: L2VPN Interworking (Cisco)cisco.com
- RFC 8077: pseudowire setup with LDPrfc-editor.org
- RFC 4448: Ethernet over MPLSrfc-editor.org
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.