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.
The description of each field is as follows.
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:
|
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.
In the following example, a PHP-capable LSP is established to forward MPLS packets.
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:
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.
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.
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.
The egress receives the IP packet and forwards it to 3.3.3.3/32.
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.
MPLS packets are forwarded as follows on nodes along an LSP:
The ingress searches the FIB and NHLFE tables.
The transit node searches the ILM and NHLFE tables.
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:
Searches the FIB and finds the tunnel ID mapped to a specific destination IP address.
Finds the NHLFE mapped to the tunnel ID in the FIB and associates the FIB entry with the NHLFE entry.
Checks the NHLFE for information about the outbound interface, next hop, outgoing label, and label operation type. The label operation type is Push.
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:
Searches the ILM table mapped to an MPLS label for the token.
Finds the NHLFE mapped to the token in the ILM table and associates the FIB entry with the NHLFE.
Searches for the NHLFE for information about the outbound interface, next hop, outgoing label, and label operation type.
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:
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.