MPLS fundamentals Sherif Toulan, P.Eng.,CCIE#4220 Sr. Technical Leader, Cisco Systems Canada Cisco Confidential 1 Agenda Topics 1. MPLS Technology Basics 2. MPLS Traffic Engineering (TE) 3. MPLS Layer-2 Virtual Private Networks (L2 VPN) 4. MPLS Layer-3 Virtual Private Networks (L3 VPN) Summary Cisco Systems 2 © 2015 Cisco Systems. All rights reserved. MPLS Technology Basics Cisco Confidential 3 Agenda Evolution of MPLS MPLS Reference Architecture MPLS forwarding Summary Cisco Systems 4 © 2015 Cisco Systems. All rights reserved. Evolution of MPLS Technology Evolution and Main Growth Areas • Evolved in 1996 to full IETF standard, covering over 130 RFCs • Key application initially were Layer-3 VPNs, followed by Traffic Engineering (TE), and Layer-2 VPNs Optimize MPLS for packet transport Optimize MPLS for video Complete base MPLS portfolio Bring MPLS to Market First L3VPNs Deployed Cisco ships MPLS 1997 1998 Cisco Systems Large Scale L3VPN Deployments First MPLS TE Deployments 1999 2000 Large Scale L2VPN Deployments First L2VPN Deployments 2001 2002 2003 2004 First MPLS Transport Profile Deployments Large Scale MPLS TE Deployments 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 © 2015 Cisco Systems. All rights reserved. What Is MPLS? • It’s all about labels … • Use the best of both worlds – Layer-2 (ATM/FR): efficient forwarding and Multi traffic engineering – Layer-3 (IP): flexible and scalable • MPLS forwarding plane – Use of labels for forwarding Layer-2/3 data traffic – Labeled packets are being switched instead Protocol Have:IPv4, IPv6, Ethernet, ATM, FR. Could do IPX, AppleTalk, DECnet, etc etc. Label Uses Labels to tell a node what to do with a packet; separates forwarding (hop by hop behavior) from routing (control plane) Switching Routing == IPv4 or IPv6 lookup. Then forwarding is based on label Switching. of routed • Leverage layer-2 forwarding efficiency • MPLS control/signaling plane – Use of existing IP control protocols Multi-Protocol: The ability to carry any payload. extensions + new protocols to exchange label information • Leverage layer-3 control protocol flexibility and scalability Cisco Systems 6 © 2015 Cisco Systems. All rights reserved. MPLS Reference Architecture Different Type of Nodes & their Roles in a MPLS Network • P (Provider) router – Label switching router (LSR) – Switches MPLS-labeled packets • PE (Provider Edge) router MPLS enabled Domain PE CE P P PE CE – Label Edge router (LER) – Imposes and removes MPLS labels • CE (Customer Edge) router CE CE – Connects customer network to MPLS network, no labels to be sent to CE nodes Cisco Systems PE P MPLS core P PE Label switched traffic 7 © 2015 Cisco Systems. All rights reserved. Basic MPLS Forwarding Operations How Labels Are Being Used to Establish End-to-end Connectivity • Label imposition (Push) MPLS enabled Domain – By ingress PE router; classify and label packets – Based on Forwarding Equivalence Class (FEC) • Label swapping – • By P router; forward packets using labels; indicates service class & destination Label Imposition (Push) CE PE Label Swap P P L2 L1 L3 Label Disposition (PoP) PE CE MPLS core CE CE Label disposition (Pop) – Label Swap PE P P PE By egress PE router; remove label and forward original packet to destination CE “FEC = Set of all packets that are going to be forwarded in exactly the same way” Cisco Systems 8 © 2015 Cisco Systems. All rights reserved. MPLS Labels Label Definition and Encapsulation • Labels used for making forwarding decision • Multiple labels (4 bytes) can be used for MPLS packet encapsulation • Outer label always used for switching MPLS packets in network • Inner labels usually used for services (e.g. Layer 2/Layer 3 VPN) MPLS Label Entry (4 bytes) Label = 20 bits EXP S TTL EXP = Experimental Bits for QoS : 3 Bits; S = Bottom of Stack; TTL = Time to Live Layer 2 MAC Header MPLS Label 4 bytes Layer 3 Packet MPLS Label Stack (1 label) Cisco Systems 9 © 2015 Cisco Systems. All rights reserved. MPLS Path (LSP) Setup Traffic Forwarding • Label Switched Path (LSP) signaling • Exchange of labels • Either Label Distribution Protocol (LDP*) or RSVP for TE (traffic engineering) Leverages IP routing Forwarding Information Base (FIB) table Label bindings to IP addresses Downstream MPLS node advertises what label to use to send traffic to node Forwarding IP MPLS Destination address based Label based Forwarding table learned from control plane Forwarding table learned from control plane TTL support TTL support OSPF, IS-IS, BGP Packet Encapsulation IP Header One or more MPLS labels QoS 8 bit TOS field in IP header 3 bit Traffic Class field in label OAM IP ping, traceroute MPLS OAM MPLS forwarding MPLS Forwarding table Cisco Systems OSPF, IS-IS, BGP Control Plane * Label Distribution Protocol “LDP signaling assumed for next the examples” 10 LDP, RSVP © 2015 Cisco Systems. All rights reserved. MPLS Path (LSP) Setup Signaling Options LDP • Label Distribution Protocol (LDP) signaling Forwarding path LSP – Leverages existing routing • Forwarding Calculation Can use both protocols simultaneously – They work differently, they solve different problems – Dual-protocol deployments are very common Packet Encapsulation Based on IP routing database RSVP TE Tunnel Primary and, optionally, backup Based on TE topology database Shortest-Path based Shortest-path and/or other constraints (CSPF calculation) Single label One or two labels Initiated by head-end node towards tail-end node By each node independently Signaling Uses existing routing protocols/information Uses routing protocol extensions/information Supports bandwidth reservation Supports link/node protection Cisco Systems 11 Cont. © 2015 Cisco Systems. All rights reserved. IP Packet Forwarding Example Basic IP Packet Forwarding • IP routing information exchanged between nodes – Via IGP (e.g., OSFP, IS-IS) • Packets being forwarded based on destination IP address IP Forwarding Table IP Forwarding Table Address I/F Address I/F 128.89 1 128.89 0 171.69 1 171.69 1 … IP Forwarding Table Address I/F 128.89 0 171.69 1 … … – Lookup in routing table 128.89.25.4 1 0 128.89.25.4 Data 0 128.89.25.4 Data 1 1 128.89.25.4 Data 128.89.25.4 Data 171.69.11.1 Cisco Systems 12 © 2015 Cisco Systems. All rights reserved. MPLS Path (LSP) Setup with LDP enabled Step 1: IP Routing (IGP) Convergence • • Enable IGP Routing (OSPF or ISIS) & MPLS LDP on all core links, i.e. PE-P & P-P links Exchange of IP routes in core via: MPLS Forwarding Table MPLS Forwarding Table MPLS Forwarding Table In Address Label Prefix Out Out I’face Label In Address Label Prefix Out Out I’face Label 128.89 1 128.89 0 171.69 1 171.69 1 … … … … In Address Label Prefix 128.89 0 … … – OSPF, IS-IS….,etc. • 0 128.89 Establish IP reachability 0 1 1 You Can Reach 128.89 and 171.69 Thru Me Routing Updates (OSPF, ISIS, …) Cisco Systems Out Out I’face Label 13 You Can Reach 128.89 Thru Me You Can Reach 171.69 Thru Me 171.69 © 2015 Cisco Systems. All rights reserved. MPLS Path (LSP) Setup with LDP enabled Step 2: Assignment of MPLS Labels • • • Local label mapping are sent to connected nodes Receiving nodes update MPLS forwarding table MPLS Forwarding Table MPLS Forwarding Table MPLS Forwarding Table In Address Out Out In Address Out Out In Address ) Out Out Label Prefix I’faceLabel 128.89 1 20 Label Prefix I’faceLabel Label Prefix I’faceLabel 20 128.89 0 30 30 128.89 0 - - 171.69 1 21 21 171.69 1 36 … … … … … … … … … … … 0 128.89 LDP label advertisement 0 1 Use Label 20 for 128.89 and Use Label 21 for 171.69 Label Distribution Protocol (LDP) Cisco Systems … 14 Use Label 30 for 128.89 11 Use Label 36 for 171.69 171.69 © 2015 Cisco Systems. All rights reserved. MPLS Traffic Forwarding with LDP Step 3: Hop-by-hop Traffic Forwarding Using Labels • Ingress PE node adds label to packet (push) – Via MPLS forwarding table • Downstream node use label for forwarding decision (swap) – Outgoing interface – Out MPLS label MPLS Forwarding Table MPLS Forwarding Table MPLS Forwarding Table In Address Out Out Label Prefix I’faceLabel 128.89 1 20 - 171.69 1 21 21 171.69 1 36 … … … … … … … … … … … … 0 128.89 0 1 128.89.25.4 Data 1 128.89.25.4 Data • Egress PE removes label and forwards original packet (pop) Cisco Systems In Address Out Out In Address Out Out Label Prefix I’faceLabel Label Prefix I’faceLabel 20 128.89 0 30 30 128.89 0 - Forwarding based on Label 15 30 128.89.25.4 Data 20 128.89.25.4 Data 171.69 © 2015 Cisco Systems. All rights reserved. MPLS Traffic Forwarding with LDP Summary 1. MPLS technology is widely deployed in Service Provider core networks, MPLS increases the performance by doing forwarding based on labels 2. The MPLS enabled routers (LSRs, LERs) use Label Distribution Protocol (LDP) to assign & distributes labels. 3. The MPLS enabled routers advertise their labels to other MPLS enabled routers, the labels advertise reachability across MPLS network 4. Data packets are forwarded using MPLS labels hence increasing speed & performance in the Service Provider network 5. MPLS label is 4 bytes! Cisco Systems 16 © 2015 Cisco Systems. All rights reserved. MPLS Traffic Engineering Cisco Confidential 17 Agenda • MPLS Traffic Engineering (TE) motivation • MPLS TE Path Selection - Constraint-Based Shortest Path First (CSPF) • MPLS TE signaling – LSP Setup – Resource Reservation Protocol (RSVP) • Summary Cisco Systems © 2015 Cisco Systems. All rights reserved. Link Utilization problem with IGP (OSPF or ISIS) PE3 PE1 P2 40M P1 Cost= 20 Cost= 20 DS3 DS3 PE2 40M P3 OC3 Cost=10 P4 MPLS core Cost=20 DS3 DS3 Cost=20 PE4 P5 IP (Mostly) Uses Destination-Based Least-Cost Routing Flows from PE1, PE2 Merge at P1 and Become Indistinguishable Upper path is overutilized!! Alternate Path Under-Utilized!! IGP = Interior Gateway Protocol (OSPF or ISIS) Cisco Systems © 2015 Cisco Systems. All rights reserved. What MPLS-TE Addresses? • P1 is the HEADEND & sees all links • P1 computes paths on properties other than just shortest cost • No oversubscription! Node Next-Hop PE3 Tunnel0 PE4 Tunnel1 • Tunnel 0, Tunnel 1 are multi-hop tunnels P2 40Mb Tunnel 0 P1 OC3 PE3 P3 OC3 DS3 PE4 Tunnel 1 Tunnel 1 DS3 Tunnel 1 P4 Cisco Systems Tunnel 0 DS3 40Mb MPLS core DS3 OC3 P5 © 2015 Cisco Systems. All rights reserved. TE Terminology • Constraint-Based Shortest Path First (CSPF) only run by Headend – MPLS-TE uses CSPF to create a shortest path based on a series of constraints: Resource Availability User constraints ( tunnel priority,link attributes,metric,….etc.) • Tunnels are UNI-DIRECTIONAL! HEADEND Upstream Cisco Systems MIDPOINT Tunnel Direction TAILEND Downstream © 2015 Cisco Systems. All rights reserved. TE Fundamentals – “Building Blocks” Step 2: CSPF does Path Calculation on headend only – uses IGP advertisements to compute “constrained” paths MPLS core Tunnel Headend node Tail Step 1: Information Distribution IGP (OSPF or ISIS) extensions used to flood bandwidth information between routers Cisco Systems Midpoint Step 3: Path SetupRSVP/TE used to distribute labels, provide LAC, failure notification, etc. © 2015 Cisco Systems. All rights reserved. Path Calculation “Constraint-Based Shortest Path First (CSPF)” Find shortest path to R8 with 8Mbps R1 (Headend) MPLS 15 10 3 5 10 R8 (Tailend) 8 10 10 • Additional link characteristics advertised by OSPF, ISIS TE extensions Interface address Physical bandwidth Maximum reservable bandwidth Administrative group (attribute flags) • IS-IS or OSPF flood link information TE Topology database • TE nodes build a topology database • CSPF uses topology database to find best path for TE • User Constraints and topology database used by CSPF as input to path computation n Link with insufficient bandwidth n Link with sufficient bandwidth Cisco Systems • Tunnel can be signaled via RSVP once a path is found © 2015 Cisco Systems. All rights reserved. TE Path Setup using Resource Reservation Protocol (RSVP) • Tunnel signaled with TE extensions to RSVP • 4 main RSVP messages for TE RSVP PATH message RSVP RESV message RSVP error message (PATHERR,RESVERR) RSVP tear messages (PATHTEAT,RESVTEAR) • Forwarding Table is populated using RSVP labels allocated by RESV messages Head end IP/MPLS Tail end RSVP Label=16 RESV Mid point PATH TE LSP Cisco Systems © 2015 Cisco Systems. All rights reserved. How to map Customer Traffic into TE tunnel? • Multiple traffic selection options: Head end Customer Traffic IP/MPLS 1. Static routes 2. Policy Based Routing • Traffic enters tunnel at head end TE LSP Cisco Systems © 2015 Cisco Systems. All rights reserved. MPLS Traffic Engineering Summary 1. Traffic Engineering (TE) tunnels are used to manipulate the traffic across the Service provider core networks 2. Traffic Engineering (TE) tunnels provide efficient utilization of links based on available bandwidth & defined user constraints. 3. Traffic Engineering (TE) tunnels use CSPF to establish the path & RSVP for signaling the TE tunnels 4. Customer traffic can be mapped to TE tunnels to follow a specific path across the core network & as defined in Service Level Agreements between Service Provider & Customer. Cisco Systems © 2015 Cisco Systems. All rights reserved. MPLS Layer-2 Virtual Private Network (L2 VPN) Cisco Confidential 27 Agenda • Layer-2 Virtual Private Network (VPN) Technology Options • Virtual Private Wire Service (VPWS) overview • Summary Cisco Systems © 2015 Cisco Systems. All rights reserved. Layer 2 VPN (L2 VPN) Services to Customers Service to Customers • Layer-2 VPN Layer-3 VPNs Point to Point services or Virtual Private Wire Services (VPWS) over MPLS Service Provider sells the L2 VPN services to the end Customers (banks, dealers,….etc.) Cisco Systems Layer-2 VPNs Transport in the core network 29 MPLS (LDP/RSVP-TE) MPLS Forwarding © 2015 Cisco Systems. All rights reserved. Layer-2 Virtual Private Networks (L2 VPN) Technology Options- MPLS core Virtual Private Wire Service (VPWS) – MPLS is required in the core – Point-to-point – Referred to as Pseudowires (PWs) • Virtual Private LAN Service (VPLS) – Multipoint relies on flooding – MPLS is required in the core MPLS Layer-2 VPNs Point-to-Point Layer-2 VPNs (VPWS) with MPLS core Multipoint Layer-2 VPNs (MPLS core) xEVPN • xEVPN – Multipoint with optimized routes learning – Optimized for load balancing, redundancy & scale – MPLS is required in the core VPLS PBB-EVPN EVPN Cisco Systems 30 © 2015 Cisco Systems. All rights reserved. Layer-2 VPN Enabler The Pseudo wire Provider Edge (PE) • L2 VPNs are built with Pseudo wire (PW) technology over MPLS networks Provider Edge (PE) • PWs provide a transport to multiple types of network services over a Packet Switched Network (PSN) Packet Switched Network • PW technology provides Like-to-Like transport and also Interworking (IW) • No routing is involved with Customers – Customers can run their own routing,QoS,security,….etc. Pseudo wire FR ATM TDM PPP/HDLC Ethernet Cisco Systems © 2015 Cisco Systems. All rights reserved. Virtual Private Wire Service (VPWS) Overview Cisco Confidential 32 Pseudo wire (PW) Reference Model • An Attachment Circuit (AC) is the physical or virtual circuit attaching a CE to a PE • Customer Edge (CE) equipment perceives a PW as an unshared link or circuit • Provides a point2point service • Discovery: Label Distribution Protocol (LDP) Emulated Layer-2 Service • Signaling: Label Distribution Protocol (LDP) • Emulated services can be: – Virtual Local Area Network (VLAN) – ATM – Frame Relay – HDLC/PPP Pseudo wire (PW) PSN Tunnel Native Service CE1 AC (Ethernet) AC (ATM) PE1 PW1 Native Service PE2 AC (Ethernet) PW2 CE3 CE2 AC (ATM) CE4 Ref: RFC 3985 Pseudo Wire Emulation Edge-to-Edge (PWE3) Architecture Cisco Systems © 2015 Cisco Systems. All rights reserved. VPWS data forwarding Processing Tunnel label swapping through MPLS cloud VC and Tunnel label imposition Push tunnel label Push data traffic label Data traffic VC label disposition Pop Swap Tunnel Label= 34 Tunnel Label =45 VC Label= 28 VC Label= 28 VC Label= 28 Data traffic Data traffic Data traffic PE1 P2 P1 CE-1 MPLS Data traffic PE2 CE-2 Data Traffic direction Cisco Systems © 2015 Cisco Systems. All rights reserved. Summary Cisco Systems 1. Layer-2 VPN enables transport of any traffic over MPLS network by a Service Provider core network 2. Layer-2 VPN is simple & Service Provider has no control or visibility in customer data 3. Label Distribution Protocol (LDP) is used for signaling & discovery between Provider Edge (PE) nodes 4. Typical applications of L2 VPN are layer-2 business VPN services & Data Center Interconnect 5. Customer Layer 2 traffic can be mapped onto a Traffic Engineering (TE) tunnel inside the Service Provider core network 35 © 2015 Cisco Systems. All rights reserved. MPLS Layer-3 Virtual Private Network (L3 VPN) Cisco Confidential 36 Agenda Cisco Systems • MPLS Layer-3 VPN (L3 VPN) fundamentals • Summary © 2015 Cisco Systems. All rights reserved. Layer-3 VPN vs. Layer-2 VPN Layer 3 VPN • Customer end points peer with providers’ routers at Layer 3, i.e. there is routing protocol between Customer & Service Provider • Provider network responsible for distributing routing information to VPN sites • Don’t have to manually fully mesh customer endpoints to support any-to-any connectivity Layer 2 VPNs • Customer endpoints connected via Layer 2 such as Frame Relay, ATM, Ethernet,….etc. connection • Provider network is not responsible for distributing site routers as routing relationship is between the customer endpoints • Provider will need to manually fully mesh end points if any-to-any connectivity is required Cisco Systems © 2015 Cisco Systems. All rights reserved. MPLS Layer-3 VPN Control Plane Basics CE3 iBGP—VPNv4 Label Exchange P1 VRF1 CE4 PE3 VRF1 P2 PE1 VRF2 LDP LDP LDP VRF2 iBGP—VPNv4 iBGP—VPNv4 PE2 CE1 CE2 1. VPN service is enabled on PEs (VRFs are created and applied to VPN site interface) 2. VPN site’s CE1 connects to a VRF enabled interface on a PE1 3. VPN site routing by CE1 is distributed to MP-iBGP on PE1 4. PE1 allocates VPN label for each prefix, sets itself as a next hop and relays VPN site routes to PE3 5. PE3 distributes CE1’s routes to CE2 (Similar happens from CE2 side…) Cisco Systems © 2015 Cisco Systems. All rights reserved. MPLS Layer-3 VPN Packet Forwarding 6 Lookup of VPN label in VRF table 5 Pop MPLS top label Labeled packet forwarded 7 Bank of Amercia Packet forwarded as IP packet VPN label IP packet enters PE on VRF interface VPN label IP packet IP packet Bank of Amercia IP packet VRF interface VRF interface PE 2 1 MPLS label IP packet CE 3 Lookup of destination IP address in VRF table • VPN label pushed • MPLS label pushed CE PE P P swaps MPLS label Site A Cisco Systems 4 MPLS VPN Service Provider Network Site B © 2015 Cisco Systems. All rights reserved. The Full MPLS integrated Network: Layer-3 VPN, Layer-2 VPN, Traffic Engineering technologies Traffic Engineering for Bandwidth protection and restoration Layer 3 Routing protocols available on PE-CE – Static OSPF,BGP CE Internet Layer 3 Routing protocols available on PE-CE – Static, RIPv2, OSPF, EIGRP, eBGP Internet Gateway PE MPLS Backbone CE PE CE CE Layer 2 Circuits available – Ethernet, ATM, Frame Relay, PPP, HDLC Cisco Systems Layer 2 Circuits available Ethernet, ATM, Frame Relay, PPP, HDLC Legend Layer 3 VPN Layer 2 VPN Traffic Engineering © 2015 Cisco Systems. All rights reserved. MPLS session Key Takeaways 1. MPLS networks consist of PE routers at ingress/egress and P routers in the core 2. MPLS forwarding operations is based on MPLS labels, hence it speeds up the performance 3. Label Distribution Protocol (LDP) is used for MPLS signaling 4. Routing protocols (OSPF or ISIS ) enabled in the core network has to be working properly for proper MPLS forwarding operation 5. Traffic Engineering manipulates that path of traffic to better utilize bandwidth & meet Service Level agreements between Service Provider & Customer 6. RSVP is used for TE signaling 7. Layer 3 VPN requires routing between Customer sites & Service Provider 8. Layer 2 VPN does not require routing between Customer sites & Service Provider 9. MPLS & its associated technologies are widely deployed across both Service Provider & Enterprise networks Cisco Systems 42 © 2015 Cisco Systems. All rights reserved. Thank you. Acronyms Acronym Description Acronym Description MPLS Multi Protocol label switching ISIS Intermediate system to intermediate system TE Traffic Engineering LSR Label switch router VPN Virtual Private Network ATM Asynchronous transfer mode LER Label edge router FR Frame relay CSPF Constraint-based shortest path first IP Internet protocol PBR Policy based routing FEC Forwarding equivalence class PW Pseudowire LDP Label distribution protocol VPLS Virtual private LAN service LSP Label switched path VPWS Virtual private wire service TOS Type of service EVPN Ethernet Virtual Private Network RSVP Resource reservation protocol PBB-EVPN OAM Operation, administration, maintenance Provider backbone bridging Ethernet Virtual Private Network BGP Border gateway protocol PSN Packet Switched network VLAN Virtual local area network TTL Time to live HDLC High-level data link control QoS Quality of service PPP Point-to-point protocol IGP Interior gateway protocol IGP Interior gateway protocol OSPF Open shortest path first RIPv2 Routing information protocol version 2 MAC Media Access Control EIGRP Enhanced Interior Gateway Routing Protocol LAC Link Admission Control OAM Operation, Administration & Maintenance Cisco Systems 44 © 2015 Cisco Systems. All rights reserved.