How are MPLS labels assigned

MPLS - Multi-Protocol Label Switching

Multi-protocol label switching combines the advantages of switching with routing.
MPLS works between layers 2 and 3 of the OSI layer model. So it builds in as an intermediate layer. An example for layer 2 is the Ethernet. The frames (data packets) are switched on this layer. An example for Layer 3 is the Internet Protocol (IP). The data packets are routed on this layer. MPLS is suitable for the prioritized routing of data packets in an IP network.

How was that again with the routing?

Routers have the task of determining the route to the destination for data packets based on their destination address and forwarding it to the next responsible router. For this purpose, the router internally maintains very extensive tables of known networks and the routers responsible. The router has to go through the tables for each incoming data packet and find the route that is most suitable. The first route that comes along is not always suitable. That is why the tables are processed in full each time.
What makes it more difficult is that not every router has an overview of the entire routing. That would also make less sense. Routes can change. A complex synchronization process between all routers would be necessary.

How does MPLS work?

Instead of redetermining the route for each data packet in each router, a label is assigned for each route. Routers analyze the destination address of the data packets and then determine which route suits them best. This decision is only made once, when it enters the network. A label is assigned to the data packet. The label determines which route this and all other packages should take. This is how tunnels are created through the network.
Routing and service information is contained in the label. MPLS routers read this header and forward the packets depending on the information. In this way you can instruct the MPLS router to always transmit the data packets over the same route.
So if a data packet comes with an MPLS header, the router takes the label from the MPLS header and compares it with its label table. It says there which interface must be used as the exit. At the same time, the data packet is given a new label and then transmitted to the next router.
If a data packet does not have an MPLS header, the responsible router is determined and a label for the destination IP of the packet is requested from it. The label is then entered in the MPLS header and forwarded to the router.
The protocol with which routers apply for labels and announce changes is called Label Distribution Protocol (LDP). Labels can also be exchanged via BGP (Border Gateway Protocol). BGP is already used as a protocol between the routers, with which they exchange their routing tables with one another.

What are the advantages of MPLS?

MPLS routers have the advantage that they only have to look at the label in the MPLS header. This makes the protocol on layer 3 interchangeable. It no longer matters for routing with MPLS. Therefore, MPLS routers can also automatically route IPv6.
MPLS also supports Quality of Service (QoS). Packets with a higher priority are given a different label with which the route leads to the destination more quickly. It is thus possible to define quality of service parameters. For example, Transit Delay and Packet Loss. The MPLS header consists of the label for forwarding, the class-of-service field (CoS) to differentiate between service classes, the bottom-of-stack field (S) and the time-to-live field (TTL).

MPLS also offers a feature called the Label Stack. Several labels can be attached to a data package at the same time. If such a packet arrives at a router, it discards the first label and lets the next one slip. In this way, the route of a data packet is determined right from the start. Usually this does not make sense as routes can change or be canceled at short notice. However, if it is a packet from a VPN connection, it is better that the data packet does not reach the recipient, instead of being forwarded via an insecure backup route. If you have enough trust in the route with regard to its security and stability, you can then do without the complex and performance-guzzling encryption. Which is not recommended, however.

Where are MPLS routers in use?

The so-called routing performance of routers is only possible with extremely high bandwidths, e.g. B. multi-gigabit fiber optic routes of the carrier a problem. Here MPLS brings a directly visible advantage to push the speed bottlenecks further into the distance for a few years. In the end customer area with typical dial-up devices via the analog telephone line or ISDN, MPLS does not play a role now or in the future. But if broadband Internet access becomes established across the board without exceptions, then MPLS routing is a serious alternative to IP routing.

T-MPLS - Transport Multiprotocol Label Switching

T-MPLS is a further development of MPLS with a lower complexity and an open standard of the IETF. T-MPLS is also included in the ITU-T recommendations.
An alternative to MPLS and T-MPLS is PBB-TE.

How secure is MPLS?

MPLS is offered with changing names as a networking product for companies by network operators. This means that the company can use the network of a network operator to network several locations via MPLS. With MPLS, the network operator customers keep their data traffic to themselves. This means that the MPLS customers cannot see each other's data traffic from other customers.
However, this does not mean that the data is transmitted securely. Namely, there is no encryption. In principle, anyone who gains access to the MPLS network of a network operator can read the entire data traffic with little effort.
This is of course a purely theoretical possibility. The only question is whether the network operator's network is secure. The recommendation is to encrypt all outgoing data regardless of the provider or the network technology and not to rely on the network being secure.

Quality of Service

Other related topics:


Product recommendations

Everything you need to know about networks.

Network technology primer

The network technology primer is a book about the basics of network technology, transmission technology, TCP / IP, services, applications and network security.

I want that!

Everything you need to know about networks.

Network technology primer

The network technology primer is a book about the basics of network technology, transmission technology, TCP / IP, services, applications and network security.

I want that!