MPLS - label

MPLS, or Multi-Protocol Label Switching, is a technique used in high-performance telecommunications networks to direct data from one network node to the next based on short path labels rather than long network addresses. The core component of MPLS is the MPLS label.

  1. Structure and Size: An MPLS label is a short, fixed-length, 32-bit identifier attached to packets in an MPLS network. This label consists of four fields:

    • Label Value (20 bits): This is the actual value of the label, which is used to make forwarding decisions.
    • Traffic Class (3 bits): Formerly known as the EXP field, this is used for quality of service (QoS) prioritization and ECN (Explicit Congestion Notification).
    • Bottom of Stack (1 bit): This indicates whether the label is the last in a stack. MPLS supports label stacking, where multiple labels can be attached to a packet. The bottom of stack bit is set to 1 for the last label in the stack, and 0 for all others.
    • Time to Live (TTL) (8 bits): Similar to the TTL in IPv4 or IPv6 packets, this field helps in preventing loops by reducing the value at each hop; when it reaches zero, the packet is discarded.
  2. Purpose and Usage: The primary purpose of MPLS labels is to facilitate fast and efficient forwarding of packets through a network. In MPLS networks, packets are forwarded based on the label value, which corresponds to a predetermined path through the network (Label Switched Path or LSP). This path is established based on the network's topology and traffic engineering policies.

  3. Operation: MPLS operates at a layer that is generally considered to lie between traditional definitions of Layer 2 (data link layer) and Layer 3 (network layer) of the OSI Model, often referred to as a "Layer 2.5" protocol. When a packet enters the MPLS network, an MPLS label is attached to it by a Label Edge Router (LER). As the packet traverses the network, Label Switch Routers (LSRs) make forwarding decisions solely based on the MPLS label, without needing to inspect the IP header. This makes packet forwarding faster and more efficient than traditional IP routing.

  4. Label Distribution Protocol (LDP): LDP plays a critical role in MPLS networks as it primarily functions to manage the distribution of label information between routers in an MPLS network. LDP performs label distributions, establishes sessions between LSRs and performs additional operations.

  5. VPN labels: Beyond the labels assigned in simple MPLS, MPLS VPNs add additional labels to packets traversing an MPLS network. This is done to isolate traffic from different customers that are being served by the same MPLS infrastructure.

MPLS is widely used in service provider networks and in large enterprise networks to create efficient, scalable, and flexible networks that can handle a variety of traffic types and service requirements.

Links:

https://forum.networklessons.com/t/mpls-layer-3-vpn-explained/1287/223?u=lagapides

https://networklessons.com/mpls/mpls-labels-and-devices

https://networklessons.com/mpls/mpls-ldp-label-distribution-protocol

https://networklessons.com/mpls/mpls-layer-3-vpn-explained