Excerpted from the “MPLS: What is it? What can it do for me?” white paper. Download the complete paper from our Knowledge Center.
Traditional routers forward packets by examining the network-layer header (typically the destination IP address), searching for the best matching entry in the routing table, and forwarding the packet through the specified interface to the next hop router. This process is time-consuming and is repeated for each packet at each router along the path. Because no state is maintained from packet to packet, the system is highly scalable, but inefficient.
Multiprotocol Label Switching (MPLS) began life as a way for routers to short-cut the process of treating each packet independently. In an MPLS network, the ingress router does a standard lookup and assigns a numeric label to the packet.
The MPLS label is assigned by the ingress edge router based on a Forwarding Equivalence Class (FEC) which represents a series of packets to be forwarded in the same manner, over the same path, to the same destination. In basic IP routing, for example, a label is assigned to each target IP network that the MPLS domain knows about. An FEC could also be associated with specific classes of service for QoS processing, or with a VPN.
Core routers then examine the label and forward the packet according to the label. All packets with the same label are forwarded the same way. This relieves the core routers of much processing, making the overall network more efficient.
The beauty of MPLS is that the label itself has no meaning other than what the software gives it. Because the labels are just numbers, they can be assigned according to any criteria the router software supports. This feature give MPLS an extraordinary ability to support many networking applications.
The label can be used to implement any forwarding treatment that comes to mind. By allowing multiple labels to be stacked within a packet, MPLS permits multiple applications, such as QoS and VPNs, to be combined. Once a packet has entered the MPLS domain, the routers use a simple and fast label lookup process to forward the packet to its next hop. In the Cisco implementation, MPLS leverages the Cisco Express Forwarding (CEF) feature to optimize label lookup and forwarding.
For MPLS to operate, labels must be generated, stored, and distributed. The Label Distribution Protocol (LDP) handles the generation and distribution of labels for basic IP forwarding and other applications, and the Label Information Base (LIB) stores the labels generated locally and received from LDP neighbors. LDP is generally enabled on each MPLS interface. Other labels, as required by various applications, are generated and distributed through other protocols. For example, Multi-Protocol Border Gateway Protocol (MP-BGP) assigns and distributes labels used for VPN forwarding, and the Resource Reservation Protocol (RSVP) does the same for traffic engineering.