Label operations

If an LSR is the ingress for a specific IP prefix, LDP programs a push operation for the prefix in the forwarding engine and creates an LSP ID for the mapped next-hop label forwarding entry (NHLFE) (LTN) and an LDP tunnel entry in the forwarding plane. LDP also informs the tunnel table manager (TTM) of this tunnel. Both the LTN entry and the tunnel entry have an NHLFE for the label mapping that the LSR received from each of its next-hop peers.

If the LSR behaves as a transit for a specific IP prefix, LDP programs a swap operation for the prefix in the forwarding engine. Programming a swap operation results in the creation of an incoming label map (ILM) entry in the forwarding plane. The ILM entry must map an incoming label to multiple NHLFEs. If the LSR is an egress for a specific IP prefix, LDP programs a POP entry in the forwarding engine. Programming a POP entry results in the creation of an ILM entry in the forwarding plane, but NHLFE entries are not created.

When unlabeled packets arrive at the ingress LER, the forwarding plane consults the LTN entry and uses a hashing algorithm to map the packet to one of the NHLFEs (push label), and forwards the packet to the corresponding next-hop peer. For labeled packets arriving at a transit or egress LSR, the forwarding plane consults the ILM entry and either uses a hashing algorithm to map it to one of the NHLFEs (swap label), or routes the packet if there are no NHLFEs (pop label).

A static FEC swap is not activated unless there is a matching route in the system route table that also matches the user-configured static FEC next hop.