Sunday, 27 March 2016

VMware Workstation Network Adapter Modes


VMware workstation is a Virtual Machine(VM) player that is able to run the VM on the host. There are three common network modes in Vmware Workstation. In order to set the network adapter, from the Vmware menu, choose VM->settings (CTLR+D). Note that the virtual machine that the network would be set should be run first. Once in the Settings menu, choose the network adapter on the left panel and the settings menu will look similar to below image. 

 
 

The three main network mode are in the top 3 of the network connection mode which are Bridged, NAT (Network Address Translation), and host-only mode.

Bridged


In bridged mode, it replicates the network on the physical network (host) and the VM will receive its own IP address from the actual network. For example, the VM will get its true IP from the router, which means the router now has to client, the host and the VM itself.

This means the VM should be in the same network with the host and has same subnet and gateway. The image below is the network configuration of the host (Windows 8). It shows the subnet mask of 255.255.254.0 and the default gateway is 192.168.10.1.



The capture below is from the Kali Linux machine. It has the same subnet mask (255.255.254.0) and also the same gateway address (192.168.10.1). This shows that the host and the VM reside in the same network.


Network Address Translation (NAT)


NAT mode will mask all network activity as if it came from your Host OS using virtual network, but it still can access the host internet connection. This means there will be a virtual network from the VMware player. To set the NAT network, in the VMware menu, choose edit->Virtual Network Editor. The menu will be similar with this capture


Now, choose Change Settings to modify the NAT network.

After select the VMnet8, there are two options for NAT, the NAT Settings and DHCP Settings. In the bottom part, the Subnet IP and the Subnet mask can be manually set.

NAT Settings will provide the options to change the default gateway of the NAT network. While DHCP settings is used to determine the IP address range that will be virtually leased by NAT network.

NAT Settings

DHCP Settings

Host–only


In host-only mode, the network can also be manually set. The host-only settings will only allow the configuration of the subnet mask, the network subnet and the DHCP settings. Unlike NAT, the default gateway can not be modified.



The main different between host-only and the other mode is the VMs in the host-only mode may not have access to the network outside the VMware. Therefore no internet access available for these host-only machines. If these VMs have the same subnet IP, it could communicate with each other.

DHCP Settings

In conclusion, bridged network will replicate the network that the host has, NAT will create a virtual network that has access to outside network and internet access, while host-only mode only allow machines to communicate with each other in the same host.

Reference: