Network mode for virtual machines
Three kinds
1. Bridging
2.NAT
3.host-only
A: Bridging
Professional explanation:
Bridge network refers to the local physical network card and virtual network card through the VMnet0 Virtual Switch Bridge, physical network card and virtual network card in the topology map on the same status, then the physical network card and virtual network card is equivalent to the same network segment, Virtual switch is equivalent to a real network switch, Therefore, the IP address of the two network card should also be set to the same network segment.
So when we want to use a virtual machine on the LAN, to provide services to other local area network PCs, such as FTP, provide SSH, provide HTTP services, then choose the bridge mode.
B:nat
Professional explanation:
In NAT mode, the virtual machine is allowed to access the public network by means of a NAT (network address translation) function, which is located on the network hosting the machine.
In NAT mode, the network of the virtual machine's NIC and the physical NIC, not the same network, the virtual machine's NIC, is a virtual network provided in VMware.
C:host-only
Professional explanation:
In host-only mode, the virtual network is a fully enclosed network, and the only access to it is the host. In fact, Host-only Network and NAT network is very similar, the difference is that the Host-only network does not have NAT service, so the virtual network can not connect to the Internet. Communication between the host and the virtual machine is achieved through the VMware network adepter VMnet1 virtual network card.
Host-only's aim is to create an internal network that is isolated from the outside world to improve the security of the intranet. This feature may not make much sense to ordinary users, but large service chambers often take advantage of this feature. If you want to provide routing capabilities for the VMnet1 segment, you need to use RRAS instead of XP or 2000 ICS because ICS will change the IP address of the intranet to 192.168.0.1, but the virtual machine will not assign this address to the VMNET1 virtual network card, then the host and the virtual machine will not be able to communicate.
To summarize:
Bridging is the use of the host to the virtual machine when the switch, so that the virtual machine and the host on the same network
NAT is a router that uses a host to give a virtual machine a
Host-only is to use the host to the virtual machine and host built an internal network
Host-only is only the host and the virtual function Unicom
In order to use Xshell and other tools to connect the virtual machine, play multiple virtual machines to configure the master-slave, load Balancing, database master-slave replication, etc., it is recommended to use bridging
About virtual machines VMware Three network modes