How to use static IP addresses in the VMWare guests so they can communicate with other machines on the Win network

static-ipvmware-workstation

I use VMWare Workstation 12, have a Windows 10 host machine, and multiple Windows guest machines. I want all physical and virtual machines to be able to communicate with each other and I want all guest machines to have a static IP address so that I can create a network map of IP addresses and be certain to which machine a particular IP address is assigned.

I tried using NAT but my guest machines could not be seen by other physical machines on my network other than the host.

How can I make all VMs appear on my network to all other physical machines on my network?

Best Answer

What you want to do is use a Bridged network--not NAT.

Let's assume you have a Windows 10 host and VMWare Workstation 12 with multiple Windows guest machines (in principle, the advice here should apply to other non-Windows guest OSs and to recent versions of VMWare below VMWare 12). Also, I'll assume that you want each virtual machine to have its own IP address so that it can be found by any other Windows machine on your network.

To make this happen:

Launch the Virtual Network Editor from the VMWare Workstation's Edit menu. It's out of scope to cover this utility completely in this answer, but make sure you are working as Administrator; then ensure that VMnet 0 is of type Bridged and that its External Connection is set to your host's physical adapter.

After that, edit the virtual machine properties of your guest Windows OS and go to the Network Adapter section. Be sure to select Custom and specify VMnet0 as your specific virtual network. Also, be sure to check Connect at power on.

  • Boot into your guest OS, go to Network and Sharing Center, and go to Change adapter settings.
  • Right-click to get to properties of your Ethernet adapter, and scroll to Internet Protocol Version 4.
  • Select that and click Properties. Use the General tab to specify a specific IP address, Subnet mask, and Default gateway.
  • Make sure that the IP address is in the same subnet as your host and that you're using the same gateway IP address as the host machine. (If you're unsure what this is, go to your host, open a command prompt, and type IPConfig, and look at the gateway address for the adapter to which VMnet0 is assigned.)
  • Specify your gateway IP as your Preferred DNS server (an Alternate server is not necessary to specify)
  • if you have DNS issues, go to the host, open a command prompt, and type NSLookup and look at the IP address reported: that's the DNS IP address you likely want to use. While still in the network adapter properties dialog, click Advanced, go to the WINS tab, and be sure to select "Enable NetBIOS over TCP/IP".

  • This will ensure you can reach the guest machine by its Computer Name from the host or from other VMs you configure as bridged VMs.

  • You can right-click the Ethernet adapter in the guest OS, disable then enable it to see if your changes worked (no need to reboot).

I have read countless postings online about networking issues and there are an impossibly large number of issues you can run into, so these instructions are not going to just magically work for everyone because there are many links in the networking chain...

Having said that, these steps should work as long as there are no firewalls or unusual router issues. Speaking of the router, you want to ensure that the static IP addresses you assign are outside the range of the DHCP server your router offers-up.

That way you can be sure that the static IP address you're using won't conflict with a DHCP-assigned address that might get assigned to another device on your network.

Cheers.

Related Question