Cisco IOS XR MPLS L3VPN (PE Router)
Full MPLS L3VPN PE configuration for IOS XR: VRF definitions, LDP, MP-BGP VPNv4, and CE peering. The flagship SP service on ASR 9000 and NCS 5500.
What is it?
MPLS L3VPN (Layer 3 Virtual Private Network) is the dominant technology for providing IP VPN services over a service provider MPLS backbone. On IOS XR PE routers, each customer gets a dedicated VRF instance that completely separates their routing table. The PE router uses MP-BGP with the VPNv4 address family to exchange customer routes between PE routers, using Route Distinguishers to make routes unique and Route Targets to control VRF route import/export. LDP provides the label-switched path through the MPLS core, while the PE-CE link uses BGP, OSPF, or static routing. IOS XR is the primary platform for MPLS L3VPN in production SP networks worldwide.
When to use
- ·Service provider offering Layer 3 VPN connectivity to enterprise customers over an MPLS backbone
- ·Enterprises with multiple sites needing full-mesh or hub-spoke Layer 3 VPN
- ·When customers need traffic isolation with separate routing tables and potentially overlapping IP space
- ·Any network using Cisco ASR 9000 or NCS 5500 as PE routers in an MPLS core
- ·When per-customer QoS policies, separate routing tables, and VPN service SLAs are required
When NOT to use
- ·Simple campus or enterprise networks without MPLS core — use VRF-lite instead
- ·Networks without LDP or Segment Routing across all P routers — MPLS forwarding plane is required
- ·When SD-WAN is deployed as the overlay — SD-WAN replaces the PE-CE BGP model with tunnel-based connectivity
How it compares
Prerequisites
- →MPLS LDP or Segment Routing must be running on all P and PE routers with OSPF/IS-IS providing loopback reachability
- →iBGP full mesh or route reflectors must be configured for VPNv4 routes to propagate between all PEs
- →VRF and Route Target design must be planned before configuration — RT import/export determines customer connectivity
- →IOS XR requires commit after all changes — stage VRF, LDP, and BGP configuration as a single commit
Config Generator
Verification commands
show mpls ldp neighborVerify LDP sessions are Operational to all P and PE neighbors
ExpectedAll core neighbors show LDP state Oper (Operational)
show bgp vpnv4 unicast summaryVerify MP-BGP VPNv4 sessions to route reflectors are established
ExpectedAll RR neighbors show Established with non-zero VPNv4 prefixes
show bgp vrf <vrf-name> summaryVerify CE BGP session state for a specific customer VRF
ExpectedCE neighbor in Established state with prefixes received
show route vrf <vrf-name>Verify customer routes in the VRF routing table
ExpectedLocal CE routes and remote PE-learned routes marked B visible in the VRF
Debug commands
show mpls forwardingVerify MPLS label forwarding table for VPN labels
WarningCheck that VPN label entries exist for remote PE loopbacks with correct outgoing labels
show bgp vrf <vrf-name> <prefix>Show detailed BGP path for a specific VPN prefix including RT and label
WarningVerify RT import matches, next-hop is reachable, and label is assigned
Common mistakes & fixes
Further learning
Recommended books to go deeper on this topic.
MPLS Fundamentals
Luc De Ghein · Cisco Press · Label switching, LDP, RSVP, L3VPN VRF, PE-CE routing — the MPLS bible
Routing TCP/IP, Volume 2
Jeff Doyle · Cisco Press · BGP as PE-CE protocol in MPLS L3VPN environments