MPLS Layer 3 VPNs (VRF, MP-BGP, Route Targets)
What this domain tests
MPLS Layer 3 VPNs tests the VRF, route distinguisher, route target, and MP-BGP VPNv4 model. You need to explain how overlapping customer prefixes remain separate and how a VPN label identifies the egress VRF.
Core rules
- A VRF is a per-customer routing and forwarding table on a PE. It has its own interfaces, RIB, and FIB.
- The route distinguisher (RD) is prepended to a customer IPv4 prefix to make an MP-BGP VPNv4 route unique. The RD does not select which VRF imports the route.
- Route targets (RTs) are extended communities used for import and export policy. A PE exports a route with one or more RTs and imports routes whose RT matches the VRF import list.
- MP-BGP carries VPNv4/VPNv6 routes with the RD, RT, next hop, and VPN label. The ingress PE pushes the VPN label and an outer transport label; the egress PE uses the VPN label to choose the VRF.
Worked example
Two customers both use 10.0.0.0/24. PE1 exports customer A as RD 65000:1, RT 65000:100, and customer B as RD 65000:2, RT 65000:200. PE2's VRF-A imports RT 65000:100 and VRF-B imports RT 65000:200. Both VPNv4 routes can coexist because the RDs differ. When PE1 sends A traffic, it pushes the VPN label learned for RD 65000:1 and then the LSP label toward PE2. PE2 matches the VPN label to VRF-A.
Traps
RD is not RT; RT is not a route metric. A route reflector can reflect VPNv4 routes without being in the forwarding path. Do not forget that the VPN label is inner and the transport label is outer.