Active Nodes
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
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