A method for a network controller that manages a plurality of logical networks , wherein each logical network comprises a set of logical forwarding elements that connect together a set of virtual machines operating on a plurality of different physical host machines , wherein the logical forwarding elements comprise logical switching and logical routing elements, and wherein managed forwarding elements operate on the plurality of different physical host machines and implement the logical forwarding elements by processing packets sent to and received from the virtual machines in each of the logical networks , the method comprising: receiving a specification of a logical network , wherein the specification comprises configurations for a logical service node and for a set of logical service node ports of the logical service node, wherein each logical service node port is connected to a corresponding logical port of a different logical switching element in the set of logical forwarding elements such that the configuration for each respective logical service node port is applicable to the respective logical switching element that is connected to the respective logical service node port via a corresponding logical port of the respective logical switching element and one or more virtual machines in the set of virtual machines that connect to logical ports of the respective logical switching element ; selecting at least one service node host machine to host the logical service node , wherein the service node host machine is selected from a plurality of service node host machines which are designated for hosting such logical service nodes ; and in response to the received specification of the logical network , generating logical service configuration information for distribution to the selected service node host machine , wherein the logical service configuration information comprises a set of data tuples for use by the selected service node host machine to provide at least one service by the logical service node to the set of virtual machines in the logical network . receiving a specification of a logical network , wherein the specification comprises configurations for a logical service node and for a set of logical service node ports of the logical service node, wherein each logical service node port is connected to a corresponding logical port of a different logical switching element in the set of logical forwarding elements such that the configuration for each respective logical service node port is applicable to the respective logical switching element that is connected to the respective logical service node port via a corresponding logical port of the respective logical switching element and one or more virtual machines in the set of virtual machines that connect to logical ports of the respective logical switching element ; selecting at least one service node host machine to host the logical service node , wherein the service node host machine is selected from a plurality of service node host machines which are designated for hosting such logical service nodes ; and in response to the received specification of the logical network , generating logical service configuration information for distribution to the selected service node host machine , wherein the logical service configuration information comprises a set of data tuples for use by the selected service node host machine to provide at least one service by the logical service node to the set of virtual machines in the logical network . <EOS>