Reputation: 163
I have an ESXi 6.5 Host with that is connected to two networks.
The first network uses Default Gateway 192.168.100.50 while the second network uses a different default gateway and subnet mask (255.255.255.192). I can connect to both networks with a dedicated server but not with a VM.
I have created a second Virtual Switch (vSwitch 2) and set it to connect to the second vmnic (vmnic1). I have not created a second VMkernal NIC. I have created an additional Port Group (VM Network 2) and set it to use vSwitch 2 and VLAN ID 1. I have set the Network Adapter in my virtual machine to use VM Network 2.
It was suggested to add static routes to the routing table, since the two connections use a different default gateway, but it kept saying no route to that subnet exists.
How do you add a second network to VMware that has a different gateway?
Upvotes: 0
Views: 2262
Reputation: 163
I ended up finding a way to add the second network which worked, but I'm not sure if it's a recommended setup:
Rather than adding an additional vSwitch / Port Group, I simply added an additional Uplink to the existing vSwitch, then added a second network adapter to my VM which used the same Port Group (in other words, I added the same network adapter to my VM twice).
Everything appeared to work fine using this method, and I did not have to make any changes to the routing table.
Upvotes: 0