MPLS Forwarding Using the FIB and LFIB

Multiprotocol Label Switching
MPLS Forwarding Using the FIB and LFIB
To forward packets as shown in Figure 19-2, LSRs use both the CEF FIB and the MPLS LFIB
when forwarding packets. Both the FIB and LFIB hold any necessary label information, as well
as the outgoing interface and next-hop information.
The FIB and LFIB differ in that routers use one table to forward incoming unlabeled packets, and
the other to forward incoming labeled packets, as follows:
■ FIB—Used for incoming unlabeled packets. Cisco IOS matches the packet’s destination IP
address to the best prefix in the FIB and forwards the packet based on that entry.
■ LFIB—Used for incoming labeled packets. Cisco IOS compares the label in the incoming
packet to the LFIB’s list of labels and forwards the packet based on that LFIB entry.
Figure 19-3 shows how the three LSRs in Figure 19-2 use their respective FIBs and LFIB. Note
that Figure 19-3 just shows the FIB on the LSR that forwards the packet using the FIB and the
LFIB on the two LSRs that use the LFIB, although all LSRs have both a FIB and an LFIB.
Figure 19-3 Usage of the CEF FIB and MPLS LFIB for Forwarding Packets
The figure shows the use of the FIB and LFIB, as follows:
■ PE1—When the unlabeled packet arrives at PE1, PE1 uses the FIB. PE1 finds the FIB entry
that matches the packet’s destination address of 10.3.3.1—namely, the entry for 10.3.3.0/24
in this case. Among other things, the FIB entry includes the instructions to push the correct
MPLS label in front of the packet.
■ P1—Because P1 receives a labeled packet, P1 uses its LFIB, finding the label value of 22 in
the LFIB, with that entry stating that P1 should swap the label value to 39.
■ PE2—PE2 uses the LFIB as well, because PE2 receives a labeled packet; the matching LFIB
entry lists a pop action, so PE2 removes the label, forwarding an unlabeled packet to CE2.
Note that P1 and PE2 in this example never examined the packet’s destination IP address as part
of the forwarding process. Because the forwarding process does not rely on the destination IP
PE1 P1 PE2
IP 22 IP 39 IP IP
S0/0/1
Dest.
10.3.3.3
S0/1/0 Fa0/1
Prefix
10.3.3.0/24
Action
Push
Out.
Label
22
Out.
Int.
S0/0/1
PE1 CEF FIB
In Label
22
Action
Swap
Out.
Label
39
Out.
Int.
S0/0/1
P1 LFIB
Prefix
39
Action
Pop
Out.
Label
N/A
Out.
Int.
Fa0/1
PE2 LFIB
address, MPLS can then enable forwarding processes based on something other than the
destination IP address, such as forwarding based on the VPN from which the packet originated,
forwarding to balance traffic with traffic engineering, and forwarding over different links based on
QoS goals.