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. A method for performing middlebox operations at a middlebox element having a plurality of middlebox instances, the method comprising:
receiving a data packet from a first managed forwarding element via a tunnel between the managed forwarding element and the middlebox element, wherein the first managed forward element executes on a first host computer to implement a first plurality of logical networks;
based on a tag that the managed forwarding element associated with the data packet, selecting a particular middlebox instance associated with the tag from the plurality of middlebox instances;
using the selected middlebox instance to perform a middlebox operation on the received packet; and
sending the processed data packet to a second managed forwarding element that implements a second plurality of logical networks.
2. The method of claim 1 , wherein:
the tag identifies the particular middlebox instance; and
the particular middlebox instance is associated with a particular logical network.
3. The method of claim 2 , wherein the particular logical network belongs to the first and second pluralities of logical networks implemented respectively by the first and second managed forwarding elements.
4. The method of claim 2 , wherein the first managed forwarding element receives the data packet from a particular end machine that is associated with the particular logical network and executes on the first host computer, wherein the managed forwarding element selects the tag based on the particular logical network associated with the particular end machine from which the first managed forwarding element receives the data packet.
5. The method of claim 1 , wherein the middlebox element and the second managed forwarding element execute on a same computing device.
6. The method of claim 1 , wherein the second managed forwarding element is a pool node that performs logical network processing on the processed data packet and tunnels the processed data packet to a third managed forwarding element executing on a second host computer to implement a third plurality of logical networks.
7. The method of claim 6 , wherein a first end machine that is a source of the data packet executes on the first host computer and a second end machine that is a destination of the processed data packet executes on the second host computer.
8. The method of claim 7 , wherein:
the first end machine connects to a first logical switch of a particular logical network;
the second end machine connects to a second logical switch of the particular logical network; and
the first managed forwarding element is configured to associate the tag and send the data packet to the middlebox element based on a routing policy for a logical router to which the first and second logical switches connect, the routing policy based at least partially on a field other than a destination network address of the data packet.
9. The method of claim 8 , wherein the second managed forwarding element routes the processed data packet and tunnels the processed data packet to the third managed forwarding element based on the destination network address of the processed data packet.
10. The method of claim 1 , wherein selecting the particular middlebox instance comprises mapping the tag to the particular middlebox instance using a binding table stored by the middlebox element.
11. A non-transitory machine readable medium storing a middlebox element which when executed by at least one processsor performs middlebox operations, the middlebox element having a plurality of middlebox instances and comprising sets of instructions for:
receiving a data packet from a first managed forwarding element via a tunnel between the managed forwarding element and the middlebox element, wherein the first managed forward element executes on a first host computer to implement a first plurality of logical networks;
based on a tag that the managed forwarding element associated with the data packet, selecting a particular middlebox instance associated with the tag from the plurality of middlebox instances;
using the selected middlebox instance to perform a middlebox operation on the received packet; and
sending the processed data packet to a second managed forwarding element that implements a second plurality of logical networks.
12. The non-transitory machine readable medium of claim 11 , wherein:
the tag identifies the particular middlebox instance; and
the particular middlebox instance is associated with a particular logical network.
13. The non-transitory machine readable medium of claim 12 , wherein the particular logical network belongs to the first and second pluralities of logical networks implemented respectively by the first and second managed forwarding elements.
14. The non-transitory machine readable medium of claim 12 , wherein the first managed forwarding element receives the data packet from a particular end machine that is associated with the particular logical network and executes on the first host computer, wherein the managed forwarding element selects the tag based on the particular logical network associated with the particular end machine from which the first managed forwarding element receives the data packet.
15. The non-transitory machine readable medium of claim 11 , wherein the middlebox element and the second managed forwarding element execute on a same computing device.
16. The non-transitory machine readable medium of claim 11 , wherein the second managed forwarding element is a pool node that performs logical network processing on the processed data packet and tunnels the processed data packet to a third managed forwarding element executing on a second host computer to implement a third plurality of logical networks.
17. The non-transitory machine readable medium of claim 16 , wherein a first end machine that is a source of the data packet executes on the first host computer and a second end machine that is a destination of the processed data packet executes on the second host computer.
18. The non-transitory machine readable medium of claim 17 , wherein:
the first end machine connects to a first logical switch of a particular logical network;
the second end machine connects to a second logical switch of the particular logical network; and
the first managed forwarding element is configured to associate the tag and send the data packet to the middlebox element based on a routing policy for a logical router to which the first and second logical switches connect, the routing policy based at least partially on a field other than a destination network address of the data packet.
19. The non-transitory machine readable medium of claim 18 , wherein the second managed forwarding element routes the processed data packet and tunnels the processed data packet to the third managed forwarding element based on the destination network address of the processed data packet.
20. The non-transitory machine readable medium of claim 11 , wherein the set of instructions for selecting the particular middlebox instance comprises a set of instructions for mapping the tag to the particular middlebox instance using a binding table stored by the middlebox element.