Search code examples
network-programmingroutesipv4subnetesxi

Can you have multiple ESXIs with multiple VMs all using the same subnet without a physical router between a switch and the ESXI hosts/VMs?


We will assume the following for the example:

  • a IPv4 class C (routable real world IP addresses)
  • 2 physical servers (ESXI hosts)
  • multiple VMs on each server with IP addresses on the same subnet

I am wanting to know if it is possible and will the following work:

Have an internet connection with BGP etc feeding into a network switch (not a managed switch) so assume all routing to and from the network switch to the router and then to the internet is correct and working, then connect the 2 servers to the switch, set up multiple VMs on each of the ESXI hosts.

Would communication to the VM set with a specific IP address in the subnet work regardless of the esxi host IP (there is only the ESXI hypervisor, no vmware management add-ons purchased)?

eg:

server1 (esxi host) has an IP of xxx.xxx.xxx.1(/24) and the vm I want to access has an IP of xxx.xxx.xxx.5 then additionally server2 (esxi host) has an IP of xxx.xxx.xxx.2 and the second vm I want to access has an IP of xxx.xxx.xxx.6 (hosted on server2)

Is there anything special required or is the request to the IP broadcast initially to create the path between the physical switch and the VM that is configured with the IP address requested?


Solution

  • Network classes are dead, obsoleted by CIDR in 1993. What used to be class C back then is referred to as /24 since.

    You can't use a basic switch to run BGP but I'm assuming there's an upstream router that handles all the subnet routing and possibly NAT.

    Would communication to the VM set with a specific IP address in the subnet work regardless of the esxi host IP (there is only the ESXI hypervisor, no vmware management add-ons purchased)?

    If you connect an untagged port group to a host pNIC then all the VMs in that group can talk to each other and to the upstream router. You can use a single ESXi host, two, a dozen, it doesn't matter. The ESXis' host IP addresses are irrelevant and should be on another IP subnet - since you're using an unmanaged switch incapable of VLAN tagging, you'll need additional host pNICs and network connections for host management.

    Is there anything special required or is the request to the IP broadcast initially to create the path between the physical switch and the VM that is configured with the IP address requested?

    Not sure if I understand that. In the above scenario, the broadcast domain spans all VMs (in the untagged port group) and the router, connected by the unmanaged switch. There's nothing else required.

    You might want to set up DHCP with reserved addresses or manually configured, static IP addresses for the VMs though.