4. Know about Label Distribution Protocols

Let’s have a look at Label Distribution Protocol. So why distribute labels? Well, otherwise MPLS won’t work. We need to distribute labels from router to router to be able to forward label packets, all right. One LSP will carry labeled packets. We need to make sure that each LSR along the path is able to forward the packet. So, basically it will receive labeled packets, so it must do a lookup of the top label on top of the packet, and then do a lookup in the label forwarding table. Figure out how the packet should be forwarded. So, it typically means that the top label will have to be removed or swapped out by another label, then be forwarded out on a particular interface. So, each LSR must be able to figure out that when a label packet comes in, how the packet should be forwarded. We basically need a local and remote label, or an incoming and an outgoing label. If you look at the example on the left, we have an LSR advertising labels towards the previous LSR. This label will be seen by this LSR as the remote label. It means that when it needs to forward a packet to the downstream router, which is this LSR on the right hand side, then it must slam the MPLS label that it received from that LSR on top of the packet. So basically, the outgoing label will be the remote label. It will receive from the downstream LSR.

On the other hand, each LSR must first assign a local label. That local label is the label that it expects on top of the packet when the packet comes in to the router. And this local label is also the label that we just saw gets advertised upstream to the upstream LSR. So how does a distribution of labels actually work? Well, we basically have two ways to distribute the labels. Either the labels can be distributed by a separate protocol. So we really have a label distribution protocol that just distributes the labels, or the label bindings. The label binding is just a prefix, with the associated label. The second way is we can piggyback the labels on an existing routing protocols. In the first category you have two main examples. We have the Label Distribution Protocol, or LDP. It is a protocol that was invented just to distribute the label bindings. So the prefixes and the labels, for whatever routing protocol you might be running. Second example is RSVP for TE. So we basically have Reservation Protocol for Traffic Engineering which will advertise labels specifically for traffic engineered LSPs. In the second category, where we have the labels piggybacked on existing routing protocols, we might have BGP, or Multiprotocol BGP. There we have BGP advertised, a BGP pefix, of course, and an associated label. We also have an existing routing protocol, like OSPF or IS-IS, that has been modified, not only to carry the prefixes, but also a label associated with that prefix. And, as we will see in later lessons, that is typically used with segment routing. LDP. While we have LDP and LDP only distributes labels for IGP prefixes, it will never, ever distribute labels for BGP prefixes. And the reason is, of course, that BGP will do the job itself. BGP can distribute the BGP prefixes and the associated labels. When you deploy LDP, when you enable LDP on routers, then automatically LDP will assign one local label, which is unique, per prefix. So for every prefix in the routing table, if it’s an IGP prefix. So OSPF, IS-IS, ELGP, Static router, and so on. But not BGP. It will assign one unique local label per prefix, and advertise it to all its neighbors. So LDP will have to form neighborships or adjacencies with all the directly connected routers to be able to advertise those label bindings. In the end, all routers learn all the MPLS labels for all the IGP prefixes from all the neighboring routers. Each LSR or router will typically pick one label associated with one IGP prefix. But which label? Because it has received labels or label bindings from all LDP labels. Well, it will pick the label associated with IGP prefix, associated with next up router, or the downstream router that it finds in the routing table for that particular prefix. As you can see here, each LSR will just start to advertise a label binding through LDP. And the label binding is a particular prefix and a label. This label binding will just be advertised to all its LDP neighbors. Here we might have a prefix on the right hand side, 10.1.1.0/24. Even though this prefix is on the right hand side, the LSR in the middle here would just advertise the label binding to all its neighbors. The other example is RSVP-TE. Now, RSVP-TE, because we have traffic engineering, it will work slightly different. Here, the label will be advertised hop-by-hop in sequential order from what we call a Tunnel Tail-End Router towards the Tunnel Head-End Router. And per tunnel, we will have one label assigned. So each router will have assigned one local label for the tunnel, and then advertise it upstream towards the upstream router, where it becomes the remote label, or the outgoing label for that particular tunnel. So the difference with LDP here is that the label distribution happens on demand, whereas with LDP it was not on demand.

Written by admin