MPLS allows most data packets to be forwarded at Layer 2 -- the switching level -- of the Open Systems Interconnection (OSI) model, rather than having to be passed up to Layer 3 -- the routing level. For this reason, it is often informally described as operating at Layer 2.5.
MPLS was created in the late 1990s as a more efficient alternative to traditional Internet Protocol (IP) routing, which requires each router to independently determine a packet's next hop by inspecting the packet's destination IP address before consulting its own routing table. This process consumes time and hardware resources, potentially resulting in degraded performance for real-time applications, such as voice and video.
In an MPLS network, the first router to receive a packet determines the packet's entire route upfront, the identity of which is quickly conveyed to subsequent routers using a label in the packet header.
While router hardware has improved exponentially since MPLS was first developed -- somewhat diminishing its significance as a more efficient traffic management technology-- it remains important and popular due to its various other benefits, particularly security, flexibility and MPLS traffic engineering.
Components of MPLS
One of the defining features of MPLS is its use of labels -- the L in MPLS. Sandwiched between Layers 2 and 3, a label is a four-byte -- 32-bit -- identifier that conveys the packet's predetermined forwarding path in an MPLS network. Labels can also contain information related to quality of service (QoS), indicating a packet's priority level.
MPLS labels consist of four parts:
- Label value: 20 bits
- Experimental: 3 bits
- Bottom of stack: 1 bit
- Time to live: 8 bits
The paths, which are called label-switched paths (LSPs), enable service providers to decide ahead of time the best way for certain types of traffic to flow within a private or public network.
How an MPLS network works
In an MPLS network, each packet gets labeled on entry into the service provider's network by the ingress router, also known as the label edge router (LER). This is also the router that decides the LSP the packet will take until it reaches its destination address.
All the subsequent label-switching routers (LSRs) perform packet forwarding based only on those MPLS labels -- they never look as far as the IP header. Finally, the egress router removes the labels and forwards the original IP packet toward its final destination.
When an LSR receives a packet, it performs one or more of the following actions:
- Push: Adds a label. This is typically performed by the ingress router.
- Swap: Replaces a label. This is usually performed by LSRs between the ingress and egress routers.
- Pop: Removes a label. This is most often done by the egress router.
This diagram illustrates how a simple MPLS network works:
Benefits of MPLS
Service providers and enterprises can use MPLS to implement QoS by defining LSPs that can meet specific service-level agreements (SLAs) on traffic latency, jitter, packet loss and downtime. For example, a network might have three service levels that prioritize different types of traffic -- e.g., one level for voice, one level for time-sensitive traffic and one level for best effort traffic.
MPLS also supports traffic separation and the creation of virtual private networks (VPNs), virtual private LAN services and virtual leased lines.
One of the most notable benefits of MPLS is that it is not tied to any one protocol or transport medium. It supports transport over IP, Ethernet, asynchronous transfer mode (ATM) and frame relay; any of these protocols can be used to create an LSP. Generalized MPLS (GMPLS) extends MPLS to manage time-division multiplexing (TDM), lambda switching and other classes of switching technologies beyond packet switching.
Other benefits of MPLS include the following:
- It's good for real-time applications that can't tolerate latency, such as video, voice and mission-critical data.
- Data and voice apps can all be run on the same MPLS network.
- Different types of data can be preprogrammed with different priorities and classes of service.
- Organizations can assign different percentages of their bandwidth to various types of data.
- MPLS networks are scalable. Companies only have to provision and pay for the bandwidth they need until their requirements change.
History of MPLS
In 1994, Toshiba offered some ideas to the Internet Engineering Task Force (IETF) that were the precursors to current MPLS standards. In 1996, a team from Ipsilon Networks put forth a technology called IP switching that was only intended to work on ATM networks. That same year, Cisco, Ipsilon and IBM announced plans to use label switching, leading to modern-day implementation of the protocol. In 1997, the first MPLS working group was formed, and in 1999, the first deployment of an MPLS network was completed.
MPLS was developed as a more effective alternative to multilayer switching and IP over ATM. With MPLS, routers don't have to look up routes in routing tables, boosting the speed of network traffic flow.
Because MPLS was created to work in a multiprotocol environment, it can work with ATM, frame relay, Synchronous Optical Networking (Sonet) or Ethernet at the core. MPLS continued to evolve as backbone network technologies evolved. MPLS also played a major part in supporting legacy network technologies, as well as the newer technology based on IP networks. MPLS techniques were developed and adopted further in the early 2000s, leading up to today's large-scale adoption of the protocol.
MPLS vs. SD-WAN
There are a number of differences between MPLS and software-defined wide area network (SD-WAN), including the following.
SD-WAN offers several advantages over traditional MPLS networks. SD-WAN doesn't have any bandwidth penalties, unlike MPLS. Consequently, SD-WAN clients can easily upgrade just by adding new links. They don't have to make any changes to the network or infrastructure.
Previously, many companies connected retail locations and branch offices to the central data centers via hub-and-spoke WAN models that depended on individual MPLS connections. Consequently, all data, workflows and transactions, including access to the internet or cloud services, meant traffic had to be backhauled to the data center to be processed and redistributed. This is more expensive than using SD-WAN.
SD-WAN cuts costs by offering optimized, multipoint connectivity through distributed, private data traffic exchange and control points. This gives users local and secure access to the services they need, from the network or the cloud, while securing direct access to both internet and cloud resources.
Additionally, although a MPLS network is typically safe, it doesn't offer encryption, making it vulnerable to cyberattacks.