Multi-Protocol Label Switching


Published on

Published in: Business, Technology
  • Be the first to comment

Multi-Protocol Label Switching

  1. 1. MPLS The Telecom Source 10 Slide Technology Series
  2. 2. Introduction <ul><li>MPLS stands for M ulti- P rotocol L abel S witching </li></ul><ul><li>MPLS was originally introduced to improve the forwarding speed of routers </li></ul><ul><li>MPLS has now also emerged as a solution for meeting bandwidth management requirements in IP based backbone networks </li></ul><ul><li>Most IP routing protocols are based on shortest path through the network and do not consider metrics such as delay, jitter and traffic congestion. </li></ul><ul><li>MPLS addresses issues related to routing based on quality of service (QoS) metrics, and enables the efficient passage of data through the network </li></ul><ul><li>MPLS can exist over any data link layer (layer 2) technology including ATM and Frame Relay </li></ul>
  3. 3. Key Terms and Concepts <ul><li>Destination IP addresses are mapped to MPLS labels when packets enter an MPLS network. These labels are attached to the packet. </li></ul><ul><li>MPLS routers forward packets based on the MPLS label of the packet rather than the destination IP address </li></ul><ul><li>There are two types of routers in an MPLS network </li></ul><ul><ul><li>Label Edge Routers (LER) are located at the edge of the network and interface with multiple dissimilar networks such as ATM, Frame Relay and Ethernet and forwards this traffic on to the MPLS network after establishing data transmission paths. The LER assigns and removes MPLS labels on traffic entering or leaving the MPLS network </li></ul></ul><ul><ul><li>Label Switch Routers (LSR) are high speed routers in the core network that help establish the data transmission paths through the MPLS network and support high speed switching </li></ul></ul><ul><ul><li>Note that some vendors refer to LERs as provider edge (PE) routers and LSRs as provider (P) core routers </li></ul></ul><ul><li>The data transmission paths through an MPLS network are referred to as label switched paths (LSP) </li></ul><ul><ul><li>An LSP defines the ingress-to-egress path of a packet through an MPLS network. The LSP can be thought of as sequences of labels at each and every node along the path that determines the route of a packet through the network. LSPs are functionally equivalent to virtual circuits. </li></ul></ul><ul><ul><li>LSPs are established either prior to data transmission or upon the flow of data </li></ul></ul><ul><ul><li>LSPs are connection oriented and unidirectional </li></ul></ul>
  4. 4. Forward Equivalence Class <ul><li>Forward Equivalence Class (FEC) is a set of packets that share similar transport requirements and are treated the same for forwarding purposes. FECs may be based a variety of characteristics including: </li></ul><ul><ul><ul><li>Destination unicast or multicast address (IP address or IP prefix); </li></ul></ul></ul><ul><ul><ul><li>Source address or virtual private network (VPN); </li></ul></ul></ul><ul><ul><ul><li>Class of service; </li></ul></ul></ul><ul><ul><ul><li>Various combinations of the above </li></ul></ul></ul><ul><li>A packet is assigned to an FEC by the LER as it enters the MPLS network. This operation is only done once for each packet </li></ul><ul><li>Packets are assigned labels at the LER based on the FEC to which the packet belongs. Labels are bound to FECs. </li></ul><ul><li>Each LSR has an associated forwarding table to specify how a packet is to be forwarded based on its label </li></ul>
  5. 5. MPLS Labels <ul><li>MPLS labels are analogous to connection identifiers such as VPI/VCI in ATM and DLCI in Frame Relay. </li></ul><ul><li>MPLS label values are of local only to the link between adjacent LSRs and have no global significance </li></ul><ul><li>MPLS labels are simple, unstructured, fixed length identifiers. </li></ul><ul><li>MPLS labels are encapsulated in layer 2 headers if available or in standardized MPLS headers </li></ul><ul><ul><ul><li>If the layer 2 technology supports a label field such as ATM VPI/VCI or Frame Relay DLCI fields, the native label field encapsulates the MPLS label. </li></ul></ul></ul><ul><ul><ul><li>If the layer 2 technology does not support a label field, the MPLS label is encapsulated in a standardized MPLS header inserted between the layer 2 and IP headers. This permits any link layer technology to carry an MPLS label </li></ul></ul></ul>20 bits 3 bits 1 bit 8 bits Label – carries the MPLS label CoS – the class of service bits can be use to determine the treatment of the packets in the network Stack (S) – this supports the hierarchical label stack TTL (time-to-live) – provides conventional IP time-to-live functionality (32 bits) MPLS Header Format User data IP header MPLS header Layer 2 header TTL S CoS Label
  6. 6. Forwarding Table <ul><li>The forwarding table is a set of entries in a table that enable the MPLS router to determine how to forward incoming packets </li></ul><ul><li>The forwarding table associates incoming packet labels (“in-labels”) with out-going packet labels (“out-labels”) and interfaces </li></ul><ul><li>The incoming label uniquely identifies an entry in the forwarding table </li></ul><ul><li>Each entry in the forwarding table contains an interface-inbound label pair mapped to an interface-outbound label pair </li></ul><ul><li>The LSR examines the MPLS label on an incoming packet, performs an exact label match in the forwarding table, and determines the out-going label to attach to the packet and out-going interface on which to forward the packet </li></ul>MPLS Forwarding Table Out-Label Out-Interface In-Label In-Interface … … … … 22 6 29 1 6 3 17 1 … … … …
  7. 7. Basic Forwarding Operation <ul><li>At the ingress LER, each packet is classified as a new or existing FEC and assigned a label. </li></ul><ul><li>The LER maps incoming packets to FECs using a longest-match routing table look-up. The longest match algorithm selects the routing table entry with the most specific IP prefix that matches the destination IP address. </li></ul><ul><li>Once a packet has been labeled, the rest of the journey of the packet through the MPLS network is based on label switching </li></ul><ul><li>The LER forwards the packet on the appropriate egress interface as dictated by its forwarding table </li></ul><ul><li>Core LSRs use the input port and label combination to perform an exact match search of the forwarding table and determine the outgoing interface and label. </li></ul><ul><li>The receiving LSR examines the packet for its MPLS “in-label”. The LSR matches the in-label in its forwarding table and determines the appropriate out-label and egress interface. The in-label is replace by the out-label and the packet is forwarded on the appropriate egress interface. </li></ul>
  8. 8. Basic Forwarding Operation …cont’d <ul><li>The above process continues until the packet arrives at the egress LER. </li></ul><ul><li>When a packet arrives at an egress LER, the LER searches its forwarding table for the next hop. If the next hop is not a label switch, the egress LER discards the label and forwards the packet using conventional longest-match IP forwarding </li></ul><ul><li>MPLS supports 2 methods of transmission: </li></ul><ul><ul><ul><li>Hop-by-hop routing – each LSR selects the next hop based on FEC. The LDP, CR-LDP and RSVP protocols can be used to establish hop-by-hop routing </li></ul></ul></ul><ul><ul><ul><li>Explicit routing – the precise path from the ingress to the egress is specified. Explicit routes may be strict where all the nodes are clearly specified, or loose, where all all the nodes are not specified. </li></ul></ul></ul> Destination IP address 3 Label 5 Label 7 Label Destination IP address LER LER LSR LSR Typical Forwarding Operation Assign label Layer 2 transport 3 10.1/16 Out label IP addr Swap label 5 3 Out label In label Layer 2 transport Remove label 5 Next Hop In label Swap label 7 5 Out label In label
  9. 9. Basic Control Operation <ul><li>In order for MPLS routers to operate, the forwarding tables at each LER and LSR must be populated with the inbound to outbound interface and label mappings. The process is called LSP set-up or the label distribution process. </li></ul><ul><li>There are multiple protocols available for LSP set-up including: </li></ul><ul><ul><ul><li>LDP – label distribution protocol (recommended protocol generally used) </li></ul></ul></ul><ul><ul><ul><li>CR-LDP – constrained-based routing label distribution protocol </li></ul></ul></ul><ul><ul><ul><li>RSVP – resource reservation protocol </li></ul></ul></ul><ul><ul><ul><li>piggy-backing on routing protocols such as BGP and OSPF </li></ul></ul></ul><ul><li>Every label that is distributed must be bound to an entry in the forwarding table. This binding must be performed in the local LSR or be supplied by a remote LSR </li></ul><ul><li>MPLS uses downstream binding in which locally bound labels are used for incoming labels and remotely bound labels are used as outgoing labels. The MPLS labels are established as follows: </li></ul><ul><ul><ul><li>Incoming label is provided by creating a local binding between an FEC and the label </li></ul></ul></ul><ul><ul><ul><li>Outgoing label is provided by a remote binding between the FEC and the label </li></ul></ul></ul><ul><ul><ul><li>Next hop is provided by the routing protocols. This is the FEC to next hop mapping </li></ul></ul></ul>
  10. 10. MPLS Virtual Private Network Example PE1 PE2 PE3 CE1 CE2 CE3 CE4 CE5 CE6 CE7 CE8 VRF VRF VRF VRF VRF VRF VRF Site 1 Red VPN 10.1/16 Site 2 Blue VPN 10.5/16 Site 3 Green VPN 10.1/16 Site 4 Red VPN 10.2/16 Site 5 Blue VPN & Green VPN 10.4/16 Site 6 Green VPN 10.2/16 Site 7 Green VPN 10.3/16 Site 8 Red VPN 10.3/16 If_11 If_12 If_13 If_21 If_22 If_33 If_31 If_32 Interface: if_11 RD = RD_1 Export target = red Import target = red Interface: if_21 RD = RD_4 Export target = red Import target = red Interface: if_33 RD = RD_67 Export target = green Import target = green red VPN blue VPN green VPN green, blue VPNs If_1b If_1c If_2b If_2c If_2b If_2c Interface: if_13 RD = RD_3 Export target = green Import target = green Interface: if_22 RD = RD_5 Export target = green, blue Import target = green, blue 2002 12 If_1a 10.4/16 3003 13 If_1b 10.3/16 3002 13 If_1b 10.2/16 1003 If_13 10.1.16 VRF Green 2002 12 If_1a 10.4/16 1002 If_12 10.5/15 VRF Blue 3001 13 If_1b 10.3/16 2001 12 If_1a 10.2/16 1001 If_11 10.1/16 VRF Red Inner Lable Outer Label Output IF Route PE1 3003 23 If_2b 10.3/16 VRF Brown 1002 21 If_2a 10.5/16 3002 23 If_2b 10.2/16 1003 21 If_2a 10.1/16 2002 If_22 10.4/16 3001 23 If_2b 10.3/16 1001 21 If_2a 10.1/16 2001 If_21 10.2/16 VRF Red Inner Lable Outer Label Output IF Route PE1 2002 32 If_3a 10.4/16 1003 31 If_3b 10.1/16 3003 If_33 10.3/16 3002 If_32 10.2/16 VRF Green 2001 32 If_3a 10.2/16 1001 31 If_3b 10.1/16 3001 If_31 10.3/16 VRF Red Inner Lable Outer Label Output IF Route PE1
  11. 11. MPLS Virtual Private Network Example …cont’d <ul><li>The customer sites to which a service provider enables IP connectivity by applying a routing policy constitutes a VPN </li></ul><ul><li>Every PE maintains a number of VPN routing and forwarding tables (VRF) </li></ul><ul><ul><ul><li>Each site (CE) is associated with a forwarding table (VRF) based on the VPNs to which the site has membership </li></ul></ul></ul><ul><ul><ul><li>Two CEs being served by the same PE and belonging to the same VPN can be associated with the same VRF (e.g. sites 6 and 7) </li></ul></ul></ul><ul><ul><ul><li>A CE belonging to multiple VPN can be associated with a single VRF (e.g. site 5) </li></ul></ul></ul><ul><li>The RT and RD parameters must be defined at VRF creation time </li></ul><ul><ul><ul><li>RT (router target) – enables the import/export of VPN routes to the relevant remote sites </li></ul></ul></ul><ul><ul><ul><li>RD (route distinguisher) – 8 byte prefix provides the ability to distinguish between VPNs with overlapping IP addresses (e.g. site1 and site3 in diagram) </li></ul></ul></ul><ul><li>For VPN sites to be attached and operational: </li></ul><ul><ul><ul><li>VPN routes must be distributed between PEs through the backbone (e.g. via BGP, RIP, OSPF). VPN routes are distributed as IPv4 routes prefixed with the RD </li></ul></ul></ul><ul><li>When a PE receives routes from a CE over a VRF sub-interface, it stores them in IPv4 format. In the VRF they are: </li></ul><ul><ul><ul><li>Associated to the VRF sub-interface </li></ul></ul></ul><ul><ul><ul><li>Assigned a label value (VPN label or inner label) </li></ul></ul></ul><ul><li>Once the PE has learnt local routes from its CEs, it advertises them to the other PEs according to RD and route targets that were defined at VRF creation time </li></ul>
  12. 12. The Telecom Source [email_address]