Systems and methods for a VLAN switching and routing service
Systems and methods for a VLAN switching and routing service (VSRS) are disclosed herein. A method can include generating a table for an instance of a VSRS, which VSRS couples a first virtual layer 2 network (VLAN) with a second network. The table can contain information identifying IP addresses, MAC addresses, and virtual interface identifiers for instances within the virtual layer 2 network. The method can include receiving with the VSRS a packet from a first instance designated for delivery to a second instance within the virtual layer 2 network, identifying with the VSRS the second instance within the virtual layer 2 network for delivery of the packet based on information received with the packet and information contained within the table, and delivering the packet to the identified second instance.
1. A method comprising:
generating a table for an instance of a VLAN switching and routing service (VSRS), the VSRS coupling a first virtual layer 2 network with a second network, wherein the table contains information identifying IP addresses, MAC addresses, and virtual interface identifiers for instances within the first virtual layer 2 network;
receiving with the VSRS a packet from a first compute instance for delivery to a second instance, wherein the first compute instance is inside of the second network, and wherein the second instance is inside of the first virtual layer 2 network;
identifying with the VSRS the second instance for delivery of the packet based on information received with the packet and information contained within the table; and
delivering the packet to the identified second instance.
2. The method of claim 1 , wherein the first virtual layer 2 network comprises a plurality of instances.
3. The method of claim 2 , wherein the first virtual layer 2 network comprises a plurality of layer 2 virtual network interface cards (L2 VNICs), and a plurality of switches, wherein each of the plurality of instances is communicatively coupled with a pair comprising a unique layer 2 virtual network interface card (L2 VNIC) and a unique switch.
4. The method of claim 3 , wherein identifying with the VSRS the second instance for delivery of the packet based on information received with the packet and information contained within the table comprises:
determining with the VSRS that the table does not include mapping information for the second instance;
suspending with the VSRS delivery of the packet;
broadcasting with the VSRS an ARP request to L2 VNICs in the first virtual layer 2 network, the ARP request containing an IP address of the second instance; and
receiving with the VSRS an ARP response from the L2 VNIC of the second instance.
5. The method of claim 4 , further comprising updating the table based on the received ARP response.
6. The method of claim 5 , wherein the second network comprises an L3 network.
7. The method of claim 5 , wherein the second network comprises a second virtual layer 2 network.
8. The method of claim 2 , wherein the table is generated based on communications received by the VSRS.
9. The method of claim 8 , further comprising instantiating the VSRS as a service on a plurality of hardware nodes.
10. The method of claim 9 , further comprising distributing the table across the hardware nodes.
11. The method of claim 10 , wherein the table distributed across the hardware nodes is accessible by another VSRS instantiation.
12. The method of claim 3 , wherein the packet received with the VSRS from the first compute instance comprises an encapsulated packet including address information.
13. The method of claim 12 , wherein the address information includes first address information identifying an address of the VSRS, and second address information identifying a destination IP address, wherein the destination IP address is the IP address of the second instance.
14. The method of claim 13 , wherein identifying with the VSRS the second instance for delivery of the packet based on information received with the packet and information contained within the table comprises:
decapsulating the packet;
accessing the second address information; and
looking up mapping for the packet in the table.
15. The method of claim 14 , wherein delivering the packet to the identified second instance comprises:
stripping the packet of the first address information; and
re-encapsulating the packet.
16. The method of claim 15 , wherein the packet is re-encapsulated with an layer 2 encapsulation.
17. The method of claim 16 , wherein the re-encapsulated packet includes the IP address of the first compute instance, the destination IP address of the second instance, and a destination MAC address of the second instance.
18. The method of claim 17 , delivering the packet to the identified second instance comprises delivering the packet to a tunnel end point of the second instance.
19. A system comprising:
a physical network comprising:
at least one processor; and
a network virtualization device,
wherein the at least one processor is configured to:
instantiate an instance of a VLAN switching and routing service (VSRS), the VSRS coupling a first virtual layer 2 network with a second network;
generate a table for the VSRS), wherein the table contains information identifying IP addresses, MAC addresses, and virtual interface identifiers for instances within the first virtual layer 2 network;
receive with the VSRS a packet from a first compute instance for delivery to a second instance, wherein the first compute instance is inside of the second network, and wherein the second instance is inside of the first virtual layer 2 network;
identify with the VSRS the second instance for delivery of the packet based on information received with the packet and information contained within the table; and
deliver the packet to the identified second instance.
20. A non-transitory computer-readable storage medium storing a plurality of instructions executable by one or more processors, the plurality of instructions when executed by the one or more processors cause the one or more processors to:
instantiate an instance of a VLAN switching and routing service (VSRS), the VSRS coupling a first virtual layer 2 network with a second network;
generate a table for the VSRS), wherein the table contains information identifying IP addresses, MAC addresses, and virtual interface identifiers for instances within the first virtual layer 2 network;
receive with the VSRS a packet from a first compute instance for delivery to a second instance, wherein the first compute instance is inside of the second network, and wherein the second instance is inside of the first virtual layer 2 network;
identify with the VSRS the second instance for delivery of the packet based on information received with the packet and information contained within the table; and deliver the packet to the identified second instance.