Virtual machines communicate with the network and there are three modes of virtual machine network connection: bridged connection, NAT and a host only.
- Host-Only: Host-only only permits network operations with the Host OS. The VM will be assigned one IP, but it’s only accessible by the box VM is running on. No other computers can access it.
- NAT: NAT (Network Address Translation) mode will mask all network activity as if it came from your Host OS, although the VM can access external resources. Your host will act as a router (firewall) and your guests will be on a private subnet. Just like your home network with a wireless router, the VM will be assigned in a separate subnet, like
192.168.6.1
is your host computer, and VM is192.168.6.3
, then your VM can access outside network like your host, but no outside access to your VM directly, it’s protected. - Bridged: Bridged mode replicates another node on the physical network and your VM will receive it’s own IP address if DHCP is enabled in the network. Your VM will be in the same network as your host, if your host IP is
172.16.120.45
then your VM will be like172.16.120.50
. It can be accessed by all computers in your host network.