6. Know about the Label Forwarding Instance Base

Let’s have a look at the label forwarding instance base. The LFIB or the label forwarding instance base is a new table used on routers to forward incoming labeled packets. We used to have the FIB table before and we still have it, which is the forwarding instance base. It’s not the routing table. It’s not the RIB. The routing table is used to store prefixes. It holds information like the prefix, the mask, the outgoing interface, the cost of the prefix, and so on. The FIB is really a distilled table which holds only the necessary information to forward the packets. Such as the prefix, the mask, the outgoing interface, and the next stop IP address. That’s all which is needed to forward an incoming IP packet. So, this FIB table or CEF table is used to forward incoming IP packets. As we can see here on this LSR, if an IP packet comes in, it could be going out as an IP packet but it could also be going out as a label packet. That’s why this FIB table is in-housed so that we can find outgoing label information for the particular prefix after doing an IP lookup. Now we also have this new table, which is the LFIB table. This is a table used to forward incoming label packets.

So, the packet will be coming in into this LSR already with an MPLS label. And then the packet will go out either with another label on top of the packet or unlabeled. So, it goes out as an IP packet. It depends on the result of the lookup in this LFIB. So, what do we have in the LFIB? Well, in the LFIB we have entries. It could be an IPv4 prefix, an IPv6 prefix, a VPN, layer two, a layer three prefix, a TE tunnel entry, a layer two forwarding entry, and so on. It basically can be anything. What we must have is one local label or one incoming label. The packet will be coming in with that particular label. And then we have one outgoing label. So, one label which is swapped or pushed on top of the packet. Or more than one label. We can push more than one label on top of the IP packet. And then we’ll have one outgoing interface with the next hop. It could be more than one outgoing interfaces, but then we have load balancing and we’ll explain that on the later slide. How do you look at this LFIB while you just use the commands? Show MPLS forwarding on all the operating systems that we have and you will see the complete content of the LFIB table. You will see an incoming label, outgoing label, outgoing interface, and so on. And optionally, you also have counters to count the number of packets or bytes forwarded per LSP As I mentioned, you can also have load balancing. Meaning, you have a packet coming in which is labeled and then it can go out on one or more outgoing interfaces because we have load balancing or equal cost multi-path for a particular prefix. Of course the packets coming in, they will not be forwarded over multiple interfaces, let’s say at the same time. They will be forwarded over one outgoing interface based on some load balancing algorithm. And the load balancing algorithm or scheme depends on the operating system and typically also the platform which is being used. But no matter what the load balancing is always per flow. So, packets belonging to the same flow will take the same outgoing interface always. We do not do per packet load balancing. That is deemed to be evil because you can have out of sequence packets. So, let’s have a look at an example. If we have the LFIB, the minimum amount of information that we have there is an incoming label, or local label, outgoing label, outgoing interface, at which prefix or LSP entry that we are looking at. And then this case, we actually have load balancing. We have two parallel links between a pair of routers. We have two outgoing interfaces. Interface one and interface two. For this entry, which is tied to the prefix, we have one local label, so the packet comes in with label 18. And then we’ll go out with label 31, either outgoing interface one or two. Either one. By chance here, the outgoing label is the same. But that will typically happen when we have two parallel links between a pair of routers because there’s really only one LRP session between a pair of routers. And over the LRP session, this router advertises the same label 31 for this particular prefix to the router on the left hand side. Here’s another case of of load balancing. Namely, on the the LSR on the left hand side. We have two outgoing interfaces, but towards two different downstream LSRs. And typically those routers will be advertising a different label for that particular prefix. So now, the router on the left hand side has two different outgoing labels on the two different outgoing interfaces. One and two. But still per flow, when packets come in with the label 18, the router will pick either outgoing interface one or outgoing interface 2 to forward the traffic. Let’s have a look at the LFIB or the forwarding table used to forward label packets on some routers. All right, let’s have a look at our network again. Just a reminder, all the loopback IP addresses of the routers are 10.100.1.x/32 and all the link IP addresses are 10.1.x.x/24. We’ll have a look at the prefix of router five. It’s loopback, it’s And we’ll have a look at LFIB on router two. So, let’s bring up router two. Let’s first have a look what we have in the routing table. Show IP route and we can see we have the entry here. It’s OSPF prefix and we have two outgoing interfaces. That’s because we have load balancing out of router two towards router three. We have two parallel links between router two and router three. So, what labels do we use? What are we going to put in the LFIB? Well, let’s first have a look what we have in the LIB. What are the labels that we have as a local label and remote labels put there by LDP? So, show MPLS LDP bindings. Again, we have lots of IGP prefixes here each time with a local label and one or more remote label. So what do we have for the prefix We have one local label. Label 24 and four remote bindings. Now, which one are we going to use? Well, when we looked at the routing table we had two outgoing interfaces towards router three. The loopback of router three and that .3. So, the label we are going to use to forward packets towards router three for is labeled 27. And we were going to use this label in two places. Actually, we’re going to use it in a FIB when a packet comes in IP, we forward a packet labeled. When a packet comes in labeled, we forward the packet according to the LFIB table. Let’s first have a look at the FIB or CEF table. So, we do show IP CEF and indeed we see two entries. We are load balancing and we see that the outgoing label is labeled 27. This label 27 that will you see from router three. What do we put in the LFIB? Well, let’s first have a look at what we see in the LFIB. We just do show MPLF forwarding-table and we see the complete LFIB. Quite a bit of entries here. What do we have in an LFIB? Well, we always have per prefix, a local label, only one local label, and then one or more outgoing labels. We have the prefixes, then we have some are counting. It’s possible to track the amount of bytes for the packet switched per LSP. And then we have the outgoing interface and the next hop IP address of the downstream router if it’s not a point-to-point interface. So, that’s what we have. But we only want to look at the entry for So, show MPLS fowarding-table What do we see? We see that indeed the local label is 24 which was the local assigned by LEP. And we have the outgoing label again. 27, the same outgoing label as in the FIB or the CEF table. And again, we are load balancing towards router three. There’s one more thing you can do. Which is, you can specify the detail keyword behind the command and it will show you a bit more information. Notably, you can see the complete label stack being pushed. Now in some cases, we push more than one label. It could be two or three labels. Then you will see the complete label stack that we push here. So, if you want to see in the case we are pushing two or more labels, all of the labels, you will have to use the show MPLS forwarding-table command with the detail keyword. Another thing that might be useful, is that if you don’t know that you are forwarding packets for a particular prefix but you know that the packets will come in with the label 24 for example, you can look at an LFIB entry by specifying the incoming label. And you just do that by typing the command: show MPLS forwarding-table labels and then the incoming label, in this case label 24. And again, you see our LFIB entry that we have here for the incoming label 24.

Written by admin