< Home

MPLS Forwarding

Basic Concepts of MPLS Forwarding

  • Tunnel ID

    The system automatically allocates an ID to each tunnel. A tunnel ID uniquely identifies a tunnel interface for a specific upper layer application, such as VPN or route management. The tunnel is only meaningful to a local node.

    The tunnel ID is 32 bits long. Each field contained in a tunnel ID varies depending on the tunnel type.

    Figure 1 shows the tunnel ID structure.

    Figure 1 Tunnel ID structure

    The description of each field is as follows.

    Table 1 Description of each field of a tunnel ID

    Field

    Description

    Token

    An index used to search an MPLS forwarding table for a specific entry

    Sequence-Number

    Tunnel ID sequence number

    Slot-Number

    Slot number of an outbound interface that sends packets

    Allocation Method

    Method used to allocate tokens:
    • Global: All tunnels on a node share the public global token space. Each token must have a unique value.

    • Global with reserved tokens: Similar to the global method except that some tokens are reserved. Tunnels can only be established using unreserved tokens.

    • Per slot: Each slot uses its own tokens, which with a unique value. The tokens in one slot may have the same values as those in other slot.

    • Per slot with reserved tokens: Similar to the per slot method except that some tokens are reserved. Tunnels can only be established using unreserved tokens.

    • Per slot with different avail value: Similar to the per slot method except that a specific token range is allocated to each slot.

    • Mixed: Label spaces are created using both global and per slot methods but take effect based on the interface type. VLANIF interfaces or the interfaces of a backbone network use the label space created using the global method. Other interfaces use the label space created using the per slot method.

    • Mixed with 2 global space: Label spaces can be created using the global space 1 method, global space 2 method, and per slot method.

    • 2 global space: Label spaces can be created using both the global space 1 method and global space 2 method.

  • Next hop label forwarding entry (NHLFE)

    An NHLFE is used to guide MPLS packet forwarding.

    An NHLFE contains the following information:

    • Tunnel ID

    • Outbound interface

    • Next hop

    • Outgoing label

    • Label operation

  • Incoming label map (ILM)

    An ILM entry defines the mapping between an incoming label and a set of NHLFEs.

    An ILM entry contains the following information:

    • Tunnel ID

    • Incoming label

    • Inbound interface

    • Label operation

    A transit node creates ILM entries containing the mapping between labels and NHLFEs. The node searches an ILM table for an entry that matches a specific destination IP address before forwarding the packet.

  • FEC-to-NHLFE (FTN) map

    An FTN entry defines the mapping between a FEC and a set of NHLFEs.

    The FTN entry is only available on the ingress. You can obtain FTN information by searching for non-0x0 token values in a FIB.

MPLS Forwarding Process

In the following example, a PHP-capable LSP is established to forward MPLS packets.

Figure 2 MPLS label distribution and packet forwarding

As shown in Figure 2, an LSP for FEC with the destination address 3.3.3.3/32 is set up on an MPLS network.

The process of forwarding MPLS packets is as follows:

  1. The ingress receives an IP packet destined for 3.3.3.3/32. Then, the ingress adds Label Z to the packet and forwards it to the adjacent transit node.

  2. The transit node receives the labeled packet, swaps Label Z for Label Y in the packet, and forwards the packet to the penultimate transit node.

  3. The penultimate transit node receives the packet with Label Y. As the egress allocated Label 3 to the penultimate transit node, the node removes Label Y and forwards the IP packet to the egress.

  4. The egress receives the IP packet and forwards it to 3.3.3.3/32.

MPLS Processing on Each Node

When an IP packet enters an MPLS domain, the ingress searches the FIB to check whether the tunnel ID corresponding to the destination IP address is 0x0.

  • If the tunnel ID is 0x0, the packet is forwarded along the IP link.

  • If the tunnel ID is not 0x0, the packet is forwarded along an LSP.

Figure 3 shows the MPLS forwarding flow.

Figure 3 MPLS forwarding flow

MPLS packets are forwarded as follows on nodes along an LSP:

  1. The ingress searches the FIB and NHLFE tables.

  2. The transit node searches the ILM and NHLFE tables.

  3. The egress searches the ILM table.

FIB entries, ILM entries, and NHLFEs are associated with each other based on the token field in the tunnel ID.

  • The ingress performs the following steps:

    1. Searches the FIB and finds the tunnel ID mapped to a specific destination IP address.

    2. Finds the NHLFE mapped to the tunnel ID in the FIB and associates the FIB entry with the NHLFE entry.

    3. Checks the NHLFE for information about the outbound interface, next hop, outgoing label, and label operation type. The label operation type is Push.

    4. Pushes a label into an IP packet, processes the EXP field based on the QoS policy and TTL field and sends the encapsulated MPLS packet to the next hop.

  • A transit node performs the following steps:

    1. Searches the ILM table mapped to an MPLS label for the token.

    2. Finds the NHLFE mapped to the token in the ILM table and associates the FIB entry with the NHLFE.

    3. Searches for the NHLFE for information about the outbound interface, next hop, outgoing label, and label operation type.

    4. Processes the MPLS packets according to the specific label value:

      • If the label value is greater than or equal to 16, the label operation is Swap. The transit node replaces the existing label with a new label in the MPLS packet. At the same time, the transit node processes the EXP field and TTL field are processed. Then, the transit node forwards the MPLS packet with the new label to the next hop.

      • If the label value is 3, the label operation is Pop. The transit node removes the label from the MPLS packet. At the same time, the transit node processes the EXP field and TTL field. Then, the transit node forwards the packet over IP routes or based on the next layer label.

  • The egress performs the following steps:

    1. Searches for the label operation. The operation is Pop.
    2. Processes the EXP field and TTL field.
    3. Determines the forwarding path:
    • When the S field in the label is equal to 1, the label is at the bottom of the stack. Therefore, the egress forwards the packet over an IP route.

    • When the S field in the label is equal to 0, the label is not at the bottom of the stack. Therefore, the egress forwards the packet based on the next layer label.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic