LAB 02 / 20

MPLS L3VPN — VRF CORP End-to-End

MPLS VPNVRF CORPMP-BGP VPNv4PE-CE OSPF

Active Nodes

02 MPLS VPN CORP MPLS VPN CORP sites — Active: EDGE-1,EDGE-4,CE-CORP-1,CE-CORP-2 See master topology for full 20-router diagram Active Nodes: EDGE-1,EDGE-4,CE-CORP-1,CE-CORP-2 MPLS VPN CORP sites EDGE-1,EDGE-4,CE-CORP-1,CE-CORP-2 Refer to lab.html for complete step-by-step configuration and verification commands for each active router Active Zone Inactive (dimmed) Ioannis (John) Alexander Konstas

Active routers in this lab: EDGE-1, EDGE-4, CE-CORP-1, CE-CORP-2, CORE-1..4

Key Concepts

VRF Route Distinguisher and Route Target

The Route Distinguisher (RD) makes VPN prefixes globally unique in the BGP table: rd 65000:100 prepends 8 bytes to every IPv4 prefix before advertising to MP-BGP VPNv4 peers. The Route Target (RT) is an extended community that controls import/export policy — PE routers only import prefixes carrying a matching RT. In a simple hub-and-spoke VPN, all PE routers share the same RT (65000:100), giving all sites full mesh connectivity.

PE-CE OSPF Redistribution

CE routers run OSPF process 10 toward the PE. The PE redistributes CE OSPF routes into BGP VPNv4 (with redistribute ospf 10 subnets), and redistributes received VPNv4 routes back into OSPF for the CE (redistribute bgp 65000 subnets). The PE uses a separate OSPF process per VRF to maintain isolation between customer routing domains. Without the subnets keyword, only classful networks would be redistributed.

AS Override and Allow-AS-In

When two CE sites belong to the same AS (65500), the PE-CE BGP session would normally reject routes containing the CE AS in the AS-path (loop prevention). The as-override command on the PE replaces the customer AS with the PE AS before sending, breaking the loop. Alternatively, allowas-in 1 on the CE tells it to accept routes containing its own AS once — both mechanisms solve the same problem, but from different ends of the PE-CE session.

Critical Configuration — EDGE-1 PE

EDGE-1PE Router · VRF CORP · OSPF-to-BGP redistribution10.255.2.1
ip vrf CORP
 rd 65000:100
 route-target export 65000:100
 route-target import 65000:100

interface GigabitEthernet0/2
 ip vrf forwarding CORP
 ip address 10.1.100.0 255.255.255.254

router ospf 10 vrf CORP
 router-id 10.255.2.1
 network 10.1.100.0 0.0.0.1 area 100
 redistribute bgp 65000 subnets route-map OSPF-TO-CE

router bgp 65000
 address-family ipv4 vrf CORP
  redistribute connected
  redistribute ospf 10 match internal external
  neighbor 10.1.100.1 remote-as 65500
  neighbor 10.1.100.1 activate
  neighbor 10.1.100.1 as-override
 exit-address-family

Verification

show ip bgp vpnv4 all
Expected: VPNv4 table shows prefixes from both CE sites with RD 65000:100. Check "Route Distinguisher", "Next Hop" (PE loopback via MPLS), and "Label" columns.
show ip route vrf CORP
Expected: Routes from remote CE site (192.168.200.0/24) appear via BGP (B) with next-hop pointing to remote PE loopback.
ping vrf CORP 192.168.200.1 source 192.168.100.1
Expected: 5/5 success. Traffic traverses MPLS LSP transparently — CE-to-CE ping works end-to-end.
show mpls forwarding-table vrf CORP
Expected: VRF CORP entries in LFIB with inner (VPN) and outer (transport) labels visible.

Research and direction by Ioannis (John) Konstas; compiled and finalized with AI assistance.

Initial Configs — Load These First