I have a guest computer with internet access through the NAT option in VMware. I also have a connection to VMnet2. What I need to do now is share that internet connection to the guests in VMnet2 (since they are stuck there, can't put them in another net but I need an internet connection on them). How do I do this? The guest connected to the internet can be Linux or Windows, I don't care I just need it to work.
Reading http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1006480 and http://www.vmware.com/support/ws55/doc/ws_net_configurations_common.html explains that the three types of networks are actually virtual ethernet "switches" which can be configured in one of three ways - host only, bridge, or NAT.
Virtual machines assigned to the same switch can see each other, and are effectively on the same (virtual) Ethernet segment. The type of "switch" determines the behavior when connecting to the outside world.
- In the NAT mode, there is a virtual NAT router between the virtual switch and the host machine's internet connection, which prevents the virtual machines from being seen by others on the host network, but doesn't affect the ability to reach the other hosts via the VM.
- In the host-only mode, the virtual switch is on a different Ethernet segment entirely, with connectivity to other virtual machines assigned to the same switch, and to the host itself.
- In the bridged mode, it's as if the virtual switch was physically plugged into the same ethernet segment as the host's ethernet connection. The machines have IPs on the same network, and are fully accessible to virtual and physical hosts sharing that segment.
Depending on your security requirements, you can either assign the other machines to the same NAT "switch", or set up secondary virtual interfaces on all the machines in host-only mode, and configure one of the virtual machines to be on both the NAT switch and the host-only switch and act as a gateway, in the same way you'd do with a physical network, ie, iptables on Linux, or ICS or third party software on Windows.