Understanding MPLS Layer 3 VPN Architecture

This post breaks down MPLS L3VPN architecture for experienced network engineers, covering the roles of PE, CE, and P routers, the two-label stack, VRF design, and MP-BGP as the VPN control plane. It includes real CLI examples for configuration and verification, along with RT/RD design consideration

Understanding MPLS Layer 3 VPN Architecture

MPLS L3VPN Architecture: How the Pieces Fit Together

MPLS Layer 3 VPNs are the backbone of most enterprise WAN and service provider designs. If you're working toward CCNP ENARSI or stepping into an SP environment, understanding how traffic actually flows through an MPLS L3VPN architecture is non-negotiable. This isn't about memorizing acronyms; it's about knowing which router does what, why it matters, and how to verify it when something breaks.

The Three Router Roles

MPLS L3VPN architecture is built around three distinct router roles. Every device in the network falls into one of these categories, and their responsibilities don't overlap.

Customer Edge (CE)

The CE router sits at the customer premises and connects directly to the service provider. It has no awareness of MPLS. From the CE's perspective, it's simply running a routing protocol (or static routes) with its upstream neighbor. The CE does not impose or pop labels. It just advertises customer prefixes and receives reachability information back.

Provider Edge (PE)

The PE router is where the complexity lives. PE routers connect directly to CE routers and are responsible for:

  • Maintaining per-VRF routing tables using VRF (Virtual Routing and Forwarding) instances
  • Running MP-BGP to exchange VPNv4 routes with remote PE routers
  • Imposing a two-label MPLS stack when forwarding VPN traffic into the core
  • Stripping the VPN label and forwarding traffic to the correct CE on egress

The PE router is the boundary between the MPLS core and the customer environment. It's the most configuration-intensive device in any MPLS L3VPN design.

Provider (P)

P routers form the core of the MPLS backbone. They forward traffic purely based on labels using Label Switched Paths (LSPs). P routers have no knowledge of VRFs, customer routes, or VPNv4 prefixes. They simply swap labels and forward. This separation keeps the core fast and the routing table lean.

The Two-Label Stack Explained

When a PE router imposes labels on a VPN packet, it pushes two labels onto the stack. Understanding this is critical for both exam questions and real-world troubleshooting.

  • Outer label (transport label): Assigned by LDP or RSVP-TE. This label carries the packet across the P router infrastructure toward the remote PE. P routers read this label and perform label swap operations.
  • Inner label (VPN label): Assigned by the remote PE via MP-BGP. When the packet arrives at the egress PE, this label tells the PE which VRF the traffic belongs to and where to forward it next.

Penultimate Hop Popping (PHP) is relevant here. The last P router before the egress PE typically pops the outer transport label, delivering the packet with only the VPN label remaining. This saves the egress PE one label lookup operation.

VRFs and Route Distinguishers

Each customer VPN is isolated on the PE using a VRF. The VRF maintains a completely separate routing and forwarding table, which is what allows multiple customers to use overlapping IP address space without conflict.

Route Distinguishers (RDs) make VPN prefixes globally unique within MP-BGP. An RD is prepended to each customer prefix before it's advertised as a VPNv4 route. The format is typically ASN:nn or IP:nn. RDs don't control which routes are imported or exported; they simply ensure uniqueness.

Route Targets (RTs) are the mechanism that actually controls VPN topology. RTs are BGP extended communities attached to VPNv4 routes. On each VRF, you define an export RT (applied to outgoing routes) and an import RT (filters which incoming routes are accepted). This is how hub-and-spoke, full-mesh, and extranet VPN designs are all implemented with the same underlying infrastructure.

ip vrf CUSTOMER_A
 rd 65000:100
 route-target export 65000:100
 route-target import 65000:100
!

MP-BGP as the VPN Control Plane

MP-BGP (Multiprotocol BGP) carries VPNv4 address family routes between PE routers. Standard IPv4 BGP cannot carry the RD-prefixed VPNv4 NLRI, which is why the AFI/SAFI extension is required. PE-to-PE MP-BGP sessions are typically iBGP sessions, either directly between PEs or through a Route Reflector (RR) to scale the design.

A common production pattern is to place Route Reflectors on dedicated devices (or on P routers in smaller deployments) to avoid full-mesh iBGP between all PEs. Every PE peers with the RR, which reflects VPNv4 routes to other PEs.

router bgp 65000
 neighbor 10.0.0.1 remote-as 65000
 neighbor 10.0.0.1 update-source Loopback0
 !
 address-family vpnv4
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 send-community extended
 exit-address-family
!

PE-CE Routing Protocols

The routing protocol between PE and CE operates within the VRF context. Common options include:

  • eBGP: Clean separation, scales well, and is the preferred method in most SP designs.
  • OSPF: Requires sham links in certain designs to prevent backdoor routing issues.
  • EIGRP: Supported but requires careful redistribution to preserve metrics.
  • Static routes: Used for simple or single-homed sites.

Regardless of which protocol runs between PE and CE, routes learned from the CE are redistributed into MP-BGP as VPNv4 prefixes and advertised to remote PEs.

Verifying MPLS L3VPN Operation

When troubleshooting an MPLS L3VPN, follow the control plane before chasing the data plane. These commands are your starting point on a PE router:

show ip vrf
show ip route vrf CUSTOMER_A
show bgp vpnv4 unicast all summary
show bgp vpnv4 unicast vrf CUSTOMER_A
show mpls forwarding-table
show mpls ldp bindings

If a prefix is missing from the VRF routing table, check MP-BGP first. Verify the VPNv4 session is established, the correct RTs are configured on both ends, and that the remote PE is actually advertising the prefix. If BGP looks healthy but traffic isn't flowing, move to the MPLS data plane and verify label bindings and LSP continuity across the P routers.

VPN Design Considerations

Full-mesh VPN design is the default when import and export RTs match across all sites. For hub-and-spoke, you assign unique RTs to hub and spoke VRFs so that spoke-to-spoke traffic is forced through the hub PE. Extranet designs use shared RTs across otherwise separate VRFs to allow selective route leaking between customers or between a customer and shared services.

Scalability in large deployments comes down to Route Reflector hierarchy, RD/RT numbering strategy, and keeping the P router core free of per-VPN state. The MPLS L3VPN architecture is specifically designed so that the core scales independently of the number of VPNs or customer routes it carries.

What's Next

Now that you have a solid understanding of the MPLS L3VPN architecture and how PE, CE, and P routers interact, the next step is getting into the configuration details: building VRFs, establishing MP-BGP sessions, and validating end-to-end VPN connectivity in a lab environment. The Cisco Press CCNP Enterprise Advanced Routing ENARSI 300-410 Official Cert Guide by Raymond Lacoste covers the configuration specifics in depth and is the recommended study resource for exam-level preparation.

๐Ÿ”ง
When you're deep in MPLS troubleshooting and cycling through show commands across multiple PE and P routers, SecureCRT's session management and scripting capabilities make it much easier to capture and compare output across devices without losing your place. SecureCRT, PRTG Network Monitor and Batfish.

Tools and resources for this topic