Patent ID: 7889711

Claim:
A method comprising: receiving, with a routing engine of a network device, configuration data defining a forwarding equivalence class (FEC) filter that associates a label distribution protocol (LDP) FEC with one or more actions, wherein the network device is positioned between an ingress network device and an egress network device for a label switched path (LSP); installing, with the routing engine of the network device, the FEC filter within forwarding information of a packet forwarding engine of the network device so as to associate the FEC filter with a next hop of the forwarding information corresponding to the LDP FEC; receiving, with the packet forwarding engine of the network device positioned between the ingress network device and the egress network device for the LSP, a multi-protocol label switching (MPLS) data packet having an MPLS label that corresponds to the LSP in accordance with a label distribution protocol (LDP); examining, with the packet forwarding engine of the network device, the forwarding information to select a next hop for the packet based on the MPLS label of the received MPLS packet; determining, with the packet forwarding engine, an MPLS label associated with the selected next hop to be used in place of the MPLS label of the received MPLS data packet when forwarding the MPLS packet to the selected next hop; and selectively applying, with the packet forwarding engine of the network device, the FEC filter to the MPLS data packet when the selected next hop for the MPLS data packet is associated with the FEC filter by the forwarding information to perform the one or more actions of the FEC filter, wherein selectively applying the FEC filter includes applying the FEC filter before forwarding the MPLS data packet to the selected next hop.