Lesson Contents
In my introduction to MPLS I explained why we use MPLS and explained some of the basics of how we use labels for forwarding decisions. In this lesson, we’ll take a closer look at the MPLS labels, the devices that we use and how IP packets travel through the MPLS network.
MPLS Label Format
The MPLS header has been standardized, you can find it in RFC 3032. The header is pretty simple, here’s what it looks like:
Here’s what the different fields are used for:
- Label value: the name says it all, this is where you will find the value of the label.
- EXP: these are the three experimental bits. These are used for QoS, normally the IP precedence value of the IP packet will be copied here.
- S: this is the “bottom of stack” bit. With MPLS it’s possible to add more than one label, you’ll see why in some of the MPLS VPN lessons. When this bit is set to one, it’s the last MPLS header. When it’s set to zero then there is one or more MPLS headers left.
- TTL: just like in the IP header, this is the time to live field. You you can use this for traces in the MPLS network. Each hop decrements the TTL by one.
The MPLS header is added in between the L2 and L3 header:
That’s why we call it a “layer 2.5” protocol. Here’s an example of what it looks like in wireshark:
Above you have an example of the MPLS header in between the Ethernet and IP header. You can also see the different fields, this header uses label value 16. We don’t use QoS and since there is only one MPLS header, the bottom of label stack bit has been set.
MPLS Devices and Operations
Now you know what the MPLS labels look like, let’s talk about a bit about the different devices you will encounter in a MPLS network. Here’s an overview:
Above you will find three different routers:
- CE (Customer Edge): this device is the last device in the customer’s network, it could be a L2 or L3 device. In my picture I used a router but for example, it could be a switch. This device does not use MPLS.
- PE (Provider Edge): this device is owned by the ISP and sits at the edge of the ISP’s network. It has an important role…it receives packets or frames from the customer and will then add a MPLS label to it and forwards towards the core. Another common name for this device is LER (Label Edge Router).
- P (Provider): this device connects to PE routers and other P routers. It has a simple job, it switches packets based on their labels or removes the labels. Another common name for this device is the LSR (Label Switch Router) or transit router.
There are three actions we can perform with labels:
Hi Kumaran,
These have to do with PHP (Penultimate Hop Popping).
Imagine you have a couple of routers like this:
CE1 - PE1 - P1 - P2 - PE2 - CE2
Let’s say CE1 sends an IP packet meant for CE2. What happens is that PE1 adds a label and then it gets label switched from PE1 to P1 > P2 > PE2.
To save PE2 a label lookup, we use PHP. This means that P2 will remove the label before forwarding it to PE2. This will save PE2 a label lookup.
P2 knows that it has to do PHP because PE2 will tell it to. This is done with the implicit NULL label which has a value of 3. This i
... Continue reading in our forumHi Rene,
Hope you are doing great …
I have some questions …
Hi @Zaman.rubd
Let’s look at an example of PHP first. Take a look at this picture:
https://networklessons.com/wp-content/uploads/2015/08/mpls-device-label-operations.png
In this example, P3 pops the label and forwards only the IP packet to PE2. The advantage here is that we saved a lookup for PE2. It only has to route the packet, not another lookup for the label.
Without PHP, (that’s Ultimate Hop Popping), the egress router (PE2) has to pop the label and do a lookup in the IP routing table.
PHP helps to move some of the load
... Continue reading in our forumHi Gareth,
https://cdn.networklessons.com/wp-content/uploads/2015/08/xcontrol-plane-rib-forwarding-plane-fib.png.pagespeed.a.ic.b7IHIdxA5T.png
Each routing protocol has its own “RIB”. The OSPF LSDB can be called the OSPF RIB and the EIGRP topology table is the EIGRP RIB.
The routing table can be considered the “main” RIB of the router.
The FIB is your forwarding table, on Cisco routers, this is the CEF table. It doesn’t only contain L3 information like the RIB does but also L2 information (needed to reach the next hop).
Here’s
... Continue reading in our forumHello Chris
In PHP, it is more appropriate to refer to the outer and inner label, although the top and bottom labels are also used as terminology. The top label is the outer and the bottom is the inner. So in PHP, it is the outer label that is removed by the Label Switch Router (LSR) before the packet is passed to the adjacent Label Edge Router (LER).
In the case of MPLS VPN, a packet consists of two labels, the inner one is the VPN label and the outer one is the common MPLS label. So when PHP will be performed by an LSR it will remove only the outer label.
... Continue reading in our forum