Patent ID: 8615009

Claim:
A method comprising: receiving, with a network device, a packet having header information; accessing, with a forwarding engine of a forwarding plane of the network device, a forwarding structure of the forwarding plane to select a first logical interface to which to forward the packet based on the header information, wherein the forwarding structure comprises a plurality of entries that each refer to one of a plurality of logical interfaces, wherein the first logical interface comprises one of the plurality of logical interfaces, and wherein the first logical interface corresponds to a pseudo-device interface module of the forwarding plane of the network device; forwarding, with the forwarding engine, the packet to the pseudo-device interface module; applying, with the pseudo-device interface module, a set of metadata to the packet; applying, with the pseudo-device interface module, a header to the packet; receiving, with the forwarding engine, the packet from the pseudo-device interface module; after receiving the packet from the pseudo-device interface, accessing, with the forwarding engine, the forwarding structure to select, based on the header applied to the packet, a second logical interface of the plurality of logical interfaces to which to forward the packet, wherein the second logical interface is mapped to a physical output interface of the network device associated with a service complex external to the network device; and forwarding, with the forwarding engine, the packet to the external service complex via the physical output interface, wherein the set of metadata allows the external service complex to determine a set of services to be applied to the packet based on the set of metadata.