Multiprotocol Lable Switching (Mpls): How A Packet Travels Along A Lsp
How a packet travels along a LSP
When an IP packet enters an LSP, the ingress router examines the packet and assigns it a label based on its destination, attaches the label to the IT packet. The label transforms the packet from one that is forwarded based on its IP routing information to one that is forwarded based on information associated with the MPLS label. The basic configuration of an MPLS packet is given below: As showing in the figure above, the label value consists of 20 bits.
The packet is then forwarded to the next router in the LSP. This router and all subsequent routers in the LSP do not examine any of the IP routing information in the labeled packet. Rather, they use the MPLS label attached to the packet and look up information in their local MPLS forwarding table. They then replace the old label with a new label and forward the packet to the next router in the path. It is important to note that the MPLS labels have only local significance, and the label is replaced at each node within the MPLS network.
When the packet reaches the egress router, the label is removed, and the packet again becomes a native IP packet and is forwarded based on its IP routing information to it's destination.
Label switching: In a hop-by-hop router configuration, packets enter a router, the router examines the IP 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 are not 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. 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.