Lecture #23 - Multi-Protocol Label Switching (MPLS)
Or where IP meets ATM... well, almost!
What is MPLS?
Multi-Protocol Label Switching (MPLS) is a routing/switching protocol that provides a unified delivery service for both circuit based and packet switched data. To some extent it attempts to combine the connection-oriented, fast switching, Quality of Service (QoS) and traffic management aspects of ATM with the flexibility of IP routing.
Rather than inspecting the "Layer 3" (network) traffic at each router, a routing decision is made once prior to admission to the core network. A label is then added to the traffic and the data is sent into the network. All forwarding and routing decisions are now based on the label, which will get removed and replaced as the packet traverses the network.
Originally the main aim of MPLS was to reduce the overhead incurred by core routers, however this is less of an issue due to the general increase in available processing power. These days the interest is in the flexibility that it provides, coupled with the QoS, VPN and traffic engineering aspects.
IP Networks Revisited
Hopefully by now the concepts of IP networking are quite familiar. Just to quickly summarise:
- IP is connectionless - each datagram is treated as a completely individual unit.
- Routing of IP datagrams is performed on a per-hop basis.
- No single path through the network - datagrams between the same hosts can be routed over different paths.
- Designed to be reliable and "self-healing".
- Requires intelligence within the network to perform routing decisions.
- Difficult to implement QoS due to the connectionless behaviour.
ATM Revisited
Recall from Data Communications, that ATM is designed to efficiently switch small (53 byte) fixed size messages through an ATM network. A virtual path is established prior to communication and no routing is performed within the network.
- Switching is very fast due to the fixed cell size and pre-established path.
- Very little intelligence/processing required in the network.
- Once a ATM circuit is established, data flow is effectively guaranteed (cells are never re-ordered and almost never dropped).
- Primarily designed for voice traffic.
- IP over ATM is rather inefficient due to the need for ATM Adaptation Layer (AAL) and the need to split an IP datagram into 48 byte blocks, each with the overhead of a 5 byte header.
- Cannot perform broadcast over ATM - have to use other "kludges" to implement things such as ARP.
Is There a Happy Medium?
Possibly - MPLS combines aspects of ATM, IP routing, Integrated Services and Differentiated Services.
In summary:
- Establish fixed paths through the network to facilitate fast routing (ala ATM).
- Inspect packets at edge of MPLS network and assign a label based on the selected path and type of service (ala DiffServ).
- Establish a Forwarding Equivalence Class (FEC) for a fixed path, with QoS (ala IntServ).
- Use labels which determine a per-hop behaviour for each packet (IPish).
How Does MPLS Work?
An MPLS network is formed using Label Switched Routers (LSRs), which simply switch or route packets based on the label prepended to the packet. When a packet is to enter and MPLS domain the Ingress LSR will select a Label Switched Path (LSP) that the packet will take to reach its destination. A label is prepended to the packet and it is sent to its next hop.
The receiving LSR will inspect the MPLS label and determine the next hop based on this information (the actual encapsulated protocol is not examined). The label may be removed and replaced with a new label specifying its next hop, or an additional MPLS label may be stacked on top of the existing label(s).
More on Labels
The label format used by MPLS is one of the reasons that it is highly efficient to switch/route and requires little in the way of processing within the network. The label is a fixed size (4 bytes) and is only locally significant - the label makes no sense out of context of the current router.
- Label Value - locally significant 20 bit label.
- Exp - reserved for experimental use (3 bits).
- S - Bottom of stack label. Set to 1 for first label on stack, 0 for all others (1 bit).
- Time to Live - hop count (8 bits).
Label Switched Paths (LSPs)
Before packets can be sent across an MPLS network, one or more Label Switched Paths (LSPs) need to be established. An LSP effectively defines the route or path that traffic will take through the network.
An LSP is established via the use of a signaling protocol such as LDP, RSVP-TE or CR-LDP. The path established will be based on the Forwarding Equivalence Class (FEC) criteria, so that the QoS constraints are met.
MPLS Signalling
MPLS signalling can be achieved via a number protocols, all of which result in a LSP being installed into the MPLS LSRs.
Label Distribution Protocol
The Label Distribution Protocol (LDP) makes use of the information provided by the underlying interior routing protocol. The data in the router's Forwarding Information Database (FIB) is used to determine the hop-by-hop path through the network. The LSP is then inserted into the LSR databases for MPLS forwarding.
CR-LDP
Constraint-base Routing Label Distribution Protocol (CR-LDP) is an extension to LDP which provides for traffic engineering constraints to be included as part of the LSP.
RSVP-TE
The Resource ReServation Protocol (RSVP) can be used with Traffic Engineering (TE) extensions to establish MPLS LSPs whilst taking the network characteristics into consideration so that QoS constraints can be met.
Label Stacking
Due to the fact that multiple labels can be added to a packet, MPLS allows for networks to be easily overlaid in such a way that the MPLS forwarding tables become much smaller, especially in the core network.
MPLS VPNs
Due to the fact that a connection is established in the form of an LSP, it becomes quite simple and effective to extend MPLS for use as a VPN. In this case data from one site is simply tagged, enters the MPLS network and exits the MPLS network within another private network. The MPLS network has effectively provided the isolation needed for this to occur.
Presumably if the MPLS network is being operated by a third party some form of encryption would still be required to maintain privacy and confidentiality.
References
Cisco - MPLS FAQ for Beginners
MPLS Whitepaper by William Stallings