MPLS aims at combining the switching technique at network layer 2 of labels, with the layer 3 protocols. Nowadays, many backbone networks use MPLS as the switching technology carrying any kind of traffic. MPLS permits performance, thanks to the switching technique very close to what ATM or Frame-Relay was doing a few years ago. Initially, IP networks were carried by MPLS. Today, because any transport over MPLS is possible ( ATOM), it is also used to carry L3VPN and L2VPN traffic.
This chapter aims at explaining how MPLS works, explains the main concepts, and explains the differences with classical routing.
It is important to understand the MPLS terminology. In this paragraph we will give the most important concepts.
Labeled Switch Router. Networking devices handling labels used to forward traffic between and through them.
Labeled Edge Router. A Labeled edge router is located at the edge of an MPLS network, generally between an IP network and an MPLS network.
Label Forwarding Information Base. A data structure in which incoming interface and incoming labels are associated with outgoing interfaces and labels.
- label binding
An association between a label and a set of packets, which can be advertised to neighbors so that a label switched path can be established.
Forwarding Equivalent Class. It is a term used in Multiprotocol Label Switching (MPLS) to describe a set of packets with similar or identical characteristics which may be forwarded the same way; that is, they may be bound to the same MPLS label. In classical IP routing, the FEC choice is usually done according to destination IP address.
- MPLS label
The MPLS label is a 4 byte field that contains a 20 bit label value, a 3 bit cos value, an 8 bit ttl value, and 1 BOS bit indicating that the label is the last one of the stack. Actually, MPLS can be stacked (then we could use the term
Label Stacking). This BOS information indicates that next payload is not an MPLS packet.
Here are the operations that are applied coming from A and going to B, through an MPLS network.
Packet will first be sent to a LER that stands for the ingress node.
On classical IP routing using Ethernet as medium, an incoming IP packet will be routed, by using its destination IP address; the FIB is inspected, a nexthop IP is returned if everyting went well; then the MAC information is appended to the packet; source mac address is the mac address of the outgoing interface, while destination mac address will be obtained by using the destination mac address of the resolved nexthop.
On a LER, if the nexthop information is reachable through a MPLS network, an extra
information called FEC will be located in the FIB. A Label will be pushed between the
IP layer and the MAC layer. This extra relationship is called
Then, the encapsulated MPLS packet will be sent to the destination mac address indicated by its packet. It is received by an incoming LSR. Here, the LFIB is looked up, based on the incoming MPLS label. LFIB returns a swap operation: the incoming label will be replaced by an outgoing label; the new MPLS packet is being sent to the next hop. Before reaching the final destination, the MPLS label must be popped. This happens if the LFIB indicates to pop the label; for instance, the label is being replaced by an implicit-Null label. Here, the IP packet has reached the egress node.
The whole path between the ingress and the egress node is called the LSP. The incoming label set at the ingress node, will determine the whole path the packet uses to reach the egress node. By setting the appropriate FEC information at the LER, it is possible to apply specific path, depending on the characteristics of the incoming traffic. Note also that because that FEC information can be applied to all kind of traffic, one can have multiple criteria.
Establishing a LSP requires coordination between all LER and LSR. This is done by distributing protocols. For instance, this can be done by using LDP protocol. Please see Label Distribution Protocol for details.
Several services can rely on MPLS framework, and not only IP. One example if L3VPN technology. BGP provides the capability to exchange VPN information, by exchanging labels. Label stacking is then used. More information can be found in BGP L3VPN.