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, and wherein the table contains mapping information for IP addresses outside of the first virtual layer 2 network;
receiving with the VSRS a packet from a first instance designated for delivery to a second instance, wherein the second instance is outside 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 a destination IP address of the packet; and
looking up mapping for the packet in the table.
5. The method of claim 3 , wherein the packet received with the VSRS from the first instance comprises an encapsulated packet including address information.
6. The method of claim 5 , 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.
7. The method of claim 6 , 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.
8. The method of claim 7 , wherein delivering the packet to the identified second instance comprises:
stripping the packet of the first address information; and
re-encapsulating the packet.
9. The method of claim 8 , wherein the packet is re-encapsulated with an layer 3 encapsulation.
10. The method of claim 9 , wherein the re-encapsulated packet includes the IP address of the first instance and the destination IP address.
11. The method of claim 10 , wherein the second instance is inside of the second network.
12. The method of claim 11 , wherein the second instance is inside of a second virtual layer 2 network within the second network.
13. The method of claim 12 , wherein delivering the packet to the identified second instance comprises sending the re-encapsulated packet to a destination VSRS associated with the second virtual layer 2 network.
14. The method of claim 13 , wherein the destination VSRS is configured to:
receive the re-encapsulated packet;
remove the layer 3 encapsulation; and
forward the packet to the second instance.
15. The method of claim 11 , wherein the second instance is within a layer 3 subnet inside of the second network.
16. The method of claim 15 , wherein delivering the packet to the identified second instance comprises sending the re-encapsulated packet to a virtual router associated with the layer 3 subnet.
17. The method of claim 11 , wherein the second instance is outside of the second network.
18. The method of claim 17 , wherein delivering the packet to the identified second instance comprises sending the re-encapsulated packet to a gateway communicatively coupled to 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 instance of 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 instance designated for delivery to a second instance, wherein the second instance is outside 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 instance of 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 instance designated for delivery to a second instance, wherein the second instance is within 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.