How to Change the DHCP Range for VMware Workstation Virtual Machines

 

When you boot up a VM within VMware Workstation, it will automatically be assigned an IP address unless you have configured that virtual machine to have a statically assigned IP address. Computers can be configured to use a static or dynamic IP address based on your needs.

When you install an operating system on a VM and start it for the first time it will most likely look for a DHCP server to get its IP address from. If a computer can’t get an IP address, then it will not be able to communicate with other computers on the network. If your computer ends up with an IP address that looks like 169.254.x.x then that means it was not statically assigned an IP address and was unable to reach a DHCP server. This type of IP address is known as an APIPA address.

To see the IP address of your VM or even your host desktop computer you can open a command prompt by typing CMD from your search box and then typing ipconfig at the prompt and pressing Enter on your keyboard. For this example, you can see that the VM has an IP address of 192.168.150.128.

ipconfig command prompt

If you were to run the ipconfig /all command, you would see that this VM is set to use a dynamic IP address because it says DHCP enabled, and it also lists the IP address of the DHCP server.

ipconfig /all command prompt DHCP

Now let’s say we didn’t want to use an IP address lower than 192.168.150.200 for any of our virtual machines because we want to reserve them for another purpose. This means we need to change the DHCP range in VMware Workstation so that it doesn’t assign any of these reserved IP addresses to any VM.

To do so, open the VMware Workstation console, go to the Edit menu and choose Virtual Network Editor. Next you will look for the connection named NAT (Network Address Translation) because this is the connection that you will want to edit.

To be able to edit this connection, click on the Change Settings button and says yes to the UAC permission prompt, otherwise the option to change any settings will be greyed out. Then click on the NAT connection and then the DHCP settings button.

VMware Workstation Virtual Network Editor

Now you will be shown the DHCP address range that your virtual machines will be able to use when they request an IP address. The default settings for this VMware Workstation instance is the range of 192.168.150.128 to 192.168.150.254. Yours might be different.

VMware Workstation Virtual Network Editor DHCP Settings

Now I will change the 128 in the last octet to 200 for the starting IP address and click the OK button and then the OK button in the main window. After clicking OK, the DHCP service will be restarted for VMware Workstation.

VMware Workstation Virtual Network Editor DHCP Settings

If I do nothing, the IP address of the VM will stay the same until its lease expires and after that it will request a new address and get one within this new range. To force the VM to get a new IP address from the DHCP server I can run the ipconfig /release command and then run the ipconfig /renew command.

Now you can see that the VM has an IP address of 192.168.150.200 which is the first IP address in my DHCP range. If another VM requested an IP address, it would most likely receive the address of 192.168.150.201.

ipconfig command prompt

You should also note that you can change the default lease time and maximum lease time for your virtual machines from the same section that you changed the IP address range.

Related Posts

© 2021 Online Computer Tips
Website by Anvil Zephyr