1. A non-transitory machine readable medium of a controller of a network control system for configuring a plurality of middlebox instances to implement a middlebox in a distributed manner in a plurality of hosts, the non-transitory machine readable medium storing sets of instructions for: assigning a first set of identifiers to a first middlebox instance that associates an identifier in the first set with a first packet; and assigning a second set of identifiers to a second middlebox instance that associates an identifier in the second set with a second packet.