MPLS LDP (Label Distribution Protocol)

(Rene Molenaar) #14

Hello Salvatore,

Glad to hear you like it :slight_smile:

When I’m talking about the RIB (Routing Information Base), then I refer to the global routing table (show ip route). There are some discussions about this as some people don’t see this as the RIB.

The way I see it is that different routing protocols have their own “tables”:

  • BGP: BGP Table
  • RIP: Database

The best routes (based on administrative distance) from different routing protocols are placed in the RIB (routing table), and that’s it. Sometimes people like to call the BGP table the BGP “rib”, the OSPF LSDB the “OSPF RIB” etc. This is confusing.



(Jonathan O) #15

Hi Rene,

I was reviewing Keith Barkers MPLS course and I was a bit confused on one of his “opt out” questions. Which was “LDP and OSPF are both which type of protocols?”. So far the only thing I’ve been able to come up with would be, Link-State. Since they both build adjacencies based on hellos and also both build thier own tables… Would you agree?


(Rene Molenaar) #16

Hi Jonathan,

That is a good question…LDP isn’t a link-state protocol though.

The only similarities I can think of are:

  • OSPF and LDP both use the highest IP address on a loopback interface as the router ID.
  • Both protocols advertise "something". OSPF prefixes and LDP labels.



(sze jie k) #17

Hi Rene,

Thanks for the nice readup.
Though i have not fully understand the workings of MPLS, it seems like the LABELs are build from the routing information available in the routers. (RIB to LIB).

As we know for when multiple routes are available to the similar destination, the route with the least ad/cost is use for routing.

But how about MPLS? how does LDP choose which LABEL to put into the LFIB ?



(Rene Molenaar) #18

Hi Alan,

That’s correct. The information in the RIB is used to build the LIB.

LDP won’t “choose” any routes by itself. The best routes were installed in the routing table and that’s what we will use. For the prefixes you will find in the routing table we will use labels, that’s it.



(sze jie k) #19

Hi Rene,

Thanks for your reply.
As you mentioned, information inside the RIB is use to build the LIB.
So i would imagine to have a LABEL for all the available routes.

e.g. I have 3 best routes to the same destination with rip, eigrp, ospf in the RIB.  via  - rip  via  - eigrp  via  - ospf

q1) Can i check for FIB, does it contain the same amount of available routes as in the RIB ?

q2) if the above is yes, i would believe FLIB and FIB would have the same amount of labels ?

q3) it is said that in MPLS, the LABELs are use to do switching/routing from Source to Destination and it is faster because there is no need to do best route selection using the IP headers. – is this true ?
But how do we ensure that the LABELs being used (added) and the next hop to send to represent the best routing path available ?

or to put it in another way

- in normal routing, best route selection is done via (ad, metric, prefix length)…
- in mpls, since all available routes will have a tag, how does the router know which tag to use (without looking at the routing table for the best route) ?



(Rene Molenaar) #20

Hi Alan,

If OSPF, EIGRP and RIP have learned the route then only one will be installed in the routing table. EIGRP will be selected since it has the lowest administrative distance.

By default, LDP will generate a label for each route in the routing table. This is something that you can change by using access-lists if you want.

The LFIB has pretty much the same information as the FIB, however some entries in the FIB (like directly connected interfaces) won’t show up in the LFIB.

Theoretically, switching based on labels is faster than routing where we do a lookup for the IP destination. Nowadays this doesn’t matter much. Keep in mind MPLS is already quite old.

The RIB only has the best routes in it, the FIB is built with information from the RIB. That’s why you know that we also use the best path with label switching. Labels are advertised between routers, that’s how they know which label to use.

If you want to see this in action, boot a couple of routers and configure OSPF on EIGRP on them…advertise some loopbacks. Then enable MPLS on the interfaces and take a look at the different tables:

  • show ip route = RIB
  • show ip cef = FIB
  • show mpls ldp bindings = LIB
  • show mpls forwarding-table = LFIB



(Sumit S) #21

Hi Rene,

Thanks for a good explanation…

My question is my ldp is flapping although my isis is up…

What are main problems we have with ldp flapping and what could be the issue in the case…???

Thanks in advance.



(Sumit S) #22

Dear Team,

Pl respond.



Hi Rene

You had mentioned that LDP forms a TCP connection for the neighbor adjacency, but the source port and destination ports are UDP.
It does not make sense?



(Abhishek D) #24

Hi Rene,

I have a doubt and not getting an answer , can you help plz.

In a MPLS network where MPLS TE is being used , what signalling protocol is used by ISPs ? Is it LDP or RSVP-TE or both ?
If it is both - how ?



(Shantel - split this topic #25

19 posts were merged into an existing topic: MPLS LDP (Label Distribution Protocol)


(Stuart G) #26

Hi Rene,
Could you expand on this a bit please. It seems to me that it is possible to receive a label for a destination that we do not have in the routing table.
The first example where we have BGP between PE and CE but no BGP on the core. Here the PE’s were advertising a route for the Customer.
If the core is more complex there could be multiple ways for PE1 to get to PE2 so it could learn the label from more than one neighbour.

How would a router chose which label route to use where it has a label for a destination but no route ?



(Rene Molenaar) #27

Hi Stuart,

Did you see this tutorial?

I think that one will be helpful to understand this better. Within the MPLS “core”, we only advertise the loopback interfaces of the PE routers in our IGP, OSPF in most of my examples. The P router will only have these networks in its routing table. The LIB is based on the information of the RIB (Routing Table), so you only find labels for those loopbacks there, these are the transport labels needed to get from one PE to another PE.

Only the PE routers have to know all customer routes, these (including a VPN label) are advertised through IBGP between the PE routers.

Keep in mind that the LIB is built based on information from the RIB. If there are multiple paths to a certain PE router, then your IGP will decide which path will be installed in the RIB, which results what is used in the LIB. This is something we can influence with MPLS traffic engineering though.


(Mohammad Hasanuz Zaman) #28

Hi Rene,
I have Two questions .
PE Router has two Forwarding Table FIB and LFIB .When a PE Router receive a regular IP packet destination to and the Dst prefix exist in FIB table as well as LFIB table with label . Why Router will use LFIB instead of FIB ?? what is the choosing criteria ?? Need your assistant badly to clear it.

What do you mean by " Untagged" label .Label !!



(Lazaros Agapides) #29

Hello Zaman

Regular IP packets by definition do not have a label. They are always processed as regular IP packets based on destination IP and routing table lookup. So they are always routed using the FIB table. The LFIB table is only used when there is an MPLS label.

As for the untagged label, you can find out more about that at this post: Introduction to MPLS

I hope this has been helpful!




Hello, Can you add a topic called RSVP and difference between LDP/RSVP, please?


(Rene Molenaar) #31


RSVP is a QoS mechanism to create a reservation on the network. I have an introduction lesson here:

RSVP is sometimes used on top of MPLS for Traffic engineering. That’s something I will cover in the future.


(Chris N) #33

Something else to bear in mind as well, is Targeted LDP. It means LDP neighbours don’t actually need to be directly connected.

1 Like

(anil t) #34

ldp uses 646 udp for adjacency and tcp 646 for session creation. Would you pleases elaborate.