Friday, May 15, 2026

Complete MPLS Layer 2 VPN Ethernet over MPLS (EoMPLS) Configuration Guide with OSPF, LDP and xconnect

Complete MPLS Layer 2 VPN Ethernet over MPLS Configuration Guide

Complete MPLS Layer 2 VPN Ethernet over MPLS Configuration Guide

This tutorial explains how to configure MPLS Layer 2 VPN Ethernet over MPLS using Cisco IOS routers.

We will configure:

  • OSPF in the Service Provider core
  • MPLS with LDP
  • Ethernet over MPLS
  • xconnect pseudowires
  • VLAN-based transport
  • EIGRP across the MPLS cloud
  • PE to CE connectivity
  • Label switched paths
  • Layer 2 VPN transport

๐ŸŽฏ What You Will Learn

  • How MPLS Layer 2 VPN works
  • Difference between L2VPN and L3VPN
  • How OSPF builds SP core routing
  • How LDP distributes labels
  • How pseudowires work
  • How Ethernet frames travel through MPLS
  • How xconnect builds EoMPLS circuits
  • How EIGRP neighbors form across MPLS
  • Verification and troubleshooting

1. MPLS Layer 2 VPN Introduction

Ethernet over MPLS allows service providers to transport Layer 2 Ethernet frames across an MPLS backbone.

This creates a virtual Ethernet circuit between customer sites.

To the customer routers, it appears as if they are directly connected through a Layer 2 switch.

Basic MPLS Forwarding Formula

$$ Forwarding = Label\\ Lookup + LFIB\\ Decision $$

Where:

  • LFIB = Label Forwarding Information Base
  • MPLS labels replace long routing lookups
  • Packets are switched using labels

2. Network Topology


           MPLS SERVICE PROVIDER CLOUD

      R4 -------- R1 ------- R2 ------- R3 -------- R5
       |            |                    |           |
       |            |                    |           |
    Customer      Provider             Provider    Customer
       CE            PE                   PE          CE


VLAN 45 transported using Ethernet over MPLS
PVC ID = 145

Router roles:

Router Role
R1 Provider Edge
R2 Provider Core
R3 Provider Edge
R4 Customer Edge
R5 Customer Edge

3. Task 1 - Configure OSPF Between SP Routers

OSPF is used as the Interior Gateway Protocol inside the Service Provider backbone.

Only Provider routers participate in OSPF.

CE-PE links are excluded because customer routing should remain separate.

Code Example

router ospf 1
 router-id 1.1.1.1

The Router-ID uniquely identifies the OSPF router.


R1

router ospf 1
 router-id 1.1.1.1
 network 1.1.1.1 0.0.0.0 area 0
 network 192.1.12.1 0.0.0.0 area 0


R2

router ospf 1
 router-id 2.2.2.2
 network 2.2.2.2 0.0.0.0 area 0
 network 192.1.12.2 0.0.0.0 area 0
 network 192.1.23.2 0.0.0.0 area 0


R3

router ospf 1
 router-id 3.3.3.3
 network 3.3.3.3 0.0.0.0 area 0
 network 192.1.23.3 0.0.0.0 area 0

Detailed OSPF Explanation

OSPF creates full IP reachability between all Provider routers.

MPLS labels require IGP reachability before LDP neighbors can exchange labels.

Loopback interfaces are advertised because:

  • Loopbacks are stable
  • Loopbacks never go down unless router fails
  • Loopbacks become transport endpoints
  • LDP Router-ID uses loopbacks

OSPF SPF Calculation

$$ Shortest\\ Path = \min \sum Cost $$

OSPF uses Dijkstra SPF algorithm.

The router selects the path with minimum cumulative cost.

4. Task 2 - Configure MPLS with LDP

Now we enable MPLS on all Provider core links.

LDP distributes labels between MPLS routers.

Code Example

mpls ldp router-id Loopback0
mpls ip

The loopback interface becomes the stable LDP identifier.


R1

mpls ldp router-id Loopback0

interface e0/0
 mpls ip


R2

mpls ldp router-id Loopback0

interface e0/0
 mpls ip

interface e0/1
 mpls ip


R3

mpls ldp router-id Loopback0

interface e0/0
 mpls ip

How LDP Works

LDP stands for Label Distribution Protocol.

LDP exchanges MPLS labels between neighboring routers.

Each router advertises:

  • Network prefix
  • Associated MPLS label

Example:

10.0.0.0/24 = Label 25

Other routers install this mapping inside LFIB.

MPLS Label Formula

$$ Packet = Label + Payload $$

When entering MPLS:

$$ IP\\ Packet \rightarrow MPLS\\ Label + IP\\ Packet $$

Label Stack Concept

$$ Top\\ Label + Bottom\\ Label + Payload $$

In MPLS VPN:

  • Outer label transports packet
  • Inner label identifies VPN service

5. Understanding Ethernet over MPLS

Ethernet over MPLS transports Layer 2 Ethernet frames across MPLS networks.

This is also called:

  • EoMPLS
  • Pseudowire
  • Layer 2 VPN
  • xconnect transport

๐Ÿ’ก Key EoMPLS Concept

The Provider network does NOT participate in customer routing.

The Provider only transports Ethernet frames transparently.

Encapsulation Formula

$$ Ethernet\\ Frame \rightarrow MPLS\\ Labels \rightarrow Transport $$

6. Task 3 - Configure CE Routers

Now we configure customer routers R4 and R5.

Both routers use VLAN 45.

EIGRP AS 45 runs between customer routers.

R4 Configuration


R4

interface loopback0
 ip address 10.4.4.4 255.255.255.0

interface e0/0
 no shutdown

interface e0/0.45
 encapsulation dot1q 45
 ip address 10.45.45.4 255.255.255.0

router eigrp 45
 network 10.0.0.0

R5 Configuration


R5

interface loopback0
 ip address 10.5.5.5 255.255.255.0

interface e0/0
 no shutdown

interface e0/0.45
 encapsulation dot1q 45
 ip address 10.45.45.5 255.255.255.0

router eigrp 45
 network 10.0.0.0

Subinterface Explanation

Subinterfaces allow multiple VLANs over a single physical interface.

The command:

encapsulation dot1q 45

tags Ethernet frames using VLAN 45.

EIGRP Explanation

EIGRP forms neighbor relationships across the Ethernet over MPLS pseudowire.

The MPLS cloud behaves like a transparent Layer 2 switch.

Customer routers do not see MPLS labels.

EIGRP Metric Formula

$$ Metric = 256 \times \left( \frac{10^7}{Bandwidth} + Delay \right) $$

EIGRP selects paths using bandwidth and delay calculations.

7. Task 4 - Configure PE Routers with xconnect

Now we create the Layer 2 pseudowire between PE routers.

PVC ID 145 identifies the virtual circuit.

R1 Configuration


R1

interface e0/1.45
 encapsulation dot1Q 45
 xconnect 3.3.3.3 145 encapsulation mpls

R3 Configuration


R3

interface e0/1.45
 encapsulation dot1Q 45
 xconnect 1.1.1.1 145 encapsulation mpls

xconnect Deep Explanation

xconnect creates a Layer 2 pseudowire tunnel between PE routers.

The syntax:

xconnect remote-ip vc-id encapsulation mpls

means:

  • remote-ip = remote PE router
  • vc-id = pseudowire identifier
  • encapsulation mpls = MPLS transport

Both PE routers must use the same VC-ID.

Pseudowire Mapping Formula

$$ VC\\ ID_{PE1} = VC\\ ID_{PE2} $$

If:

$$ 145 = 145 $$

Then pseudowire becomes operational.

8. Verification Commands

Verify OSPF

show ip ospf neighbor

Verify MPLS Interfaces

show mpls interfaces

Verify LDP Neighbors

show mpls ldp neighbor

Verify Labels

show mpls forwarding-table

Verify xconnect

show xconnect all

Verify EIGRP

show ip eigrp neighbors
Sample xconnect Output

R1#show xconnect all

Legend: XC ST = State

UP: local ready, remote ready

XC ST Segment 1 Segment 2
-------------------------------------------------
UP Se1/0:45 3.3.3.3 145

9. Packet Flow Explanation

Understanding packet flow is critical.

Step-by-Step Flow

  1. R4 sends Ethernet frame tagged with VLAN 45
  2. R1 receives Ethernet frame
  3. R1 encapsulates frame inside MPLS labels
  4. MPLS core switches packet using labels
  5. R3 removes MPLS labels
  6. R3 forwards Ethernet frame to R5
  7. R5 receives original Ethernet frame

Packet Encapsulation Process

$$ Ethernet\\ Frame \rightarrow MPLS\\ Label\\ Stack \rightarrow Core $$

Then:

$$ Core \rightarrow Remove\\ Labels \rightarrow Ethernet\\ Frame $$

10. Advanced MPLS Mathematics

Label Switching Time Reduction

$$ Traditional\\ Routing > MPLS\\ Label\\ Switching $$

MPLS reduces CPU processing time.

Transport Efficiency

$$ Efficiency = \frac{Payload}{Payload + Overhead} $$

MPLS introduces minimal overhead while improving scalability.

OSPF Convergence

$$ Convergence = Detection + SPF + FIB\\ Update $$

Bandwidth Utilization

$$ Utilization = \frac{Traffic}{Available\\ Bandwidth} \times 100 $$

11. Troubleshooting MPLS EoMPLS

Issue Possible Cause Fix
LDP neighbors down No IGP reachability Verify OSPF
xconnect down VC-ID mismatch Match VC-ID
No EIGRP neighbors Pseudowire down Verify xconnect state
No MPLS labels MPLS disabled Enable mpls ip
No connectivity VLAN mismatch Verify dot1Q tags

12. Best Practices

  • Always use loopbacks as LDP router IDs
  • Use stable IGP routing
  • Document VC-IDs carefully
  • Use consistent VLAN numbering
  • Verify MPLS forwarding table regularly
  • Monitor pseudowire status
  • Use QoS in production MPLS networks
  • Protect MPLS core using security filtering

๐Ÿ’ก Important Exam and Real-World Points

  • LDP requires IGP reachability
  • xconnect builds Layer 2 pseudowires
  • VC-ID must match on both PE routers
  • EoMPLS transports Ethernet frames transparently
  • Customers never see MPLS labels
  • MPLS core acts like a giant virtual switch

Final Conclusion

This complete MPLS Ethernet over MPLS tutorial demonstrated how to build a Layer 2 VPN using Cisco IOS routers.

We configured:

  • OSPF in the provider core
  • MPLS with LDP
  • Ethernet over MPLS pseudowires
  • xconnect virtual circuits
  • VLAN transport
  • EIGRP across the MPLS cloud
  • Provider Edge connectivity

Understanding MPLS Layer 2 VPN technologies is extremely important for service provider engineering, enterprise WAN design, and modern transport architectures.

No comments:

Post a Comment

Featured Post

How HMT Watches Lost the Time: A Deep Dive into Disruptive Innovation Blindness in Indian Manufacturing

The Rise and Fall of HMT Watches: A Story of Brand Dominance and Disruptive Innovation Blindness The Rise and Fal...

Popular Posts