- label creation and distribution
- table creation at each router
- label-switched path creation
- label insertion/table lookup
- packet forwarding
The source sends its data to the destination. In an MPLS domain, not all of the source traffic is necessarily transported through the same path. Depending on the traffic characteristics, different LSPs could be created for packets with different CoS requirements.
In Figure 6, LER1 is the ingress and LER4 is the egress router.

Figure 6. LSP Creation and Packet Forwarding through an MPLS Domain
Table 1 illustrates the step-by-step MPLS operations that occur on the data packets in an MPLS domain.
| MPLS Actions | Description |
| label creation and label distribution |
|
| table creation |
|
| label switched path creation | As shown by the dashed blue lines in Figure 6, the LSPs are created in the reverse direction to the creation of entries in the LIBs. |
| label insertion/table-lookup |
|
| packet forwarding | With reference to Figure 6 let us examine the path of a packet as it to its destination from LER1, the ingress LSR, to LER4, the egress LSR.
|
Table 1. MPLS Actions
Table 2 shows a simple example of the LIB tables.
| Input Port | Incoming Port Label | Output Port | Outgoing Port Label |
| 1 | 3 | 3 | 6 |
| 2 | 9 | 1 | 7 |
Table 2. Example LIB Table
It is interesting to consider the example of two streams of data packets entering an MPLS domain:
- One packet stream is a regular data exchange between servers (e.g., file transfer protocol [FTP]).
- The other packet stream is an intensive video stream, which requires the traffic engineering parameters of QoS (e.g., videoconferencing).
- These packet streams are classified into 2 separate FECs at the ingress LSR.
- The label mappings associated with the streams are 3 and 9, respectively.
- The input ports at the LSR are 1 and 2, respectively.
- The corresponding output interfaces are 3 and 1, respectively.
- Label swapping must also be done, and the previous labels must be exchanged for 6 and 7, respectively.
Tunneling in MPLS
A unique feature of MPLS is that it can control the entire path of a packet without explicitly specifying the intermediate routers. It does this by creating tunnels through the intermediary routers that can span multiple segments. This concept is used in provisioning MPLS–based VPNs.
Consider the scenario in Figure 7. LERs (LER1, LER2, LER3, and LER4) all use BGP and create an LSP between them (LSP 1). LER1 is aware that its next destination is LER2, as it is transporting data for the source, which must go through two segments of the network. In turn, LER2 is aware that LER3 is its next destination, and so on. These LERs will use the LDP to receive and store labels from the egress LER (LER4 in this scenario) all the way to the ingress LER (LER1).

Figure 7. Tunneling in MPLS
However, for LER1 to send its data to LER2, it must go through several (in this case three) LSRs. Therefore, a separate LSP (LSP 2) is created between the two LERs (LER1 and LER2) that spans LSR1, LSR2, and LSR3. This, in effect, represents a tunnel between the two LERs. The labels in this path are different from the labels that the LERs created for LSP1. This holds true for LER3 and LER4, as well as for the LSRs in between them. LSP 3 is created for this segment.
To achieve this, the concept of a label stack is used when transporting the packet through two network segments. As a packet must travel through LSP 1, LSP 2, and LSP 3, it will carry two complete labels at a time. The pair used for each segment is (1) first segment, label for LSP 1 and LSP 2 and (2) second segment, label for LSP 1 and LSP 3.
When the packet exits the first network and is received by LER3, it will remove the label for LSP 2 and replace it with LSP 3 label, while swapping LSP 1 label within the packet with the next hop label. LER4 will remove both labels before sending the packet to the destination.
Multicast Operation
The multicast operation of MPLS is currently not defined. However, a general approach has been recommended whereby an incoming label is mapped to a set of outgoing labels. This can be constructed via a multicast tree. In this case, the incoming label will bind to the multicast tree and a set of output ports is used to transmit the packet. This operation is quite conducive to a local-area-network (LAN) environment. In a connection-oriented network such as ATM, the point-to-multipoint switched paths (VCCs) can be used for distributing multicast traffic.


