Friday, May 15, 2026

Complete MPLS VPLS Configuration Guide on Cisco CSR Routers | OSPF, LDP, VFI & EIGRP Lab

Complete MPLS VPLS Configuration Guide Using Cisco CSR Routers

Complete MPLS VPLS Configuration Guide Using Cisco CSR Routers

This complete educational tutorial explains how to configure MPLS VPLS using Cisco CSR routers in a service provider environment. We will configure OSPF, MPLS LDP, VPLS Virtual Forwarding Instances (VFI), Bridge Domains, VLAN encapsulation, and EIGRP routing across customer sites.

๐ŸŽฏ What You Will Learn

  • Understanding MPLS fundamentals
  • How Label Distribution Protocol works
  • OSPF in MPLS Core
  • VPLS architecture explained
  • Bridge Domains in MPLS
  • Virtual Forwarding Instances
  • Layer 2 VPN technologies
  • EIGRP over VPLS
  • PE and CE router roles
  • Verification and troubleshooting

1. MPLS Fundamentals

MPLS stands for Multiprotocol Label Switching.

MPLS is a forwarding technology that uses labels instead of traditional Layer 3 routing lookups.

Instead of routers examining destination IP addresses at every hop, MPLS routers use labels to forward packets quickly and efficiently.

MPLS Forwarding Formula

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

Where:

  • LFIB = Label Forwarding Information Base
  • Labels reduce routing complexity
  • Forwarding becomes faster

2. Understanding VPLS

VPLS stands for Virtual Private LAN Service.

VPLS allows geographically separated customer sites to behave as if they are connected to the same Ethernet switch.

This creates a Layer 2 VPN service across an MPLS provider backbone.

VPLS Switching Logic

$$ Remote\\ Site = Same\\ Broadcast\\ Domain $$

Meaning:

$$ MAC\\ Frames \rightarrow MPLS\\ Backbone \rightarrow Remote\\ CE $$

3. OSPF in MPLS Core

OSPF is used as the Interior Gateway Protocol inside the provider backbone.

OSPF distributes loopback and core interface reachability between all Provider routers.

Shortest Path Formula

$$ SPF = Min(Cost) $$

OSPF uses Dijkstra’s Shortest Path First algorithm.

4. MPLS LDP Explained

LDP stands for Label Distribution Protocol.

LDP distributes MPLS labels between routers.

Every MPLS router advertises labels for reachable prefixes.

Label Mapping Formula

$$ FEC \rightarrow Label $$

Where:

  • FEC = Forwarding Equivalence Class
  • Each prefix receives a label

5. Network Topology


                 MPLS CORE

           CSR1 -------- CSR2
             \\           /
              \\         /
                \\     /
                  CSR3

         |         |         |

         R4        R5        R6

In this topology:

  • CSR1, CSR2, CSR3 are Provider Edge/Core routers
  • R4, R5, R6 are Customer Edge routers
  • OSPF runs in provider core
  • EIGRP runs between customer routers
  • VPLS extends Layer 2 connectivity

6. Task 1 - Configure MPLS Core Routers

We first configure the Service Provider core routers.

This includes:

  • IP addressing
  • OSPF routing
  • MPLS LDP
  • Loopback interfaces

Why Loopbacks Matter

Loopback interfaces provide stable MPLS LDP router IDs.

LDP Stability Formula

$$ Stable\\ RouterID = Loopback\\ Interface $$

Because:

$$ Loopback\\ Interfaces \neq Physical\\ Link\\ Failure $$

CSR1 Configuration

Code Example

mpls ldp router-id Loopback10

This command ensures stable LDP identification.


CSR1

interface Gig1
 ip address 192.1.12.1 255.255.255.0
 mpls ip
 no shut
!

interface Gig2
 ip address 192.1.13.1 255.255.255.0
 mpls ip
 no shut
!

interface Loopback10
 ip address 1.1.1.1 255.255.255.255
!

mpls ldp router-id Loopback10
!

router ospf 1
 router-id 0.0.0.1
 network 192.1.12.0 0.0.0.255 area 0
 network 192.1.13.0 0.0.0.255 area 0
 network 1.0.0.0 0.255.255.255 area 0

Detailed Explanation

The command:

mpls ip

enables MPLS forwarding on interfaces.

OSPF advertises all provider backbone networks.

Loopback10 becomes the LDP router ID.

CSR2 Configuration


CSR2

interface Gig1
 ip address 192.1.12.2 255.255.255.0
 mpls ip
 no shut
!

interface Gig2
 ip address 192.1.23.2 255.255.255.0
 mpls ip
 no shut
!

interface Loopback10
 ip address 2.2.2.2 255.255.255.255
!

mpls ldp router-id Loopback10
!

router ospf 1
 router-id 0.0.0.2
 network 192.1.12.0 0.0.0.255 area 0
 network 192.1.23.0 0.0.0.255 area 0
 network 2.0.0.0 0.255.255.255 area 0

CSR3 Configuration


CSR3

interface Gig1
 ip address 192.1.23.3 255.255.255.0
 mpls ip
 no shut
!

interface Gig2
 ip address 192.1.13.3 255.255.255.0
 mpls ip
 no shut
!

interface Loopback10
 ip address 3.3.3.3 255.255.255.255
!

mpls ldp router-id Loopback10
!

router ospf 1
 router-id 0.0.0.3
 network 192.1.13.0 0.0.0.255 area 0
 network 192.1.23.0 0.0.0.255 area 0
 network 3.0.0.0 0.255.255.255 area 0

7. Task 2 - Configure VPLS

Now we configure the Layer 2 VPN service using VPLS.

All customer sites become members of the same Ethernet segment.

Bridge Domain Formula

$$ Broadcast\\ Domain = Shared\\ Ethernet\\ Segment $$

All devices in Bridge Domain 100 belong to the same Layer 2 network.

Understanding VFI

VFI stands for Virtual Forwarding Instance.

The VFI maintains pseudowire relationships between PE routers.

Pseudowire Logic

$$ PE_1 \leftrightarrow PE_2 \leftrightarrow PE_3 $$

All PE routers form a full mesh pseudowire topology.

CSR1 VPLS Configuration

Code Example

bridge-domain 100

This command associates Ethernet frames with Bridge Domain 100.


CSR1

interface GigabitEthernet3
 no shut

 service instance 1 ethernet
  encapsulation dot1q 10
  bridge-domain 100
!

l2 vfi CUSTA manual
 vpn id 111
 bridge-domain 100

 neighbor 3.3.3.3 encapsulation mpls
 neighbor 2.2.2.2 encapsulation mpls

Configuration Explanation
  • VLAN 10 carries customer traffic
  • Bridge Domain 100 groups customer interfaces
  • VFI CUSTA builds MPLS pseudowires
  • Neighbors are remote PE routers

CSR2 VPLS Configuration


CSR2

interface GigabitEthernet3
 no shut

 service instance 1 ethernet
  encapsulation dot1q 10
  bridge-domain 100
!

l2 vfi CUSTA manual
 vpn id 111
 bridge-domain 100

 neighbor 1.1.1.1 encapsulation mpls
 neighbor 3.3.3.3 encapsulation mpls

CSR3 VPLS Configuration


CSR3

interface GigabitEthernet3
 no shut

 service instance 1 ethernet
  encapsulation dot1q 10
  bridge-domain 100
!

l2 vfi CUSTA manual
 vpn id 111
 bridge-domain 100

 neighbor 1.1.1.1 encapsulation mpls
 neighbor 2.2.2.2 encapsulation mpls

8. Task 3 - Configure Customer Edge Routers

Now we configure CE routers.

Customer traffic uses VLAN 10 subinterfaces.

EIGRP exchanges customer loopback routes.

EIGRP Metric Formula

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

EIGRP selects paths using bandwidth and delay.

R4 Configuration


R4

interface E0/0
 no shut
!

interface E0/0.1
 encapsulation dot1q 10
 ip address 10.10.10.4 255.255.255.0
 no shut
!

interface loopback0
 ip address 10.4.4.4 255.255.255.0
!

router eigrp 100
 network 10.0.0.0

R5 Configuration


R5

interface E0/0
 no shut
!

interface E0/0.1
 encapsulation dot1q 10
 ip address 10.10.10.5 255.255.255.0
 no shut
!

interface loopback0
 ip address 10.5.5.5 255.255.255.0
!

router eigrp 100
 network 10.0.0.0

R6 Configuration


R6

interface E0/0
 no shut
!

interface E0/0.1
 encapsulation dot1q 10
 ip address 10.10.10.6 255.255.255.0
 no shut
!

interface loopback0
 ip address 10.6.6.6 255.255.255.0
!

router eigrp 100
 network 10.0.0.0

Why EIGRP Works Across VPLS

VPLS extends Layer 2 connectivity.

From the CE perspective:

  • All routers appear locally connected
  • EIGRP multicast packets work normally
  • ARP operates normally
  • Broadcast traffic crosses MPLS pseudowires

9. Verification Commands

Verify OSPF Neighbors

show ip ospf neighbor

Verify MPLS LDP Neighbors

show mpls ldp neighbor

Verify MPLS Forwarding Table

show mpls forwarding-table

Verify VPLS

show l2vpn vfi

Verify EIGRP Neighbors

show ip eigrp neighbors
Expected CLI Output

CSR1#show mpls ldp neighbor

Peer LDP Ident: 2.2.2.2:0
 TCP connection: 2.2.2.2.646

Peer LDP Ident: 3.3.3.3:0
 TCP connection: 3.3.3.3.646

10. Troubleshooting MPLS VPLS

Problem Cause Solution
No MPLS labels LDP not enabled Enable mpls ip
No OSPF adjacency Incorrect network statement Verify OSPF config
VPLS down Neighbor mismatch Check VFI neighbors
No EIGRP routes VLAN mismatch Verify VLAN encapsulation
No MAC learning Bridge domain issue Verify BD membership

11. MPLS and VPLS Mathematics

Packet Encapsulation Formula

$$ Ethernet + MPLS\\ Label + IP + Payload $$

Pseudowire Scalability Formula

$$ PW = \frac{n(n-1)}{2} $$

Where:

  • \(n\) = number of PE routers

For:

$$ n=3 $$

Then:

$$ PW = \frac{3(3-1)}{2}=3 $$

Three pseudowires are required.

OSPF Cost Formula

$$ Cost = \frac{Reference\\ Bandwidth}{Interface\\ Bandwidth} $$

EIGRP Feasibility Condition

$$ Reported\\ Distance < Feasible\\ Distance $$

๐Ÿ’ก Key Takeaways

  • MPLS uses labels for forwarding
  • OSPF provides provider core reachability
  • LDP distributes MPLS labels
  • VPLS creates Layer 2 VPN services
  • Bridge Domains extend Ethernet networks
  • VFI builds MPLS pseudowires
  • EIGRP runs transparently across VPLS
  • Loopbacks provide stable router IDs

Final Conclusion

This complete MPLS VPLS tutorial demonstrated how service providers create scalable Layer 2 VPN services using MPLS and pseudowires.

We configured:

  • OSPF in the provider backbone
  • MPLS LDP label distribution
  • Bridge Domains
  • Virtual Forwarding Instances
  • VLAN encapsulation
  • EIGRP across customer sites
  • Layer 2 VPN connectivity

Understanding MPLS VPLS is critical for network engineers working in enterprise WANs, data centers, and service provider environments.

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