shows the component architecture of an Edge LSR.
Edge LSRs also forward IP packets based on the IP destination
addresses of the packet and, optionally, label the packets if a
label exists. There are several possible combinations of
forwarding and labeling packets: - Forward the received
IP packet based on the IP destination address and send as an IP
packet
- Forward the received IP packet based on the IP
destination address and send as a labeled packet
-
Forward the received labeled packet based on the label, change
(swap) the label, and send the labeled packet
- Forward
the received labeled packet based on the label, remove the
label, and send the IP packet
These scenarios are
possible if the network is not configured properly: - A
received labeled packet is dropped if the label is not found in
the LFIB table, even if the IP destination exists in the IP
forwarding table, also called the FIB.
- A received IP
packet is dropped if the destination is not found in the IP
forwarding table (FIB table), even if there is an MPLS
label-switched path toward the destination.
Content 4.2 Assigning MPLS Labels to Packets
4.2.1 Label Allocation in a Frame Mode MPLS
Environment Figure lists the four steps a router uses for
label allocation and distribution in a Unicast IP routing
network and MPLS functionality, including label allocation and
distribution. The following steps detail what happens: Step
1 The routers exchange information using standard or
vendor-specific Interior Gateway Protocol (IGP), such as OSPF,
IS-IS, and EIGRP. Step 2 Local labels are generated.
One locally unique label is assigned to each IP destination
that is found in the main routing table and stored in the Label
Information Base (LIB) table. Step 3 Local labels are
propagated to adjacent routers, where these labels might be
used as next-hop labels (stored in the Forwarding Information
Base [FIB] and LFIB tables to enable label switching). Step
4 Every LSR builds its LIB, LFIB, and FIB data structures
based on received labels. These data structures contain label
information: - The LIB, in the control plane, is the
database that LDP uses. This database is where an IP prefix is
assigned a locally significant label that is mapped to a
next-hop label that has been learned from a downstream
neighbor.
- The LFIB, in the data plane, is the
database used to forward labeled packets. Local labels,
previously advertised to upstream neighbors, are mapped to
next-hop labels, previously received from downstream
neighbors.
- The FIB, in the data plane, is the
database used to forward unlabeled IP packets. A forwarded
packet is labeled if a next-hop label is available for a
specific destination IP network. Otherwise, a forwarded packet
is not labeled.
Label Allocation
Figure
shows how all routers learn about a network (Network X in this
example) via an IGP, such as OSPF, IS-IS, or EIGRP. In this
example, the IGP has converged and the FIB table on Router A
contains the entry for Network X that is mapped to the IP
next-hop address B. However, at this time, a next-hop label is
not available, which means that all packets are forwarded in
the traditional way as unlabeled packets. Allocating
Labels
Routers generate labels regardless of other
routers in the network (called asynchronous allocation of
labels) as shown in Figure . Although any of the routers in
this topology can be first to generate a label, for this
example we assume that Router B is the first router to generate
a label. Router B generates a locally significant and locally
unique label (for this example label 25), and assigns the label
to IP Network X. Note
Labels 0 to 15 are reserved.
LIB and LFIB Setup
When a label is assigned to an IP
prefix, the label is stored in two tables: LIB and LFIB, as
shown in Figure . The router uses the LIB table to maintain the
mapping between the IP prefix (Network X), the assigned label
(25), and the assigning router (local). The LFIB table is
modified to contain the local label mapped to the forwarding
action. In this example, the action is untagged because the
router has received no label for Network X from a neighbor. The
untagged action is used until the next-hop label is received
from the downstream neighbor, which in this case is Router C.
Content 4.2 Assigning MPLS Labels to
Packets 4.2.2 Label Distribution and
Advertisement MPLS adds a new piece of information that
adjacent routers must exchange. There are two possible
approaches to propagating this additional label information
between adjacent routers: - Extend the functionality of
existing routing protocols
- Create a new protocol
dedicated to exchanging labels
Extending the
functionality of existing router protocols requires much more
time and effort than creating a new protocol because of the
large number of different routing protocols that exist. This
first approach also causes interoperability problems between
routers that support the new functionality and routers that do
not. Therefore, the Internet Engineering Task Force (IETF)
selected the second approach as the standard, which is to
create a new protocol that is dedicated to exchanging labels.
The LDP in the control plane exchanges labels and stores them
in the LIB. Figure illustrates the next step
after a local label has been assigned. Router B propagates this
label, label 25, to all adjacent neighbors where the label can
be used as a next-hop label. The allocated label is advertised
to all neighbor LSRs, regardless of whether the neighbors are
upstream or downstream LSRs for the destination. Note
Because Router B cannot predict which routers might use
Router B as the downstream neighbor, Router B sends its local
mappings to all LDP neighbors. Receiving Label
Advertisement
Upon receiving an LDP update from Router
B, Routers A, C, and E can fill in the missing information in
their LIB, LFIB, and FIB tables as shown in Figure . -
Label 25, received from LSR B, is stored in the LIB table as
the label for Network X.
- Label 25 is attached to the
IP forwarding entry in the FIB table to enable the MPLS edge
functionality. Incoming IP packets are forwarded as labeled
packets.
- The local label in the LFIB table is mapped
to outgoing label 25 instead of to the untagged action.
Incoming labeled packets can be forwarded as labeled
packets.
Interim Packet Propagation Through an
MPLS Network
Sometimes a packet arrives at an MPLS
network before all routers have learned the label to Network X.
Figure shows an example of what happens in this case: Step
1 An unlabeled IP packet arrives at Router A. Step
2 The packet is forwarded based on the information found in
the FIB table on Router A. Step 3 Label 25, found in
the FIB table, is used to label the packet, and the packet is
forwarded to the next-hop router, Router B. Step 4
Router B must remove the label because LSR B has not yet
received any next-hop label (the action in the LFIB is
untagged). Step 5 Router B then forwards the packet as
a standard IP packet. Router A performs an IP lookup (Cisco
Express Forwarding [CEF] switching), whereas Router B performs
a label lookup (label switching) in which the label is removed
and a normal IP packet is sent out from Router B. This
functionality allows MPLS to continue packet forwarding even
though label distribution is not complete. Further Label
Allocation
Because all routers in an MPLS domain
asynchronously perform the same actions that Routers A and B
perform, a label switched path (LSP) tunnel is generated,
spanning from Router A to Router D. Figure illustrates how an
LDP update from Router C advertising label 47 for Network X is
sent to all adjacent routers, including Router B. Router D also
advertises a label for Network X. Since Network X is directly
connected to Router D, Router D sends an implicit null label