Chapter 5 MPLS Labels There are many examples of label substitution protocols already in existence. • ATM - label is called VPI/VCI and travels with cell. • Frame Relay - label is called a DLCI and travels with frame. • TDM - label is called a timeslot its implied, like a lane. • X25 - a label is an LCN • Proprietary PORS, TAG etc.. • One day perhaps Frequency substitution where label is a light frequency? What is MPLS? • Hop-by-hop or source (explicit) routing to establish labels • Uses label native to the media • Multilevel label substitution transport What is MPLS? Virtual circuit layer underneath IP Virtual circuit = virtual wire = label switched path IP Network (Voice) IP Network (ATM) IP Network (Data) MPLS (Virtual Point-to-Point Circuits) Physical Infrastructure (Point-to-Point Circuits) What is MPLS? Offer service above IP Converged network Realtime voice Best-effort data High priority transactions (ATM, control …) On the same physical infrastructure What is MPLS? MPLS Characteristics Mechanisms to manage traffic flows Is independent of Layer-2 and Layer-3 protocols Maps IP-addresses to fixed length labels Interfaces to existing routing protocols (RSVP, OSPF) Supports ATM, Frame-Relay and Ethernet Why MPLS? Leverage existing ATM hardware Ultra fast forwarding IP Traffic Engineering Constraint-based Routing Virtual Private Networks Controllable tunneling mechanism Voice/Video on IP Delay variation + QoS constraints 7 ROUTE AT EDGE, SWITCH IN CORE IP IP IP Forwarding #L1 IP #L2 LABEL SWITCHING IP #L3 IP IP Forwarding MPLS Terminology LDP: Label Distribution Protocol LSP: Label Switched Path FEC: Forwarding Equivalence Class LSR: Label Switching Router LER: Label Edge Router WHAT IS A LABEL? “labels” called a label stack. A label is a short, four-byte, fixed-length, locally-significant identifier which is used to identify a Forwarding Equivalence Class (FEC). The label which is put on a particular packet represents the FEC to which that packet is assigned. Each label stack entry contains four fields: Label - a 20-bit label value. Exp - a 3-bit Traffic Class field for QoS (quality of service) priority (experimental) and ECN (Explicit Congestion Notification). S - a 1-bit bottom of stack flag. If this is set, it signifies that the current label is the last in the stack. TTL - an 8-bit TTL (time to live) field. FORWARDING EQUIVALENCE CLASS (FEC) Any subset of packets are treated the same way by a router Forwarded out the same interface with the same next hop and label Given the same class of service, output on same queue, given same drop preference, and any other option available to the network operator. When a packet enters the MPLS network at the ingress node, the packet is mapped into an FEC. The mapping can also be done on a wide variety of parameters (as specified by network manager); address prefix (or host), source/destination IP address pair, port numbers, IP protocol ID or ingress interface. This greater flexibility adds functionality to MPLS that is not available in traditional IP routing. FECs also allow for greater scalability in MPLS. The aggregation of flows into FECs of variable granularity provides scalability that meets the demands of the public Internet as well as enterprise applications. In the current LDP specification, only 3 types of FECs are specified: IP Address Prefix Router ID Flow (port, dest-addr, src-addr etc.) The spec. states that new elements can be added as required. How Does MPLS Work? Packets are tagged and routed based on tags. All traffic with the same label treated the same 13 5 IP Routing Layer Payload Payload IP Routing Layer LSR Payload Payload 13 Payload 5 Payload LER LER 13 Payload Payload 5 Payload Payload Other Features of MPLS Label forwarding distinct from IP forwarding May make non-shortest paths Label routing linked to IP routing IP Forwarding LER (Perform Labeling) LSR Cloud (Forward by label) IP Forwarding LER (Remove Label) LSR Cloud (Forward by label) MPLS BUILT ON STANDARD IP Dest 47.1 47.2 47.3 Dest 47.1 47.2 47.3 Out 1 2 3 Out 1 2 3 1 47.1 3 1 Dest 47.1 47.2 47.3 Out 1 2 3 2 3 2 1 47.2 47.3 3 2 • Destination based forwarding tables as built by OSPF, IS-IS, RIP, etc. IP FORWARDING USED BY HOPBY-HOP CONTROL Dest 47.1 47.2 47.3 Dest 47.1 47.2 47.3 Out 1 2 3 1 47.1 1 Dest 47.1 47.2 47.3 Out 1 2 3 IP 47.1.1.1 2 IP 47.1.1.1 3 Out 1 2 3 2 IP 47.1.1.1 1 47.2 47.3 3 2 IP 47.1.1.1 MPLS Label Distribution Intf Label Dest Intf Label In In Out Out 3 0.50 47.1 1 0.40 Intf In 3 Label Dest Intf In Out 0.40 47.1 1 1 Request: 47.1 3 Intf Dest Intf Label In Out Out 3 47.1 1 0.50 3 2 1 1 47.3 3 47.1 Mapping: 0.40 2 47.2 2 Label Switched Path (LSP) Intf Label Dest Intf Label In In Out Out 3 0.50 47.1 1 0.40 Intf Dest Intf Label In Out Out 3 47.1 1 0.50 2 2 47.2 2 IP 47.1.1.1 3 1 47.3 3 Label Dest Intf In Out 0.40 47.1 1 IP 47.1.1.1 1 47.1 3 1 Intf In 3 LABEL EDGE ROUTER (LER) Can be an ATM switch or a router Ingress LER performs the following: Receives the packet Adds label Forwards the packet into the MPLS domain Egress LER removes the label and delivers the packet LABEL EDGE ROUTER (LER) LABEL SWITCHING ROUTER (LSR) A router/switch that supports MPLS Can be a router Can be an ATM switch + label switch controller Label swapping Each LSR examines the label on top of the stack Uses the Label Information Base (LIB) to decide the outgoing path and the outgoing label Removes the old label and attaches the new label Forwards the packet on the predetermined path LABEL SWITCHING ROUTER (LSR) Upstream Router (Ru) – router that sends packets Downstream Router (Rd) – router that receives packets Need not be an end router Rd for one link can be the Ru for the other Ru Rd Ru Rd LABEL SWITCHING ROUTER (LSR) POSITIONS OF LERs & LSRs LABEL SWITCHED PATH (LSP) LSP defines the path through LSRs from ingress to egress router FEC is determined at the LER-ingress LSPs are unidirectional LABEL SWITCHED PATH (LSP) LSP LSP ROUTE SELECTION Refers to the method of selecting an LSP for a particular FEC Done by LDP Set of procedures and messages Messages exchanged between LSRs to establish an LSP LSRs associate an FEC with each LSP created Two types of LDP Hop by hop routing Explicit routing ROUTE SELECTION Hop-by-Hop Routing Explicit Routing • Distributes routing of control traffic • Source routing of control traffic • Builds a set of trees either fragment by fragment like a random fill, or backwards, or forwards in organized manner. • Builds a path from source to destination • Reroute on failure impacted by convergence time of routing protocol • LSPs can be ranked so some reroute very quickly and/or backup paths may be pre-provisioned for rapid restoration • Existing routing protocols are destination prefix based • Difficult to perform traffic engineering, QoS-based routing • Requires manual provisioning, or automated creation mechanisms. • Operator has routing flexibility (policybased, QoS-based, • Adapts well to traffic engineering Explicit routing shows great promise for traffic engineering Explicit Routing - MPLS vs. Traditional Routing •Connectionless nature of IP implies that routing is based on information in each packet header •Source routing is possible, but path must be contained in each IP header •Lengthy paths increase size of IP header, make it variable size, increase overhead •Some gigabit routers require ‘slow path’ option-based routing of IP packets •Source routing has not been widely adopted in IP and is seen as impractical •Some network operators may filter source routed packets for security reasons •MPLS’s enables the use of source routing by its connection-oriented capabilities - paths can be explicitly set up through the network - the ‘label’ can now represent the explicitly routed path •Loose and strict source routing can be supported MPLS makes the use of source routing in the Internet practical Label Distribution Protocol (LDP) Label Distribution Protocol (LDP) set of procedures by which LSRs establish LSPs mapping between network-layer routing information directly to data-link layer switched paths LDP peers: two LSRs which use LDP to exchange label/stream mapping information exchange known as “LDP Session” Label Distribution Protocol (LDP) Purpose Label distribution ensures that adjacent routers have a common view of FEC <-> label bindings Routing Table: Routing Table: Addr-prefix 47.0.0.0/8 Addr-prefix 47.0.0.0/8 Next Hop LSR2 Next Hop LSR3 LSR1 IP Packet LSR3 LSR2 47.80.55.3 Label Information Base: Label-In FEC Label-Out XX 47.0.0.0/8 17 Step 3: LSR inserts label value into forwarding base For 47.0.0.0/8 use label ‘17’ Label Information Base: Label-In FEC Label-Out 17 47.0.0.0/8 XX Step 2: LSR communicates binding to adjacent LSR Step 1: LSR creates binding between FEC and label value Common understanding of which FEC the label is referring to! Label distribution can either piggyback on top of an existing routing protocol, or a dedicated label distribution protocol (LDP) can be created Label Distribution - Methods Label Distribution can take place using one of two possible methods Downstream Label Distribution LSR1 Downstream-on-Demand Label Distribution LSR2 Label-FEC Binding • LSR2 and LSR1 are said to have an “LDP adjacency” (LSR2 being the downstream LSR) LSR1 LSR2 Request for Binding Label-FEC Binding • LSR2 discovers a ‘next hop’ for a particular FEC • LSR1 recognizes LSR2 as its next-hop for an FEC • LSR2 generates a label for the FEC and communicates the binding to LSR1 • A request is made to LSR2 for a binding between the FEC and a label • LSR1 inserts the binding into its forwarding tables • If LSR2 recognizes the FEC and has a next hop for it, it creates a binding and replies to LSR1 • If LSR2 is the next hop for the FEC, LSR1 can use that label knowing that its meaning is understood • Both LSRs then have a common understanding Both methods are supported, even in the same network at the same time For any single adjacency, LDP negotiation must agree on a common method Distribution Control: Ordered v. Independent MPLS path forms as associations are made between FEC next-hops and incoming and outgoing labels Next Hop (for FEC) Incoming Label Independent LSP Control Definition Comparison • Each LSR makes independent decision on when to generate labels and communicate them to upstream peers • Communicate label-FEC binding to peers once next-hop has been recognized • LSP is formed as incoming and outgoing labels are spliced together • Labels can be exchanged with less delay • Does not depend on availability of egress node • Granularity may not be consistent across the nodes at the start • May require separate loop detection/mitigation method Outgoing Label Ordered LSP Control • Label-FEC binding is communicated to peers if: - LSR is the ‘egress’ LSR to particular FEC - label binding has been received from upstream LSR • LSP formation ‘flows’ from egress to ingress • Requires more delay before packets can be forwarded along the LSP • Depends on availability of egress node • Mechanism for consistent granularity and freedom from loops • Used for explicit routing and multicast Both methods are supported in the standard and can be fully interoperable Label Retention Methods An LSR may receive label bindings from multiple LSRs Binding for LSR5 LSR1 LSR5 Some bindings may come from LSRs that are not the valid next-hop for that FEC Binding for LSR5 Binding for LSR5 Liberal Label Retention Label Bindings for LSR5 LSR4 Label Bindings for LSR5 LSR1 LSR3 Valid Next Hop LSR3 Conservative Label Retention LSR2 LSR4’s Label LSR3’s Label LSR2’s Label LSR2 LSR4 • LSR maintains bindings received from LSRs other than the valid next hop • If the next-hop changes, it may begin using these bindings immediately • May allow more rapid adaptation to routing changes • Requires an LSR to maintain many more labels LSR2 LSR1 LSR3 LSR4’s Label LSR3’s Label LSR2’s Label Valid Next Hop LSR4 • LSR only maintains bindings received from valid next hop • If the next-hop changes, binding must be requested from new next hop • Restricts adaptation to changes in routing • Fewer labels must be maintained by LSR Label Retention method trades off between label capacity and speed of adaptation to routing changes MPLS Header Lightweight 8 bit TTL 20 bit label tag 3 bit QoS tag 1 bit stack Indicates last LSR tag Allows heirarchical tagging 13 Payload 13 5 13 Payload 8 13 Payload Payload Provisioning vs. Signaling Signaling Seconds Provisioning Minutes to days Separate control message protocol Distribute labels and forwarding info RSVP Label Distribution Protocol Comparing MPLS to IP IP over MPLS vs IP only Qos Performance Tunneling VPN Traffic Engineering MPLS vs IP: QoS MPLS Per hop QoS Using labels to prioritize 20 bit identifier space IP Per hop QoS Use IP&TCP header 104 bit identifier space MPLS vs IP: Performance MPLS Forward on short tags Not prefix match on address IP Routers can forward at gigabit/s MPLS vs IP: Tunneling (VPN) MPLS Lightweight tunnels 32 bit header No security IP Heavyweight tunnels ~160 (?) bit header No security (without IPSEC) MPLS vs IP: Traffic Engineering MPLS Arbitrary (non-shortest) paths Virtual circuits MPLS routing linked to IP routing Flexible aggregation IP Route announcement manipulation Path cost manipulation MPLS vs IP: Future QoS MPLS Propagate QoS between networks RSVP IP Propagate QoS between networks RSVP MPLS Advantages & Disadvantages Advantages: Improves packet-forwarding performance in the network Supports QoS and CoS for service differentiation Supports network scalability Improves the possibilities for traffic engineering Integrates IP and ATM in the network Builds interoperable networks Disadvantages: An additional layer is added The router has to understand MPLS Summary of Motivations for MPLS • Simplified forwarding based on exact match of fixed length label - initial drive for MPLS was based on existance of cheap, fast ATM switches • Separation of routing and forwarding in IP networks - facilitates evolution of routing techniques by fixing the forwarding method - new routing functionality can be deployed without changing the forwarding techniques of every router in the Internet • Facilitates the integration of ATM and IP - allows carriers to leverage their large investment of ATM equipment - eliminates the adjacency problem of VC-mesh over ATM •Enables the use of explicit routing/source routing in IP networks - can be easily used for such things as traffic management, QoS routing •Promotes the partitioning of functionality within the network - move granular processing of packets to edge; restrict core to packet forwarding - assists in maintaining scalability of IP protocols in large networks •Improved routing scalability through stacking of labels - removes the need for full routing tables from interior routers in transit domain; only routes to border routers are required •Applicability to both cell and packet link-layers - can be deployed on both cell (eg. ATM) and packet (eg. FR, Ethernet) media - common management and techniques simplifies engineering Many drivers exist for MPLS above and beyond high speed forwarding