When you are moving up the network ladder, you might come across an opportunity to enter the MPLS world. That’s when you realize that MPLS is much different from the IP world you have dealt with so far. But the fact is that MPLS is much easier than it appears to be if you understand what the frequently used MPLS terminology means and what they do. So, if you are new to MPLS and have been trying to figure out some MPLS fundamentals, read on.
In IP-based forwarding, each router that receives a packet looks up the next hop IP address in its routing table and then forwards the packet to the next router until it reaches its destination. There are several limitations to this method, such as the lack of scalability, the need for expensive ASICs that perform IP routing lookups, lack of support for traffic engineering, the inability to support multi-service networks, and poor integration with backbone networks running Layer 2.
This is a switching technology that forwards data from one source to its destination using labels rather than IP addresses. With label switching, only the first device does a routing lookup and identifies the destination and a path from the source to destination. The router then applies a label based on this information, which is then used by the routers along the path to route traffic to the destination without the need for any IP lookups. Upon reaching the destination, the label is removed and the packet is delivered using IP routing. MPLS allows the implementation of traffic engineering, because the path is pre-determined and can work in the Layer 2 backbone as well as over IP-routing networks.
FEC is a group of packets with similar characteristics that are forwarded in the same manner over the same path and with the same forwarding treatment.
This is the router where the MPLS process starts. An LER is a router that operates at the edge of an MPLS network and is the entry and exit point to the MPLS network. It is the LER that determines the path, pushes an MPLS label onto an incoming packet based on the path to be taken, and encapsulates a packet inside an MPLS Label Switched Path (LSP), defined below.
The LER can also be the “Egress Node” when it is the final router at the end of an LSP and is the exit point from the MPLS network. When acting as the Egress Node, the LER removes (pops) the MPLS label from a packet before it is forwarded over IP or the underlying network.
Also known as the transit router, the LSRs are routers that lie along a label switched path established by LERs between a source and destination pair. The function of an LSR is to perform MPLS label switching. When an LSR receives a packet, it looks up the MPLS label on the packet and determines the next hop along the LSP. The LSR then removes the current label and replaces (swaps) it with a new label based on the path and forwards the packet to the next LSR.
This is the most basic concept of MPLS. An LSP is the pre-determined path established between two routers (LER) to route traffic in an MPLS network. An LSP is established over a sequence of LSRs based on the criteria in the FEC. It is only after an LSP has been established that MPLS forwarding can occur. LSPs are unidirectional which means that return traffic is sent over a different LSP.
LDP is another basic building block of an MPLS network. LDP is used by LERs to establish a label switched path from a source to a destination. While there are multiple modes by which this is done, the common modes are downstream on demand, also known as solicited mode, and unsolicited mode.
In downstream on demand or solicited mode, the upstream LER sends out an LDP label request to the next hop router determined from the routing table. The request is forwarded by each hop till it reaches the egress router and a return message that confirms the LSP is generated.
In unsolicited mode, which is the most common mode, an LSR router broadcasts label mappings to all neighbors. The broadcasts are spread through the network till they reach the upstream or ingress routers that can then establish an LSP. For even more detailed information on LDP and how labels are assigned, check this blog: http://packetpushers.net/back-basics-label-distribution-assignment-modes/
MPLS networks that need traffic engineering use a different protocol known as the Resource Reservation Protocol with Traffic Engineering (RSVP-TE). We discussed the pros and cons of RSVP-TE and its alternative, Segment Routing, in our blog series on traffic engineering.
When an unlabeled packet is received by an LER, the LER inserts MPLS labels into the packet’s new MPLS header using a push operation and then passes it on to the next hop router (LSR) along the path. The next hop router (LSR) that receives the packet, examines the MPLS label and performs a swap or pop operation on it. In a swap operation, the existing top label is swapped for a new label and forwarded along the path to the next hop. If the packet is at the destination and ready to exit the MPLS network, a pop operation is performed on the packet. The pop operation removes the top label leaving behind the actual payload packet. The egress node then checks the packet’s payload and uses its routing information to forward the packet to its destination.
That covers the basic operation of how an MPLS network functions. If you would like to read up a bit more about MPLS, check out this NANOG presentation on MPLS. We will cover MPLS VPNs and define the associated terms in a future blog post.