Mpls VPN: Click To Edit Master Subtitle Style
Mpls VPN: Click To Edit Master Subtitle Style
Mpls VPN: Click To Edit Master Subtitle Style
MPLS VPN
Johnson Liu
[email protected] 2011 Dec. 15, 2011 All rights reserved. Juniper Networks, Inc.
| www.juniper.net www.juniper.net
|1
MPLS VPN
www.juniper.net
|2
What is VPN?
Corporate Headquarters
Intran et
Internet Remote Access
Branch Office
Extran et
l
A private network constructed over a shared infrastructure Virtual: Not a separate physical network Private: Separate addressing and routing Network: A collection of devices that communicate Constraints are keyrestricted connectivity is the goal
www.juniper.net
|3
PE
CE
VPN A
VPN B
VPN B
Located at customer premises Provide access to the service provider network Can use any access technology or routing protocol for the CE/PE connection
www.juniper.net
|4
VPN B
VPN B
Maintain site-specific forwarding tables Exchange VPN routing information with other PE routers using MP-IBGP Use MPLS LSPs to forward VPN traffic
www.juniper.net
|5
VPN A
CE PE
VPN B CE PE
CE
VPN B
Forward VPN data transparently over established LSPs Do not maintain VPN-specific routing information
www.juniper.net
|6
www.juniper.net
|7
VPN A
CE PE
VPN B CE PE
CE
VPN B
Each VPN site is mapped to a PE interface or sub-interface Routing information is stored in different tables for each site
www.juniper.net
|8
VPN B Site 1
PE 3
CEA3 E-BGP
VPN C Site 1
www.juniper.net
|9
Only the VRF associated with a site is consulted for packets from that site
n
Routes received from directly connected CE sites associated with the VRF Routes received from other PE routers with acceptable BGP attributes Provides isolation between VPNs
www.juniper.net
| 10
10.1/16 CEA1 P P
PE 1
www.juniper.net
| 11
New BGP-4 address family identifier Route Distinguisher (RD) + Subscriber IPv4 prefix Route distinguisher disambiguates IPv4 addresses Supports the private IP address space Allows SP to administer its own numbering space
www.juniper.net
| 12
Assigned Number Field: number assigned by the identified authority for a particular purpose Administrator Field: identifies an assigned number authority 2 Byte Type Field: determines the lengths of the other two fields
l
n
Adm field must contain an Autonomous System Number (ASN) from IANA AN field is a number assigned by SP Adm field must contain an IP address assigned by IANA AN field is a number assigned by SP
www.juniper.net
| 13
Ingress PE creates RD and IPv4 prefix of routes received from each CE VPN-IPv4 routes are exchanged between PE using MP-iBGP Egress PE converts VPN-IPv4 routes into IPv4 routes before inserting into sites routing table
VPN-IPv4 is used only in the control plane Data plane uses traditional IPv4 addressing
www.juniper.net
| 14
MP - iBGP
P P
PE 1 VPN B Site 1
10458:23:10.1/16
www.juniper.net
| 15
Control Flow
n n n
Data flow
n
Routing information exchange between CE and PE Routing information exchange between PEs LSP establishment between PEs (RSVP or LDP signaling) Forwarding user traffic
www.juniper.net
| 16
Route Distribution
l
Route Target(RT): identifies a set of sites to which a PE router distributes routes. EX: Just like a tag of a group of routes, using RT for route manipulation(import/export) between sites or VRFs.
VPN of Origin: identifies a set of sites and establishes the associated route as coming from one of the sites in that set. EX: Prevent backdoor between two CEs route propagation loop occurs
n
Site of Origin(SOO): identifies the specific site from which a PE router learns a route. EX: Prevent single or multiple CEs in the same site has dual-homing to PE route propagation loop occurs
n
www.juniper.net
| 17
Route Targets
l
Each VPN-IPv4 route advertised through MPIBGP is associated with a route target attribute
n
Upon receipt of a VPN-IPv4 route, a PE router will decide whether to add that route to a VRF
n
www.juniper.net
| 18
Site 2
CPE1 CPE3
VRF
PE1
MP-iBGP session
VRF VRF
PE2
CPE2 CPE4
OSP F
Site 1
Site 1
VRF
Site 2
10.1.0.0/ 16
www.juniper.net
| 19
Site 2
CPE1 CPE3
VRF
PE1
MP-iBGP session
VRF VRF
PE2
CPE2 CPE4
Site 1
Site 1
VRF
Site 2
OSPF
10458:23:10.1.0 .0/16
l
10.1.0.0/16
IPv4 address is added to the appropriate forwarding table PE router converts IPv4 address to VPN-IPv4 address VPN-IPv4 address is installed into the MP-BGP routing table
www.juniper.net
| 20
Site 2
CPE1 CPE3
VRF
PE1
MP-iBGP session
VRF VRF
PE2
CPE2 CPE4
Site 1
Site 1
VRF
Site 2
OSPF
10.1.0.0/16
VPN RED
www.juniper.net
| 21
MP-iBGP session
VRF VRF
PE2
CPE2 CPE4
Site 1
Site 1
CPE3
VRF
MP-iBGP
Site 2
OSPF
10.1.0.0/16
l l
Each PE is configured with import targets Import target is used to selectively incorporate VPN-IPv4 routes into VRFs
n n
If import target matches target attribute in MP-IBGP message, route is incorporated into VRF Based on configured import policies, 10458:23:10.1.0.0/16 is incorporated in the RED VRF but not the BLUE VRF
www.juniper.net
| 22
Site 2
CPE1 CPE3
VRF
PE1
MP-iBGP session
VRF VRF
PE2
CPE2 CPE4
Site 1
Site 1
VRF
Site 2
RIP/OSPF/EBGP
Each IPv4 route received in a VRF could be advertised to the sites associated with the VRF
n
www.juniper.net
| 23
Site 2
PE-2
VRF
CPE-2
CPE-3
CPE-4
VRF VRF
Site 1
LS P
The LSP must be in place before forwarding data across the MPLS backbone LSPs are signaled through LDP or RSVP
www.juniper.net
| 24
Site 2
VRF
VRF VRF
Site 1
VRF
IP 10.1.2.3
www.juniper.net
| 25
Site 2
VRF
PE1
PE2
CPE2 CPE4
VRF VRF
Site 1
VRF
IP 10.1.2.3
The PE consults the appropriate VRF for the inbound interface Two labels are derived from the VRF route lookup and pushed onto the packet
www.juniper.net
| 26
Site 2
PE-1
VRF
PE-2
VRF
CPE-2
CPE-3
CPE-4
VRF
IGP label (Y) BGP label (Z) IP 10.1.2.3
Site 1
VRF
Packets are moved through the LSP using the two-level label stack
n
Identifies the LSP to egress PE router Derived from cores IGP and distributed by RSVP or LDP Identifies outgoing interface from egress PE to CE Derived from MP-IBGP update from egress PE
www.juniper.net
| 27
Site 2
PE-2
VRF
CPE-2
CPE-3
CPE-4
VRF
IGP label (X) BGP label (Z) IP 10.1.2.3
Site 1
VRF
After packets exit the ingress PE, the outer label is used to traverse the LSP
n
www.juniper.net
| 28
Site 2
PE-1
VRF
PE-2
VRF
CPE-2
CPE-3
CPE-4
VRF
BGP label (Z) IP 10.1.2.3
Site 1
VRF
The outer label is removed through penultimate hop popping (before reaching the egress PE)
www.juniper.net
| 29
Site 2
PE-2
VRF
CPE-2
CPE-3
CPE-4
VRF VRF
Site 1
IP 10.1.2.3
The inner label is removed at the egress PE The native IPv4 packet is sent to the outbound interface associated with the label
www.juniper.net
| 30
www.juniper.net
| 31
Remote connections only No site IDs or route distinguishers; BGP not required PE-to-PE LDP sessions can be adjacent or extended LDP sessions can be tunneled over RSVP LSPs No VRF table/routing instance configuration
www.juniper.net
| 32
The PE router uses LDP to distribute a VC label for each Layer 2 circuit defined PE-1 advertises labels to PE-2 PE-2 uses these labels as the inner labels when forwarding traffic to PE-1
A VC label (FEC) is sent for every Layer 2 circuit CEA PE1 CEC
CEB
P1
P2
www.juniper.net
| 33
CEA PE1
CEB
P1
P2
CEC
LDP-signaled or RSVP-signaled LSPs must be established between PE routers LDP must be enabled on the PE router loopback interfaces for extended sessions
Single IGP routing domainBGP and RSVP not required MPLS must be enabled on PE and P router core interfaces
www.juniper.net
| 34
VLAN 75 VLAN 82
CED
Cor e
Configure Layer 2 circuit IDsone for each remote CE device Configure Layer 2 parameters, like keepalives and MTUs Configure CE devices Layer 3 properties and routing protocols
www.juniper.net
| 35
Remote neighbor Interface being connected Virtual circuit ID must be the same at both ends of the connection
Encapsulation is not configured under the l2circuit Interface must support CCC or TCC encapsulation
Interface configuration
Encapsulation method determines Layer 2 circuit encapsulation Configured Layer 2 parameters must be compatible with local CE device
www.juniper.net
| 36
Network characteristics:
CE devices running OSPF Area 0 Full-mesh Layer 2 VPN between CE-A and CE-B
Ethernet encapsulation
Provider Site 1 Site 2 Core OSPF Area OSPF Area OSPF Area R 0 R R 0 0 . . . 3 . 1 . 2 . Site Site 1 10.0.10.0/2 1 172.22.210.0/2 2 2 1 172.22.212.0/2 10.0.10.0/2 2 2 1 4 4 P 4 CEP CEP 4 E lo0 lo0 A lo0 E lo0 B 192.168.1.1 192.168.11.1 192.168.1.3 192.168.11.2
2011 Juniper Networks, Inc. All rights reserved. www.juniper.net
| 37
www.juniper.net
| 38
Juniper Layer 2 VPNs and Layer 2 circuits offer point-to-point Ethernet, Frame Relay, ATM, PPP, or Cisco-HDLC service Administrator of PE router maps local circuit IDs to remote sites
www.juniper.net
VLA Ns VL CE AN
PE
VL AN CE
PE VL
AN
| 39
PE CE PE
CE
Administrator does not need to map local circuit IDs to remote sites
PE device learns MAC address from received Layer 2 frames MAC addresses are dynamically mapped to outbound | 40
www.juniper.net
References
RFC 4761
K. Kompella and Y. Rekhter, Virtual Private LAN Service (VPLS) Using BGP for Auto-Discovery and Signaling Lasserre, V. Kompella, et. al., Virtual Private LAN Service (VPLS) Using Label Distribution Protocol (LDP) Signaling RFC 4761 uses M-BGP for signaling RFC 4762 uses LDP for signaling Juniper supports both
RFC 4762
Primary Difference:
www.juniper.net
| 41
Benefits:
Auto-discovery
Provision VPNs as a whole versus building them circuit by circuit Meant to handle lots of routes Route reflectors/confederations for hierarchy Designed to work across autonomous systems
Scalable protocol
Mechanisms to provide all VPNs types via Multiprotocol BGP (MP-BGP, RFC 2858)
www.juniper.net
| 42
PE2 P P PE3 P P
VPNB
CEB
VPNA
VPNB
CE device:
PE routers:
Ethernet used at both ends of a VPN Maintain and exchange VPN-related information with other PE routers Performs MAC learning function Use MPLS LSPs to carry VPN traffic between PE routers Forward VPN traffic transparently over established LSPs Do not maintain VPN-specific forwarding information
www.juniper.net
P routers:
| 43
CED
Cor e
Provider-facing interface must be Ethernet interface or Ethernet using VLANs List of VLANs: One for each VPLS VLANs independently numbered for each VPLS
VLAN IDs must be the same at both ends Unless new VLAN is wanted
| 44
CE A1 PE1 CE B1
CE A2 PE 2 CE B2 CE A3
PE 3
Local label blocks and those blocks learned from remote PEs Used to forward layer 2 data and store learned MAC address for the VPLS
www.juniper.net
MAC table
| 45
CEB
P1 MP-BGP Session
P2
Can use either RSVP or LDP Can use LSPs for many services (for example, Internet, Layer 2 VPN, Layer 3 VPN)
Between PE routers, full-mesh MP-IBGP or use of RRs must be configured to support the sessions with l2-vpn family
www.juniper.net
| 46
CE1 CE3
PEVR 1 F VR F
MP-IBGP Session
PE2 VR F VR F
CE2 CE4
BGP-based VPLS uses same NLRI as Layer 2 VPNs Instead of sending individual advertisements for each remote site, labels are advertised in blocks
| 47
PE Provisioning
VPLS routing instance Route Target BGP community Site ID: Unique value in the context of a VPLS Site range: Specifies total number of sites in the VPLS. The site range must be greater than the site identifier. Remote sites: Learned dynamically (described later)
The PE router forwards frames to the remote sites using the labels learned via MP-IBGP
| 48
2 0 0
PE -2
VR F
N 600
PE-1 configured for a VPLS called VPN A between Site 1 and 4 PE-2 computes transmit and receive VRF labels
CEA4 VLA
VPN A Site 4
PE-2s NLRI for R-Site 4 RT Targe Site 1 4 t ID Range 8 Label 100 base 0 Label 1 Offset
2 3
Oute r Tx 2 Labe l 0 0
Inne r Tx 20 Labe l 03
Rx La bel 10 00 10 10 01 02
Tx Label = Remote Base + Local Site ID Remote Offset Rx Label = Local Base + Remote Site ID Local
www.juniper.net
| 49
Updating VRFs (1 of 3)
Full Mesh IBGP Session s PE -2
VR F
VPN A Site 1
CEA1
VR F VLAN 600
PE -1
CE-A3 l2vpn NLRI update RRT Site 3 Targe 1 Ran 4 ID t 100 Label ge Offs 1 0 Base et
PE -3
A 3
NLRI contains label block information that PE-3 has dedicated to the VPLS
www.juniper.net
| 50
Updating VRFs (2 of 3)
CEA1 VR F VLA N 600 200
MPLS LSPs
PE -2
VR F
VPN A Site 1
learned from remote site 2
PE -1
300
Oute Inne r r Tx Tx 2 20 Labe Labe l l Label used to reach 100 3 3 0 00 Site 3 0 0 PE-1 updates its VRF with 0
PE -3 Assumes similar label 600 block advertisement has been received from PE-2
A Site 3
www.juniper.net
Import route target (RT1) for PE-1s VRF matches route target carried by the BGP route NLRI copies into bgp.l2vpn.0 and vpn-name.l2vpn.0 (local-site-id + remote-label-base remote-label-offset = 1000)
| 51
PE-3 NLRI
Updating VRFs (3 of 3)
MPLS LSPs PE -2
VR F
VPN A Site 1
CEA1
VR F VLA N
2 0 3 PE0 0 -1 0
PE -3
A Site 3
Oute r Tx 2 Labe l 0 3 0 0
PE-1 obtains label by resolving PE3s host address through an RSVP or LDP LSP
www.juniper.net
| 52
CE1 CE3
PE1
Site 2
VPN A Site 2
For each VPLS you must configure a full mesh of LDP session between participating PE routers. PE-1 advertises labels to PE-2; PE-2 uses these labels as the inner labels when forwarding traffic to PE-1
www.juniper.net
| 53
VPN A Site 1
Ethernet Frame VLAN
CEA1
VLA N 600
2 0 3 PE0 0 -1 0
PE -3
VLA N 600
1.1. 1.1
CE-A1 does not know the MAC address of 1.1.1.1, so CE-A1 must send ARP request
www.juniper.net
| 54
Ingress PE router replicates and floods the frame to all sites (broadcast DA)
www.juniper.net
| 55
PE router forwarding is based on the interface a packet is received on and its destination MAC address
Associates source MAC address with receiving port or remote PE router Qualified learning: Based on MAC address and VLAN tag Unqualified learning: Based on MAC address alone Broadcast/Unknown/Multicast destination MAC address: Forward to all ports and PE routers associated with the VPLS of the receiving interface Known destination MAC address (vpn-name.vpls): Unicast to associated interface or PE router
www.juniper.net
Flooding
| 56
VPN A Site 1
label me label (301) MPLS switching by (1000) the core LSRs in P routers are not VPN aware Outer label swapped at each LSR
PE -3
VLAN 600
www.juniper.net
| 57
VPN A Site 1
PE -1
VLAN 600
www.juniper.net
| 58
VLAN
The label is popped by the egress PE router and sent to interface Allows egress routers to learn the CE-A1s MAC address from Ethernet frame (MAC-to-LSP mapping stored
www.juniper.net
| 59
VLAN SA DA 600
| 60
Because it previously learned that CE-A1s MAC address is located at Site 1, PE-1 sends the Ethernet frame directly to PE-1 using MPLS encapsulation Flooding frame to all remote PE routers is not required when MAC address is learned and stored
www.juniper.net
| 61
The inner label is popped by the egress PE router and sent to VT interface Allows egress routers to learn the CE-A1s MAC address from Ethernet frame (MAC-to-LSP mapping stored in vpn-name.vpls) and then perform second lookup to forward frame out of the VPLS interface
www.juniper.net
| 62
P E Echo Requ1 Any future traffic ests longer must be flooded as in initial data flow Echo CE and PE routers have learned MAC addresses of both Replie CE devices s The vpn-name.vpls table on both PE-1 and PE-3 have dynamically installed forwarding entries for inbound and outbound traffic based on MAC addresses learned
www.juniper.net
VPN A Site 1
CE VPN P VLAN A E 600 A Site CE 2 VLAN 2 2 - VPN 600 P A A E 3 Site 3 3 between CE-A1 and CE-A3 no
| 63
traffic
Ingress PE no longer has to perform all of the replication of BUM traffic Can be used in BGP VPLS scenario only
P2MP LSP to VPLS mapping is performed with the readvertisement of an ingress PEs label blocks with the PMSI Tunnel attribute
www.juniper.net
| 64
Network Assumptions
MPLS LSPs established by LDP or RSVP Tunnels can also be GRE No PE forwards a packet from a remote PE router to another remote PE router Reduces need for Spanning Tree Protocol (STP) in provider network
| 65
VPN A Site 1
CEA1
PE -2 PE -1
Solutions
Configure active/backup links on PE-2 (BGP VPLS only) Configure LAG between PE-2 and CE-A2 Configure ERP between PE-2 and CE-A2 Run a spanning tree protocol between PE-2 and CE-A2
www.juniper.net
| 66
PE -1
Solutions
Configure multihoming and Local Preference on PE-2 and PE-3 (BGP VPLS only) Configure primary and backup neighbor (LDP VPLS only) Run a spanning tree protocol between PE-2, PE-3, and CE-A2
www.juniper.net
| 67
Intra-building connectivity via Ethernet lBroadcast domains (LANs) broken up by routers lExternal connectivity via VPLS just another Ethernet
l
www.juniper.net
| 68