Virtual machines typically have three network connection modes available
1. Bridging
2.NAT
3.host-only
Attached: custom (no special requirements generally not used)
Use examples to explain:
There are two machines in my virtual machine: Linuxclient and Linuxserver, respectively.
My Physics machine ip:192.168.236.119
A's physical machine ip:192.168.236.124
B's Physical machine ip:192.168.236.118
(episode: 118 can Ping, 124 can not ping, the reason is to open a firewall)
The following 118 other machines are used as actual LAN.
Premise: Use DHCP to assign IP, use our school's DNS (automatically assign also line)
General: These three modes can ping each other from my physical machine.
1. Bridge connection
Linuxclient on: inet addr:192.168.236.146
Linuxserver on: inet addr:192.168.236.147
Result: Be able to ping the inside and outside network, can surf the internet, and with the physical machine in the same network segment, the actual LAN router more than two machines
Principle: Share the actual router in the same position as the physical machine, which is equivalent to more than two computers in the side ...
2.NAT
Premise: Start the VMware DHCP service and VMware NAT Service in My Computer---management--services
Linuxclient on: inet addr:192.168.70.153
Linuxserver on: inet addr:192.168.70.130
Result: Can ping the inside and outside network, can surf the net, but with the physical machine no longer the same network segment, and 192.168.236.118 and 192.168.236.124 can not ping linuxclient and linuxserver (except my physical machine), there will be no unknown two machines on the actual router.
Principle: Virtual machine virtual out of the network, can through their own host Unicom extranet, but in this local area network cannot find two units to seek your device
3.host-only
Linuxclient on: inet addr:192.168.197.128
Linuxserver on: inet addr:192.168.197.129
Result: Only two nets in the virtual machine can ping each other, and no other IP is ping, (except my physical machine) naturally also can not surf the Internet.
Principle: Castrated version of the NAT, in addition to network functions, completely closed in the virtual network, so only virtual network machine mutual Ping
Three modes of network connectivity for virtual machines