The exponential growth of the Internet over the past several years has placed a tremendous strain on the service provider networks. Not only has there been an increase in the number of users but there has been a multifold increase in connection speeds, backbone traffic and newer applications. Initially ordinary data applications required only store and forward capability in a best effort manner. The newer applications like voice, multimedia traffic and real-time e-commerce applications are pushing toward higher bandwidth and better guarantees, irrespective of the dynamic changes or interruptions in the network.
To honor the service level guarantees, the service providers not only have to provide large data pipes (which are also costlier), but also look for architectures which can provide & guarantee QoS guarantees and optimal performance with minimal increase in the cost of network resources.
MPLS technology enables Service Providers to offer additional services for their customers, scale their current offerings, and exercise more control over their growing networks by using its traffic engineering capabilities. On the other hand, Diffserv using its scalable differentiation enables differential pricing scheme for providing differential QoS. Putting it simply, MPLS is a switching technology used to get packets from one place to another through a series of hops while DiffServ governs what happens to the packet at each hop. The marriage of these two technologies, Diffserv over MPLS, provides another interesting alternative solution to the bag of existing ones.
On the other hand, compared to Diffserv over MPLS which is still an evolving technology, SNMP is a widely deployed network management protocol capable of catering to a large number of device classes.SNMP, being such a widely accepted and understood management protocol standard, can be effectively used to gather traffic characteristics from the routers in the core network. The information gathered can be used for provisioning and for traffic engineering by the network operators at the Network Operating Centre (NOC). In this section, we will cover MPLS basics and other details related to MPLS.
IP-based networks typically lack the quality-of-service features available in circuit-based networks, such as Frame Relay and ATM. MPLS brings the sophistication of a connection-oriented protocol to the connectionless IP world. Based on simple improvements in basic IP routing, MPLS brings performance enhancements and service creation capabilities to the network.
MPLS stands for Multiprotocol Label Switching; multiprotocol because its techniques are applicable to ANY network layer protocol, of which IP is the most popular.
Before explaining MPLS, here are some of the terms which are used extensively in MPLS jargon:
1. Forwarding Equivalence Class (FEC): a group of IP packets which are forwarded in the same manner (e.g., over the same path, with the same forwarding treatment).
2. MPLS header: The 32-bit MPLS header contains the following fields:
i. The label field (20-bits) carries the actual value of the MPLS label.
ii. The Class of Service (CoS) field (3-bits) can affect the queuing and discard algorithms applied to the packet as it is transmitted through the network. Since the CoS field has 3 bits, therefore 8 distinct service classes can be maintained.
iii. The Stack (S) field (1-bit) supports a hierarchical label stack. Although MPLS supports a stack, the processing of a labeled packet is always based on the top label, without regard for the possibility that some of other labels may have been above it in the past, or that some number of other labels may be below it at present. An unlabeled packet can be thought of as a packet whose label stack is empty (i.e., whose label stack has depth 0). If a packet’s label stack is of depth m, we refer to the label at the bottom of the stack as the level 1 label, to the label above it (if such exists) as the level 2 label, and to the label at the top of the stack as the level m label. The label stack is used for routing packets through LSP Tunnels.
iv. The TTL (time-to-live) field (8-bits) provides conventional IP TTL functionality.
3. If the Layer 2 technology supports a label field (such as the ATM VPI/VCI or the Frame Relay DLCI fields), the native label field encapsulates the MPLS label. However, if the Layer 2 technology does not support a label field, the MPLS label is encapsulated in a standardized MPLS header that is inserted between the Layer 2 and IP headers.
4. MPLS label: is a short fixed length physically contiguous identifier which is used to identify a FEC, usually of local significance. 
5. Label Switched Path (LSP): The path through one or more LSRs at one level of the hierarchy which is followed by packets in a particular FEC. 
In conventional IP forwarding, a particular router will typically consider two packets to be in the same FEC if there is some address prefix X in that router’s routing tables such that X is the “longest match” for each packet’s destination address.As the packet traverses the network, each hop in turn reexamines the packet and assigns it to a FEC.
On the other hand, in MPLS, the assignment of a particular packet to a particular FEC is done just once, as the packet enters the network.The FEC to which the packet is assigned is encoded as a label.When a packet is forwarded to its next hop, the label is sent along with it. At subsequent hops, there is no further analysis of the packet’s network layer header.Rather, the label is used as an index into a table which specifies the next hop, and a new label.
The old label is replaced with the new label, and the packet is forwarded to its next hop.
The initial goal of label based switching was to bring the speed of Layer 2 switching to Layer 3. Label based switching methods allow routers to make forwarding decisions based on the contents of a simple label, rather than by performing a complex route lookup based on destination IP address. This initial justification for technologies such as MPLS is no longer perceived as the main benefit, since Layer 3 switches (ASIC-based routers) are able to perform route lookups at sufficient speeds to support most interface types.
However, MPLS brings many other benefits to IP-based networks. Forwarding packets based on labels rather than routing them based on headers results in several important advantages:
- Since a packet is assigned to a FEC when it enters the network, information that cannot be gleaned from the network layer header, can be used for FEC assignment. For example, classification of packets based on the source of the packets.
- Packets can be assigned a priority label, making Frame Relay and ATM-like quality-of-service guarantees possible. This function relates to the CoS field.
- The considerations that determine how a packet is assigned to a FEC can become ever more and more complicated, without any impact at all on the routers that merely forward labeled packets.
- Packet payloads are not examined by the forwarding routers, allowing for different levels of traffic encryption and the transport of multiple protocols.
- In MPLS, a packet can be forced to follow an explicit route rather than the route chosen by normal dynamic algorithm as the packet travels through the network. This may be done to support traffic engineering, as a matter of policy or to support a given QoS.
In addition to all the above advantages, one of the most important advantages of MPLS is that it is independent of the layer 2 and layer 3 technologies and hence allows integration of networks with different layer 2 and layer 3 protocols.
Few components play role in creating MPLS network
- IGP: Core Routing Protocol
- MPLS Label
- Encapsulation of MPLS Label
- Forwarding Equivalence Class
- Label Distribution Protocol
- MPLS Application related protocols: MP-BGP, RSVP… etc.
IGP: Core Routing Protocol
Let’s take a look at the key players if I wanted to build my MPLS network what components am I looking at or as a subscriber I am handing my traffic to Service Provider or MPLS Provider and you want to know what’s going on in their network and how your traffic is handled so that you gain confidence and faith in the service provider services or MPLS provider services and in this MPLS technology. So IGP is a core routing protocol that the Service Provider runs in their Core that is completely separate from the Routing Protocol and the routing update etc. that goes on in the VPN sites of their subscribers. So they isolate the core they (Service Provider or MPLS Provider) runs their own IGP (OSPF, EIGR, IS-IS) or you know you can also even do static routing. So, there is no limitation that which routing protocol you have to deploy in your MPLS core. If you are worthy of deploying traffic engineering that is one of the applications you think you need to deploy then of course you need OSPF and IS-IS and why these two we’ll discuss that later.
Next thing is of course a label because that’s the one that’s the key player which makes decisions based on right to forward our traffic. You can define Label as a locally significant identifier of fixed length. It is short and four byte in length. This locally significant identifier is basically used to identify the Forwarding Equivalence Class (FEC). We’ll talk on Forwarding Equivalence Class later in detail.
- Label – Label Value (unstructured), 20 bits
- Exp – Experimental Use, 3 bits currently used as a Class of Service field(CoS)
- S – Bottom of Stack, 1 bit
- TTL – Time to Live, 8 bits
Encapsulation of MPLS Label
In Encapsulation we have ATM and frame Relay. We can do either Cell mode ATM or going for Frame mode Encapsulation. We can encapsulate MPLS Label by using one of these methods by enabling MPLS. Till now this is enough to know. We’ll discuss later in detail about MPLS Label.
Forwarding Equivalence Class (FEC)
A FEC is a group/flow of packets that are forwarded along the same path and treating with the same with regards to forwarding treatment. All packets belonging to the same FEC have the same label. However not all the packets that have the same label belonging to the same FEC because their forwarding treatment could be different and they could belong to the different FEC. The router which decides which packets belong to which FEC is Ingress LSR. We can consider few examples:
- Packets with layer 3 destination IP addresses matching a certain prefix (IP prefix/host address)
- Multicast packets belonging to certain group
- Layer 2 circuits (ATM, FR, PPP, HDLC, Ethernet)
- Layer 2 frames carried across an MPLS network received on one VC or sub interface on the
- Ingress LSR and transmitted on one VC or sub interface on the Egress LSR.
- Packets with layer 3 IP addresses that belongs to set of BGP prefixes, all with the same BGP next hop.
- Tunnel interface – traffic engineering
Label Distribution Protocol
To get packets across a label switched path (LSP) through the MPLS network, all LSRs must run a label distribution protocol and exchange label bindings. When all the LSRs have the labels for a particular Forwarding Equivalence Class (FEC), the packets can be forwarded on the LSP by means of label switching the packets at each LSR. The label operation (swap, push, pop) is known to each LSR by looking into the LFIB. The LFIB—which is the table that forwards labeled packets—is fed by the label bindings found in the LIB. The LIB is fed by the label bindings found in the LIB. The LIB is fed by the label bindings received by LDP, RSVP, MP-BGP or statistically assigned label bindings. We know that RSVP distributes the labels for the MPLS traffic engineering and MP-BGP distributes the labels only for BGP routes, you are left with LDP for distributing all the labels for the interior routes. Therefore all the directly connected LSR must establish an LDP session or peer relationship between them so that they can exchange label mapping messages across this LDP sessions. A label mapping or binding is bound to FEC. And the FEC is set of packets that are mapped to certain LSP and are forward over that LSP through the MPLS network. Several varieties of protocols to distribute labels.
- Tag Distribution Protocol (TDP)
- Label Distribution Protocol (LDP)
- Resource Reservation Protocol (RSVP)
TDP is Cisco proprietary. The IETF later formalized the LDP.LDP and TDP are similar in a way they operate but LDP has more functionality than TDP. With the widespread availability of LDP it is generally deployed. TDP was quickly replaced with LDP. Label distribution by RSVP is used for MPLS TE only.
- LDP is a superset of Tag Distribution Protocol (TDP)
- Uses UDP for session discovery and TCP(646) for the rest of the messages
- LDP Header:
- Uses Per-Interface or Per-Platform label space, each needing separate LDP sessions.
- Label distribution protocols distribute labels for prefixes advertised by unicast routing protocols (OSPF, IS-IS, EIGRP..etc) using:Either a dedicated Label Distribution ProtocolExtending existing protocols like BGP to distribute labels
- Multiple phases to establish a session & allocate labels
MPLS Application related protocols: MP-BGP, RSVP or other Label Distribution Protocols
- Used in MPLS traffic engineering
- Leverage the admission control mechanism of RSVP to create an LSP with bandwidth
- Label request are sent in PATH messages and binding is done with RESV messages
- EXPLICIT-ROUTE object defines the path over which setup messages should be routed
- Using RSVP has several advantages
- Multiprotocol extensions to BGP used for MPLS L3 VPNs
- Label mapping info carried as part of NLRI (Network Layer Reachability information) by BGP Peers
Amit is a software engineer, writer, speaker and a tech geek who loves to write technology.