1. A system for implementing a logical network that comprises a set of end machines, a first logical middlebox, and a second logical middlebox, the end machines and the first and second logical middleboxes connected in the logical network by a set of logical forwarding elements, the system comprising: a set of physical nodes, wherein each of the nodes executes: an end machine of the logical network; a managed forwarding element that implements the set of logical forwarding elements of the logical network; and a middlebox element that implements the first logical middlebox of the logical network, wherein a first middlebox element executing on a first node in the set of nodes and a second middlebox element executing on a second node in the set of nodes implement a same configuration for the first logical middlebox; a physical middlebox appliance that implements the second logical middlebox; a set of network controllers for providing configuration data to the managed forwarding elements, middlebox elements, and physical middlebox appliance, wherein the set of network controllers receive configuration data for the logical network, identify the set of nodes to which to distribute the logical network configuration data, and distribute configuration data for the first logical middlebox to the middlebox elements of the identified set of nodes.