MPLS Layer 3 VPN Technology Overview
MPLS Layer 3 VPN Technology Overview
● Scalability
● Security
● Easy to Create
● Flexible Addressing
● Integrated Quality of Service (QoS) Support
● Straightforward Migration
MPLS/VPN Technology Overview
3
IGP (ISIS/OSPF
MPLS on Service Backbone
VRF towards the Customer
MP-BGP on PE1 and PE2
Customer R6, R7
IP/VPN Technology
MPLS IP/VPN Topology | Connection Model
CE P P
CE
PE PE
MPLS Network
P P
CE
CE
MP-iBGP Session
PE Routers P Routers
▪ Sit at the Edge | customers connect her ▪ Sit inside the network | Core routers
▪ Use MPLS with P routers ▪ Forward packets by looking at labels
▪ Uses IP with CE routers ▪ P and PE routers share a common IGP
▪ Distributes VPN information through (OSPF, ISIS)
MP-BGP to other PE routers
11
IP/VPN Technology Overview
Separate Routing Tables at PE
CE2
VPN 2
P
CE1 E MPLS Network IGP (OSPF, ISIS)
VPN 1
12
IP/VPN Technology Overview
Virtual Routing and Forwarding Instance
CE2
VPN 2 VRF Green
PE
CE1 MPLS Network IGP (OSPF, ISIS)
VPN 1 Ser0/0
VRF Blue
CE2
VPN 2 VRF Green
PE
CE1 MPLS Network IGP (OSPF, ISIS)
VPN 1 Ser0/0
VRF Blue
16
IP/VPN Technology Overview: Control Plane
Route-Distinguisher (rd)
8 Bytes 4 Bytes 8 Bytes 3 Bytes MP-BGP UPDATE Message Showing
VPNv4 Address, RT, Label only
1:1 [Link]
RD IPv4 Route-Target Label
VPNv4
17
IP/VPN Technology Overview: Control Plane
Route-Target (rt)
MPLS Backbone
MPLS Backbone
• PE2 receives and checks whether the RT=1:2 is locally configured as ‘import RT’
within any VRF, if yes, then
• PE2 translates VPNv4 prefix back to IPv4 prefix
• Updates the VRF CEF Table for [Link]/24 with label=100
• PE2 advertises this IPv4 prefix to CE2 (using whatever routing protocol)
P P
PE1 PE2
MPLS Backbone
• Stores VPN routes with associated • Stores next-hop i.e. PE routes with
labels associated labels
• VPN routes learned via BGP • Next-hop i.e. PE routes learned through IGP
• Labels learned via BGP • Label learned through LDP or RSVP
• PE2 imposes two labels (MPLS headers) for each IP packet going to site2
• Outer label is learned via LDP; Corresponds to PE1 address (e.g. IGP route)
• Inner label is learned via BGP; corresponds to the VPN address (BGP route)
• P1 does the Penultimate Hop Popping (PHP)
• PE1 retrieves IP packet (from received MPLS packet) and forwards it to CE1.
23
IP/VPN Technology: Forwarding Plane Reference
Reference
before.
Inner Label
IP Packet
24
Agenda
• IP/VPN Overview
• Technology Overview
• Configuration Overview (IOS, IOS-XR and NX-OS)
• IP/VPN Services
• Best Practices
• Conclusion
MPLS based IP/VPN Sample Configuration (IOS) - 1
Reference
Reference
VRF Definition
ip vrf VPN-A vrf definition VPN-A
rd 1:1 rd 1:1
Site 1 route-target export 100:1 address-family ipv4
CE1 route-target import 100:1 route-target export 100:1
[Link]/24 route-target import 100:1
PE1
PE1 interface Serial0 interface Serial0
Se0
ip address [Link]/24 ip address [Link]/24
[Link] vrf forwarding VPN-A
ip vrf forwarding VPN-A
PE-P Configuration
Interface Serial1
ip address [Link] [Link]
P mpls ip
PE1 s1 PE1
Se0
router ospf 1
network [Link] [Link] area 0
26
MPLS based IP/VPN Sample Configuration (IOS) - 2
Reference
27
MPLS based IP/VPN Sample Configuration (IOS) - 3
Reference
router bgp 1
Site 1
CE1 !
address-family ipv4 vrf VPN-A
[Link]/24 PE1 neighbor [Link] remote-as 2
neighbor [Link] activate
[Link] PE1 exit-address-family
!
[Link]
router ospf 1
Site 1
CE1 !
router ospf 2 vrf VPN-A
[Link]/24 PE1 network [Link] [Link] area 0
redistribute bgp 1 subnets
[Link] PE1 !
[Link]
28
MPLS based IP/VPN Sample Configuration (IOS)
Reference
29
MPLS based IP/VPN Sample Configuration (IOS)
Reference
Site 1
CE1
ip route vrf VPN-A [Link] [Link]
[Link]/24 PE1 [Link]
[Link] PE1
[Link]
30
MPLS based IP/VPN Sample Configuration (IOS)
Reference
• Having familiarized with IOS based config, let’s peek through IOS-XR and
NX-OS config for VPNs
31
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Hub and Spoke Service
2. Extranet Service
3. Internet Access Service
4. IP/VPN over IP Transport
•
IP/VPN Services:
2. Hub and Spoke Service
PE-Hub
Eth0/0
Spoke B CE-SB
PE-SB
CE-Hub
MPLS VPN Backbone
[Link]/24
Eth0/0.1
PE-Hub Eth0/0.2
PE-SB
Spoke B CE-SB MPLS VPN Backbone CE-Hub
[Link]/24
ip vrf HUB-OUT
description VRF for traffic to HUB
ip vrf green-spoke2 rd 300:12
description VRF for SPOKE B route-target export 2:2
rd 300:112
• PE-Hub can advertise Spoke specific route(s) to PE-SA/SB.
route-target export 1:1 • PE-Hub MAY use bgp aggregation.
route-target import 2:2
* Only If Hub and Spoke Sites Use the Same BGP ASN
** Configuration for This Is Shown on the Next Slide
37
Supported in IOS,
NXOS and IOS-XR
IP/VPN Services:
2. Hub and Spoke Service: Configuration – Option#2
router bgp <ASN>
ip vrf green-spoke1
address-family ipv4 vrf HUB-IN
description VRF for SPOKE A neighbor <CE> as-override
rd 300:111
route-target export 1:1
ip vrf HUB-IN
route-target import 2:2
description VRF for traffic from HUB
Spoke A PE-SA rd 300:11
CE-SA route-target import 1:1
[Link]/24
Eth0/0.1
PE-Hub Eth0/0.2
Spoke B PE-SB
CE-SB CE-Hub
MPLS VPN Backbone
[Link]/24
38
Supported in IOS,
NXOS and IOS-XR
IP/VPN Services:
2. Hub and Spoke Service: Control Plane (Option#2)
Two VRFs at the PE-Hub:
• VRF HUB-IN to learn every spoke routes from remote PEs
• VRF HUB-OUT to advertise spoke routes or summary [Link]/16 routes to remote PEs
MP-iBGP Update
VRF FIB and LFIB
[Link]/16
VRF HUB-IN
[Link]/16 PE-Hub 35
Label 35 PE-Hub
[Link]/24 CE-SB VRF HUB-OUT
PE-SB Route-Target 2:2
39
Supported in IOS,
NXOS and IOS-XR
IP/VPN Services:
2. Hub and Spoke Service: Forwarding Plane (Option#2)
This Is How the Spoke-to-Spoke Traffic Flows
VRF HUB-IN
CE-Hub
Spoke B PE-Hub
VRF HUB-OUT
PE-SB L1 35 [Link]
CE-SB
[Link]
[Link]/24
[Link]
• If more than one spoke router (CE) connects to the same PE router (within
the same VRF), then such spokes can reach other without needing the
hub.
• Defeats the purpose of hub and spoke ☹ CE-SA1
PE-Hub
CE-SA2 PE-SA
CE-SA3
IP/VPN Services:
2. Hub and Spoke Service: Half-Duplex VRF
ip vrf green-up ip vrf green-down
description VRF - upstream description VRF - downstream traffic
traffic rd 300:112
rd 300:111 route-target export 1:1
route-target import 2:2 ip vrf HUB-IN
description VRF for traffic from
HUB
Spoke A rd 300:11
route-target import 1:1
CE-SA
[Link]/24 S
Hub Site
w GE0/0 MPLS Backbone
PE-SA
PE-Hub
Spoke B CE-Hub
Interface GigEthernet 0/0
ip vrf HUB-OUT
ip address [Link] [Link]
[Link]/24 description VRF for traffic to
ip vrf forward green-up downstream
green-down
HUB
CE-SB rd 300:12
..
route-target export 2:2
1. PE-SA installs the Spoke routes only in downstream VRF i.e. green-down
2. PE-SA installs the Hub routes only in upstream VRF i.e. green-up
3. PE-SA forwards the incoming IP traffic (from Spokes) using upstream VRF i.e. green-up routing table.
4. PE-SA forwards the incoming MPLS traffic (from Hub) using downstream VRF i.e. green-down routing table 42
43
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Load-Sharing for Multihomed VPN Sites
2. Hub and Spoke Service
3. Extranet Service
4. Internet Access Service
5. IP/VPN over IP Transport
6. IPv6 VPN Service
7. Multi-VRF CE Service
8. VRF-Aware NAT Services
9. VRF-Selection Based Services
10. Remote VPN Access Service
11. QoS Service
12. Multicast VPN Service
• Best Practices
• Conclusion
MPLS-VPN Services
3. Extranet VPN
• MPLS based IP/VPN, by default, isolates one VPN customer from another
• Separate virtual routing table for each VPN customer
• Communication between VPNs may be required
i.e., extranet
• External intercompany communication (dealers with manufacturer, retailer with
wholesale provider, etc.)
• Management VPN, shared-service VPN, etc.
• Needs to share the import and export route-target (RT) values within the
VRFs of extranets.
• Export-map or import-map may be used for advanced extranet.
44
Supported in IOS,
MPLS Backbone
[Link]/16
VPN_A Site#2
P P
VPN_A Site#1
[Link]/16 PE1 PE2
[Link]/16
VPN_B Site#1
MPLS-VPN Services
3. Extranet VPN – Advanced Extranet (IOS Config sample)
[Link]/16
MPLS Backbone
VPN_A Site#2
VPN_A Site#1
[Link]/16 PE1 PE2
P [Link]/16
VPN_B Site#1
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Load-Sharing for Multihomed VPN Sites
2. Hub and Spoke Service
3. Extranet Service
4. Internet Access Service
5. IP/VPN over IP Transport
6. IPv6 VPN Service
7. Multi-VRF CE Service
8. VRF-Aware NAT Services
9. VRF-Selection Based Services
10. Remote VPN Access Service
11. QoS Service
12. Multicast VPN Service
• Best Practices
• Conclusion
MPLS-VPN Services
4. Internet Access Service to VPN Customers
48
MPLS-VPN Services
4. Internet Access: Design Options
49
MPLS-VPN Services
4. Internet Access: Design Options
1. VRF specific default route
• 1.1 Static default route to move traffic from VRF to Internet
(global routing table)
• 1.2 Static routes for VPN customers to move traffic from Internet (global routing table) to VRF
2. Separate PE-CE subinterface (non-VRF)
• May run BGP to propagate Internet routes between PE and CE
3. Extranet with Internet-VRF
• VPN packets never leave VRF context; issue with overlapping VPN address
4. Extranet with Internet-VRF along with VRF-aware NAT
• VPN packets never leave VRF context; works well with overlapping
VPN address
50
Supported in IOS
P
PE1 [Link]
PE1#
ip vrf VPN-A
Internet GW
rd 100:1
route-target both 100:1
Interface Serial0
ip address [Link] [Link] ▪ A default route, pointing to the
ip vrf forwarding VPN-A ASBR, is installed into the site VRF at
Router bgp 100 each PE
no bgp default ipv4-unicast
redistribute static
neighbor [Link] remote 100 ▪ The static route, pointing to the VRF
neighbor [Link] activate interface, is installed in the global
neighbor [Link] next-hop-self
neighbor [Link] update-source loopback0 routing table and redistributed into
BGP
ip route vrf VPN-A [Link] [Link] [Link] global
ip route [Link] [Link] Serial0
51
Supported in IOS,
52
Supported in IOS,
NXOS and IOS-XR
Interface Serial0.1
▪ PE1-CE1 has one sub-interface associated
ip vrf forwarding VPN-A to a VRF for VPN routing
▪
ip address [Link] [Link]
frame-relay interface-dlci 100 PE1-CE has another subinterface (global)
! for Internet routing
Interface Serial0.2
ip address [Link] [Link] ▪ PE1 may have eBGP peering with CE1 over
frame-relay interface-dlci 200 the global interface and advertise full
! Internet routes or a default route to CE1
▪ PE2 must advertise VPN/site1 routes to
Router bgp 100 the Internet.
no bgp default ipv4-unicast
neighbor [Link] remote-as 502
53
Supported in IOS,
NXOS and IOS-XR
Pros Cons
PE1 Global Table and FIB
Internet Routes [Link] 1. CE is dual-homed and can perform 1. PE to Hold Full Internet Routes or
[Link] Label=30 Optimal Routing default route via the Internet GW
54
Supported in IOS,
NXOS and IOS-XR
55
Supported in IOS,
• If the VPN customers need Internet access without Internet routes, then
VRF-aware NAT can be used at the Internet-GW i.e., ASBR
• The Internet GW doesn’t need to have Internet
routes either
• Overlapping VPN addresses is no longer a problem
• More in the “VRF-aware NAT” slides…
56
57
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Load-Sharing for Multihomed VPN Sites
2. Hub and Spoke Service
3. Extranet Service
4. Internet Access Service
5. IP/VPN over IP Transport
6. IPv6 VPN Service
7. Multi-VRF CE Service
8. VRF-Aware NAT Services
9. VRF-Selection Based Services
10. Remote VPN Access Service
11. QoS Service
12. Multicast VPN Service
• Best Practices
• Conclusion
Supported in IOS,
NXOS and IOS-XR
IP/VPN Services:
10. Providing MPLS/VPN over IP Transport Reference
[Link]
58
Supported in IOS,
NXOS and IOS-XR
IP/VPN Services:
10. Providing MPLS/VPN over IP Transport Reference
PE1 PE2
CE1 CE2
GRE/IP Tunnel
IP
VRF VRF
IP Header
• GRE/IP header and VPN label imposed on VPN traffic by PE1
GRE Header
VPN Label
• VPN traffic is forwarded towards egress PE using IP forwarding
• Egress PE2 decapsulates, and uses VPN label to forward packet to CE2
Src Add Src Add Src Add
IP Packet Dst Add Dst Add Dst Add
Source -- [Link] 59
60
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Load-Sharing for Multihomed VPN Sites
2. Hub and Spoke Service
3. Extranet Service
4. Internet Access Service
5. IP/VPN over IP Transport
6. IPv6 VPN Service
7. Multi-VRF CE Service
8. VRF-Aware NAT Services
9. VRF-Selection Based Services
10. Remote VPN Access Service
11. QoS Service
12. Multicast VPN Service
• Best Practices
• Conclusion
Supported in IOS,
NXOS and IOS-XR
IP/VPN Services:
11. IPv6 VPN Service
• Similar to IPv4 VPN, IPv6 VPN can also be offered.
• Referred to as “IPv6 VPN Provider Edge (6VPE)”.
• No modification on the MPLS core
• Core can stay on IPv4
• PE-CE interface can be single-stack IPv6 or dual-stack
• IPv4 and IPv6 VPNs can be offered on the same PE-CE interface
• Config and operation of IPv6 VPN are similar to IPv4 VPN
v4 and v6 PE PE v4 and v6
VPN A VPN A
CE
P P CE
MPLS/VPN
v4 and v6 Network
VPN A
CE P P v6 Only VPN B
PE PE
VPN B v6 Only CE
iBGP Sessions in VPNv4 and
CE VPNv6 Address-Families 61
Supported in IOS,
v4 and v6 PE PE v4 and v6
VPN A VPN A
CE
P P CE
MPLS/VPN
v4 and v6 Network
VPN A
CE P P v6 Only VPN B
PE PE
VPN B v6 Only CE
iBGP Sessions in VPNv4 and
CE VPNv6 Address-Families 62
63
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Load-Sharing for Multihomed VPN Sites
2. Hub and Spoke Service
3. Extranet Service
4. Internet Access Service
5. IP/VPN over IP Transport
6. IPv6 VPN Service
7. Multi-VRF CE Service
8. VRF-Aware NAT Services
9. VRF-Selection Based Services
10. Remote VPN Access Service
11. QoS Service
12. Multicast VPN Service
• Best Practices
• Conclusion
Supported in IOS,
NXOS and IOS-XR
IP/VPN Services:
12. Providing Multi-VRF CE Service
• Is it possible for an IP router to keep multiple customer connections separated ?
• Yes, “multi-VRF CE” a.k.a. vrf-lite can be used
• “Multi-VRF CE” provides multiple virtual routing tables
(and forwarding tables) per customer at the CE router
• Not a feature but an application based on VRF implementation
• Any routing protocol that is supported by normal VRF can be used in
a multi-VRF CE implementation
• No MPLS functionality needed on CE, no label exchange between CE and any router (including
PE) ☺
• One deployment model is to extend the VRFs to the CE, another is to extend it further inside
the Campus => Virtualization
64
Supported in IOS,
NXOS and IOS-XR
IP/VPN Services:
12. Providing Multi-VRF CE Service
One Deployment Model—Extending MPLS/VPN to CE
ip vrf green
rd 3000:111
route-target both 3000:1
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Load-Sharing for Multihomed VPN Sites
2. Hub and Spoke Service
3. Extranet Service
4. Internet Access Service
5. IP/VPN over IP Transport
6. IPv6 VPN Service
7. Multi-VRF CE Service
8. VRF-Aware NAT Services
9. VRF-Selection Based Services
10. Remote VPN Access Service
11. QoS Service
12. Multicast VPN Service
• Best Practices
• Conclusion
Supported in IOS
MPLS-VPN Services
5. VRF-Aware NAT Services
MPLS-VPN Services
5. VRF-Aware NAT Services
68
Supported in IOS
IP/VPN Services:
5. VRF-Aware NAT Services: Internet Access
CE1
[Link]/24 MPLS Backbone
Green VPN Site PE-ASBR Internet
PE11 .1 [Link]
P
PE12
CE2
[Link]/24 IP NAT Inside
Blue VPN Site
IP NAT Outside
IP/VPN Services:
5. VRF-Aware NAT Services: Internet Access
Src=[Link]
Dest=Internet Label Stack 30 MPLS Backbone
CE1 Src=[Link]
[Link]/24 Dest=Internet Src=[Link]
Green VPN Site PE-ASBR Dest=Internet
PE11 Internet
IP Packet P Src=[Link]
PE12
CE2 Dest=Internet
Label Stack 40
[Link]/24 IP Packet
Src=[Link]
Blue VPN Site Dest=Internet Traffic Flows
Src=[Link]
Dest=Internet MPLS Packet
NAT Table
▪ PE-ASBR removes the label from the VRF IP Source Global IP VRF-Table-ID
received MPLS packets per LFIB [Link] [Link] Green
▪ Performs NAT on the resulting [Link] [Link] Blue
IP packets
▪ Forwards the packet to the internet
▪ Returning packets are NATed and
put back in the VRF context and
then routed
▪ This is also one of the ways to provide
Internet access to VPN customers
with or without overlapping addresses
70
Supported in IOS
IP/VPN Services:
5. VRF-Aware NAT Services: Internet Access Reference
[Link]
71
72
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Load-Sharing for Multihomed VPN Sites
2. Hub and Spoke Service
3. Extranet Service
4. Internet Access Service
5. IP/VPN over IP Transport
6. IPv6 VPN Service
7. Multi-VRF CE Service
8. VRF-Aware NAT Services
9. VRF-Selection Based Services
10. Remote VPN Access Service
11. QoS Service
12. Multicast VPN Service
• Best Practices
• Conclusion
Supported in IOS
73
Supported in IOS
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Load-Sharing for Multihomed VPN Sites
2. Hub and Spoke Service
3. Extranet Service
4. Internet Access Service
5. IP/VPN over IP Transport
6. IPv6 VPN Service
7. Multi-VRF CE Service
8. VRF-Aware NAT Services
9. VRF-Selection Based Services
10. Remote VPN Access Service
11. QoS Service
12. Multicast VPN Service
• Best Practices
• Conclusion
Supported in IOS
• “Remote Access” is not to be confused by “GET VPN” that provides any-to-any (CE-based) security
service
76
Supported in IOS
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Load-Sharing for Multihomed VPN Sites
2. Hub and Spoke Service
3. Extranet Service
4. Internet Access Service
5. IP/VPN over IP Transport
6. IPv6 VPN Service
7. Multi-VRF CE Service
8. VRF-Aware NAT Services
9. VRF-Selection Based Services
10. Remote VPN Access Service
11. QoS Service
12. Multicast VPN Service
• Best Practices
• Conclusion
Supported in IOS,
NXOS, and IOS-XR
IP/VPN Services:
8. Providing QoS to VPN Customers
• VPN customers may want SLA so as to treat
real-time, mission-critical and best-effort traffic appropriately
• QoS can be applied to VRF interfaces
- Just like any global interface
- Same old QoS mechanisms are applicable
• Remember—IP precedence bits are copied to MPLS TC/EXP bits (default behavior)
• MPLS Traffic-Eng could be used to provide the bandwidth-on-demand or Fast Rerouting (FRR) to VPN
customers
79
80
Agenda
• IP/VPN Overview
• IP/VPN Services
1. Load-Sharing for Multihomed VPN Sites
2. Hub and Spoke Service
3. Extranet Service
4. Internet Access Service
5. IP/VPN over IP Transport
6. IPv6 VPN Service
7. Multi-VRF CE Service
8. VRF-Aware NAT Services
9. VRF-Selection Based Services
10. Remote VPN Access Service
11. QoS Service
12. Multicast VPN Service
• Best Practices
• Conclusion
Supported in IOS,
NXOS, and IOS-XR
IP/VPN Services:
9. Providing Multicast Service to VPNs
81
82
Agenda
• IP/VPN Overview
• IP/VPN Services
• Best Practices
• Conclusion
Best Practices (1)
1. Use RR to scale BGP; deploy RRs in pair for the redundancy
Keep RRs out of the forwarding paths and disable CEF (saves memory)
2. Choose AS format for RT and RD i.e., ASN: X
Reserve first few 100s of X for the internal purposes such as filtering
3. Consider unique RD per VRF per PE,
Helpful for many scenarios such as multi-homing, hub&spoke etc.
Helpful to avoid add-path, shadow RR etc.
4. Don’t use customer names (V458:GodFatherNYC32ndSt) as the VRF names; nightmare for the NOC.
Consider v101, v102, v201, v202, etc. and Use VRF description for naming
5. Utilize SP’s public address space for PE-CE IP addressing
Helps to avoid overlapping; Use /31 subnetting on PE-CE interfaces
83
Best Practices (2)
6. Limit number of prefixes per-VRF and/or per-neighbor on PE
Max-prefix within VRF configuration; Suppress the inactive routes
Max-prefix per neighbor (PE-CE) within OSPF/RIP/BGP VRF af
7. Leverage BGP Prefix Independent Convergence (PIC) for fast convergence <100ms (IPv4 and IPv6):
• PIC Core
• PIC Edge
• Best-external advertisement
• Next-hop tracking (ON by default)
8. Consider RT-constraint for Route-reflector scalability
9. Consider ‘BGP slow peer’ for PE or RR – faster BGP convergence
84
Agenda
• IP/VPN Overview
▪ IP/VPN Services
▪ Best Practices
▪ Conclusion
Conclusion
• MPLS based IP/VPN is the most optimal L3VPN technology
• Any-to-any IPv4 or IPv6 VPN topology
• Partial-mesh, Hub and Spoke topologies also possible
86