The idea
A provider's three routers, edgeA, coreRouter and edgeB, carry the laptop's pings to fileServer at another site. You will make them forward by a short label that edgeA puts on, not by the address: that is MPLS, multiprotocol label switching.
Steps
-
Forwarding by address
OSPF filled the routers' routing tables. Ask edgeA the way to fileServer, then read coreRouter's label table, where MPLS keeps labels. Without labels, every router looks up the address again.
edgeA:~# ip route get 10.0.4.10 coreRouter:~# ip -f mpls route laptop:~# ping -c 2 -W 2 10.0.4.10
-
Push: edgeA puts a label on
edgeA, the ingress edge where traffic enters, will push label 100 onto packets for fileServer (
encap mpls 100). coreRouter has no entry for 100 yet, and a labelled packet goes only where its label says.edgeA:~# ip route add 10.0.4.10/32 encap mpls 100 via 10.0.12.3 laptop:~# ping -c 2 -W 1 10.0.4.10
Pro
3 more steps in the app
- Swap: the core trades 100 for 200
- The core never reads the address
- LDP hands out the labels