A Layer 3 VPN (L3VPN) is a type of virtual private network that uses MPLS (Multiprotocol Label Switching) to securely route traffic between customer sites over a shared provider backbone. Instead of extending Layer 2 connections, it operates at the IP layer (Layer 3), providing routing and addressing capabilities for customer networks.
10.0.0.0/24. The RD ensures uniqueness:65000:1:10.0.0.0/24 (Customer A)65000:2:10.0.0.0/24 (Customer B)How Labels Work:
Customer Edge (CE) Routers:
Provider Edge (PE) Routers:
Provider (P) Routers:
Routing Flow:
Corporate WANs:
Service Provider Offerings:
Overlapping Address Spaces:
Traffic Isolation:
Scalability:
Traffic Engineering:
Security:
Flexibility:
Below is a basic configuration for setting up an MPLS Layer 3 VPN in Junos:
Create a VRF for a specific customer:
set routing-instances VPN1 instance-type vrf
Assign a unique RD for the customer:
set routing-instances VPN1 route-distinguisher 65000:1
Define the RT for importing/exporting routes:
set routing-instances VPN1 vrf-target target:65000:1
Associate customer-facing interfaces with the VRF:
set routing-instances VPN1 interface ge-0/0/1.0
Plan RDs and RTs Carefully:
Monitor VRF Usage:
Test in a Lab Environment:
Ensure MP-BGP Connectivity:
MPLS Layer 3 VPNs are an essential technology for securely connecting distributed networks over a shared backbone. Key concepts like VRF, RD, RT, and MPLS labels make it possible to isolate and route customer traffic efficiently. By understanding how these components work together, you can design and configure reliable VPN solutions.
In an MPLS Layer 3 VPN, routes between Provider Edge (PE) routers are exchanged using MP-BGP — an extension of BGP that supports multiple address families.
AFI (Address Family Identifier) = 1 → IPv4
SAFI (Subsequent Address Family Identifier) = 128 → MPLS-labeled VPN address
“PE routers use MP-BGP to advertise VPNv4 routes (AFI 1 / SAFI 128), which include the Route Distinguisher (RD) as part of the NLRI.”
This allows overlapping IPv4 prefixes from different VPNs to coexist without collision, because the RD is prepended to the prefix to ensure uniqueness.
In Juniper’s MPLS Layer 3 VPN, the PE-CE routing relationship can be established using a variety of protocols:
Static routes
RIP
OSPF
BGP
(Technically EIGRP can be redistributed, but not natively supported in Junos)
Each VRF on the PE router participates in routing with its corresponding CE router using one of these protocols. The best choice often depends on:
Network size
Design complexity
Policy requirements
“PE-CE protocol is flexible, but BGP is preferred for scalable multi-site designs.”
For example, BGP allows for granular route filtering, and OSPF supports dynamic learning with area constraints.
These two attributes are often confused but serve distinct roles:
| Element | Purpose | Applied in |
|---|---|---|
| RD | Makes VPNv4 prefixes globally unique | Part of NLRI, used in MP-BGP advertisement |
| RT | Controls route import/export between VRFs | Part of BGP extended community, used in policy logic |
“RD ensures route uniqueness across the MPLS backbone, while RT defines the routing policy — that is, who can import or export those routes.”
In Junos:
set routing-instances VPN1 route-distinguisher 65000:1
set routing-instances VPN1 vrf-target target:65000:1
MPLS Layer 3 VPNs are a classic example of decoupling control and data planes, which improves scalability and modularity.
Handled by MP-BGP:
Distributes VPNv4 routes and RT policies between PE routers.
Builds the VPN control topology.
Forwarding uses MPLS labels:
Transport label (for core reachability)
VPN label (for VRF lookup)
Labels are distributed via LDP or RSVP-TE.
This separation means routing information and actual forwarding paths are managed independently, allowing:
Label-switched paths to be reused for multiple services
Fast reroute and traffic engineering capabilities in the data plane
“MPLS L3VPN separates the control plane (via MP-BGP) from the data plane (via MPLS forwarding using LDP or RSVP).”
Inter-AS VPNs allow Layer 3 VPNs to extend across multiple autonomous systems (e.g., between two service providers or across internal AS domains).
| Type | Method | Characteristics |
|---|---|---|
| Type A | VRF-to-VRF at ASBR | Simple, uses static or direct peering |
| Type B | eBGP between ASBRs; labeled VPNv4 | Scalable, with label exchange between ASBRs |
| Type C | iBGP directly between PEs in each AS | Most scalable; ASBRs forward labeled traffic but do not hold VRFs |
Type B is most commonly deployed.
Type C is the most seamless and scalable, but also more complex to configure.
You don’t need full configuration knowledge for the exam, but you should know:
“Inter-AS VPNs enable multi-AS Layer 3 VPN reachability using BGP extensions, with Type B and Type C offering scalable options via labeled VPNv4 route exchange.”
| Topic | Key Points |
|---|---|
| MP-BGP AFI/SAFI | VPNv4 = AFI 1 / SAFI 128; RD is in the NLRI |
| PE-CE Protocols | Static, RIP, OSPF, BGP; BGP preferred for large deployments |
| RD vs RT | RD = uniqueness; RT = policy control (import/export) |
| Control/Data Plane Split | MP-BGP handles control; MPLS (via LDP/RSVP) handles forwarding |
| Inter-AS VPN Types | Type A (VRF), B (eBGP VPNv4), C (iBGP PE-PE) |
What is the purpose of a Route Distinguisher (RD) in an MPLS Layer 3 VPN?
The RD makes identical IPv4 prefixes unique across different VPNs.
Multiple customers may use the same private IP address ranges (for example 10.0.0.0/8). The Route Distinguisher is added to the IPv4 prefix to create a VPNv4 route, which allows the provider network to distinguish identical prefixes from different customers. Importantly, the RD does not control route distribution; it only ensures route uniqueness within the MPLS backbone. Route distribution is controlled by route targets. This distinction is frequently tested in service provider exams because engineers often confuse RD with RT.
Demand Score: 92
Exam Relevance Score: 96
What role do Route Targets (RTs) play in MPLS L3VPN?
Route Targets control which VRFs import or export VPN routes.
Route Targets are extended BGP community attributes attached to VPN routes. When a route is exported from a VRF, it carries an export route target. Other VRFs configured to import that route target will install the route in their routing tables. This mechanism allows flexible VPN topologies such as hub-and-spoke, full mesh, or extranet connectivity between different VPNs. Unlike RDs, route targets directly influence route distribution.
Demand Score: 90
Exam Relevance Score: 97
What is the function of a VRF routing table in MPLS VPN architecture?
A VRF maintains a separate routing table for each customer VPN.
Virtual Routing and Forwarding instances isolate routing information between customers. Each VRF has its own routing table, forwarding table, and policy configuration. When packets arrive from a customer interface, the router performs a lookup in the associated VRF rather than the global routing table. This separation ensures that different customers using overlapping IP address ranges do not interfere with each other.
Demand Score: 88
Exam Relevance Score: 95
Why does MPLS L3VPN rely on MP-BGP for route distribution?
MP-BGP allows routers to advertise VPNv4 routes containing both RD and route targets.
Multiprotocol BGP extends BGP so it can carry multiple address families, including VPNv4 and VPNv6. In MPLS VPN deployments, provider edge routers exchange VPN routes through MP-BGP sessions. These routes contain the route distinguisher and route target attributes that identify the VPN membership. This approach allows the service provider backbone to distribute customer routes efficiently without exposing them to the global routing table.
Demand Score: 86
Exam Relevance Score: 94
What happens when two VRFs import the same route target?
Both VRFs install the same VPN route into their routing tables.
Route targets define VPN membership. When a route is advertised with a particular RT, any VRF configured to import that RT will accept the route. This mechanism allows providers to create shared services networks, hub-and-spoke architectures, or extranet connections between customers. Misconfigured route targets can unintentionally leak routes between VPNs, making RT design a critical operational consideration.
Demand Score: 84
Exam Relevance Score: 93
Why is MPLS used in Layer 3 VPNs instead of traditional IP routing?
MPLS allows efficient packet forwarding using labels and supports scalable VPN isolation.
In an MPLS L3VPN architecture, packets are forwarded using labels instead of repeated IP lookups across the backbone. Provider edge routers attach labels identifying the destination VRF and the next hop in the MPLS network. Core routers forward packets using these labels without needing to know customer routes. This design improves scalability and simplifies backbone routing tables.
Demand Score: 82
Exam Relevance Score: 92