Network control system for configuring middleboxes
Some embodiments provide a method for configuring a logical middlebox in a hosting system that includes a set of nodes. The logical middlebox is part of a logical network that includes a set of logical forwarding elements that connect a set of end machines. The method receives a set of configuration data for the logical middlebox. The method uses a stored set of tables describing physical locations of the end machines to identify a set of nodes at which to implement the logical middlebox. The method provides the logical middlebox configuration for distribution to the identified nodes.
1. For a middlebox element executes on a host computer that executes a plurality of end machines belonging to a plurality of logical networks, a method comprising:
receiving a data packet from a managed forwarding element operating on the host computer;
based on a tag added to the data packet by the managed forwarding element, identifying one of a plurality of logical middleboxes implemented by the middlebox element for a plurality of logical networks, the tag being associated with the identified logical middlebox; wherein the tag enables the middlebox to use appropriate set of packet processing rules in order to perform operations on the packet;
processing the data packet according to a configuration for the identified logical middlebox; and
sending the processed data packet to the managed forwarding element.
2. The method of claim 1 , wherein the data packet is sent to the managed forwarding element by one of the end machines hosted on the host computer.
3. The method of claim 2 , wherein the end machine belongs to a same logical network as the identified logical middlebox.
4. The method of claim 1 , wherein the tag is prepended to the data packet by the managed forwarding element.
5. The method of claim 1 , wherein identifying the logical middlebox comprises mapping the tag to the logical middlebox using a binding table.
6. The method of claim 1 , wherein the processed data packet is sent to the managed forwarding element with the tag.
7. The method of claim 1 , wherein the managed forwarding element sends the data packet to the middlebox element according to a routing policy that routes the data packet based on data other than a destination network address of the data packet.
8. The method of claim 7 , wherein the field is an ingress port through which the data packet was received.
9. The method of claim 7 , wherein the managed forwarding receives the processed data packet and subsequently routes the processed data packet based on the destination network address of the processed data packet.
10. A non-transitory machine readable medium storing a middlebox element for execution by at least one processing unit of a host computer that executes a plurality of end machines belonging to a plurality of logical networks, the middlebox element comprising sets of instructions for:
receiving a data packet from a managed forwarding element operating on the host 6 computer;
based on a tag added to the data packet by the managed forwarding element, identifying one of a plurality of logical middleboxes implemented by the middlebox element for a plurality of logical networks, the tag being associated with the identified logical middlebox; wherein the tag enables the middlebox to use appropriate set of packet processing rules in order to perform operations on the packet;
processing the data packet according to a configuration for the identified logical middlebox; and
sending the processed data packet to the managed forwarding element.
11. The non-transitory machine readable medium of claim 10 , wherein the data packet is sent to the managed forwarding element by one of the end machines hosted on the host computer.
12. The non-transitory machine readable medium of claim 11 , wherein the end machine belongs to a same logical network as the identified logical middlebox.
13. The non-transitory machine readable medium of claim 10 , wherein the tag is prepended to the data packet by the managed forwarding element.
14. The non-transitory machine readable medium of claim 10 , wherein the set of instructions for identifying the logical middlebox comprises a set of instructions for mapping the tag to the logical middlebox using a binding table.
15. The non-transitory machine readable medium of claim 10 , wherein the processed data packet is sent to the managed forwarding element with the tag.
16. The non-transitory machine readable medium of claim 10 , wherein the managed forwarding element sends the data packet to the middlebox element according to a routing policy that routes the data packet based on data other than a destination network address of the data packet.
17. The non-transitory machine readable medium of claim 16 , wherein the field is an ingress port through which the data packet was received, wherein the managed forwarding receives the processed data packet from the middlebox element and subsequently routes the processed data packet based on the destination network address of the processed data packet.
18. The non-transitory machine readable medium of claim 10 , wherein the plurality of logical middleboxes are one of firewalls, network address translators, and load balancers.