Patent ID: 8711838

Claim:
A method comprising: receiving, with a network device, a packet to be forwarded according to a label switching protocol; determining, with the network device, a service instance for the packet based on a client device from which the packet originated; determining, with the network device, one or more services to be applied to the packet based on the service instance for the packet; generating a label having a service instance portion including information that identifies the service instance for the packet and a service information portion including information that identifies the services to be applied to the packet, wherein the service instance portion comprises a first number of bits and wherein the service information portion comprises a second number of bits different than the first number of bits; prior to generating the label, receiving configuration data that associates a specified number of bits with the label, indicates the first number of bits associated with the service instance portion, and indicates the second number of bits associated with the service information portion; appending, with the network device, the label to the packet to form a Multi-Protocol Label Switching (MPLS)-encapsulated packet; and forwarding the MPLS-encapsulated packet via an output interface according to the label switching protocol.