Label Stacking in MPLS Networks
As packets are forwarded in a label-switching framework, MPLS routers encapsulate the packets with special headers called labels. A label basically tells the router which LSP it belongs to. The router can then use the ingress port and the LSP information to determine where the next hop in the LSP is. You can actually add labels to packets that already have labels (known as label stacking).
This topology has an LSP defined between router 1 and router 11. But router 4 and router 8 also have an LSP between them. In this scenario, you have an LSP containing an LSP. So as IP traffic enters the first LSP, the ingress router adds an MPLS label. That label is used to switch the packet through to router 4.
Router 4 is an ingress router for an LSP. As the ingress router, it pushes a new label to the packet. That label is used to switch the packet forward to router 8. Router 8, the egress router for the LSP, removes the label and forwards the packet based on the original label, which is exactly what Layer-3 VPNs do.
In the context of a single network, label stacking may not be that interesting, but imagine now that network boundaries appear around the LSPs.
The topology is the same except that now carrier networks are identified. You want to switch a packet from the branch office (router 1) to headquarters (router 9). That path traverses your own network as well as a carrier network. You want to switch the packet through your network, so you use an LSP and push your own label to the packet.
Meanwhile, the carrier wants to switch all your traffic through an LSP. So as the packet enters the carrier network, the carrier can add its own label and switch the packet through its transit network. When the packet is handed back to your headquarters, the label has been removed, and you can continue switching the packet to the eventual destination (router 9 in this example).