Label Switching and Label-switched Paths (LSPs)
Multi-Protocol Label Switching (MPLS) converts your routed network to something closer to a switched network and offers transport efficiencies that simply aren’t available in a traditional IP-routed network. Instead of forwarding packets on a hop-by-hop basis, paths are established for particular source-destination pairs. The predetermined paths that make MPLS work are called label-switched paths (LSPs).
In a hop-by-hop router configuration, packets enter a router, the router examines the header, and then the router sends the packet to the next hop based on the ultimate destination address.
In a label-switched network, the operation is different. Packets aren’t forwarded on a hop-by-hop basis. Instead, paths are established for particular source-destination pairs.
In the topology of an IP-routed network, traffic from router 1 is forwarded to router 4, which then makes its own forwarding decision, and so on, until the packets arrive at router 9.
In a label-switched network, a path from router 1 to router 9 is created so that all traffic from router 1 to router 9 takes the same deterministic path. Because a preset path exists, individual routing nodes don’t need to do a forwarding lookup on the packets as they enter the router.
Instead, each node must keep information only on the paths that have been established through it (so switching tables tend to be much smaller than routing tables). As packets from that flow enter a router, the router can switch the packets on to a predefined path toward its destination through the network.
Put simply, if router 4 knows that for all traffic from router 1 to router 9, the next stop along the way is router 6, it can just forward the packets to that predetermined hop without ever looking up the route in its routing table.
The predetermined paths that make MPLS work are called label-switched paths (LSPs). Routers in an MPLS network exchange MPLS information to set up these paths for various source-destination pairs.
What is important here is that every router along the LSP from router 1 to router 9 must have the same view of the LSP. If a switched path is to have real efficiencies over typical IP routing, every router on the LSP must be able to switch the packet forward.
MPLS is often called a layer 2.5 technology because it shares both routing (layer 3) and switching (layer 2) characteristics. The fact that paths are preset makes MPLS behave quite like a layer 2 protocol. However, MPLS’s capability to use signaling protocols, which themselves rely on routing knowledge for LSP establishment and traffic engineering and adjust on the fly, definitely makes it more layer 3ish.