MPLS label
also: MPLS header, label value, forwarding label
A short, fixed-length identifier prepended to network packets in MPLS (Multiprotocol Label Switching) that directs packet forwarding along predetermined paths instead of using traditional IP routing.
An MPLS label is a 20-bit value inserted between the Layer 2 (data link) and Layer 3 (IP) headers of a packet. It enables routers to make forwarding decisions based on the label value rather than inspecting the IP destination address, allowing for faster, more flexible packet routing.
Labels are assigned by Label Edge Routers (LERs) when packets enter the MPLS network and are swapped at each hop by Label Switching Routers (LSRs). Each router maintains a Label Forwarding Information Base (LFIB) that maps incoming label values to outgoing ports and new labels, creating explicit paths called Label Switched Paths (LSPs).
For example, an ISP might assign label 100 to all packets for a customer's VPN, ensuring they follow a specific low-latency route through the network. At each hop, routers swap label 100 to label 50, then 30, and so on, until the packet exits the MPLS domain and is forwarded based on its IP address again.