How does you physical network setup look like. Do you use separate switches for the different subnets. In case you are using a single switch, do you separate the subnets in VLANs? Depending on the capabilities of the physical switch, you could configure 802.1Q to allow the use of different subnets on the same ports, and still separate the traffic.
The server on a different subnet is connected to a switch port configured for VLAN10 only. (voice)
If your physical switches support VLAN s then I'd suggest you think of reconfiguring the ports for the ESXi host as trunk/tagged ports allowing the necessary VLANs. Then create VM port groups with the differnet VLAN-IDs on the ESXi host. This way you can use different subnets on the ESXi host without the need to have dedicated physical uplinks for each subnet.
I agree with the above posters.
If your physical switch supports VLAN's configure a trunk port and do the VLAN tagging on the vSwitch's on your hosts.
Like said above, this will save you having a dedicated physical uplink for every subnet.
How to setup VM in Different Subnet in VMware ESXi
- First, you need to have a working ESXi host. The setup isn’t that hard but is more than I’m going to go into here.
- Setup your switch port(s) that connect to the server as a “trunk” in Cisco speak with a “Native Vlan” set to what a majority of your servers use. That way you don’t have to setup tagging on every vNIC.
- If your looking to have a server that needs to talk to two different subnets like a firewall or my print server running FingerPrint, add another Ethernet adapter to your VM and assign it to your default network. Mine is “VM Network”.
- You need to check that the Virtual Network on your primary vSwitch allows all Vlans. By default it is set to “None(0)“. Set it to “All(4095)” or just the ones you want.
- Now, start up your VM and log in. Navigate to the Device Manager and select the network card you want to configure a different Vlan on.
- Once you configure the tagging, make sure that you have the IP addresses setup correctly. For a firewall type VM, you will have different IP’s and gateways on different subnets. If you have a server connecting to two private networks, only set a default gateway on the “Primary” network. Windows doesn’t like it if you set different gateways to the same routed network.
First excuse my english!
I installed a workstation 12 player and created an ESXI 5.5 with 2 VMs( a windows server 2012 as a Domain Controller and another VM windows 7 for testing)
My VMs and the ESXI have different IP networks( 192.168.1.1 for the VM DC and 10.30.254.70 for the ESXI) ,i tried the bridging and NATing steel can't ping neither my ESXI or the physical host.
How can i fix that and reach internet from my VMs.