Comparison of several Network connection modes of VMware
Host: automatically obtain ip address, wireless network connection
1. NAT network address translation:
1. Virtual machine ping Baidu: pass
2. Virtual machine ping host: pass
3. Host ping virtual machine: pass
4. Access the virtual machine site through the host: yes
5. Virtual machine ip:192.168.40.128
6. Host ip:192.168.0.101
Second, host-only mode:
1. Virtual machine ping Baidu: no connection
2. Virtual machine ping host: no connection
3. Host ping virtual machine: pass
4. Access the virtual machine site through the host: yes
5. Virtual machine ip:192.168.133.128
6. Host ip:192.168.0.101
Third, the mode of bridge:
1. Virtual machine ping Baidu: pass
2. Virtual machine ping host: pass
3. Host ping virtual machine: pass
4. Access the virtual machine site through the host: yes
5. Virtual machine ip:192.168.0.105
6. Host ip:192.168.0.101
Generally speaking, if the physical machine is dynamically acquiring ip, bridging is used, and if it is static ip, the other two methods are used.
The linux virtual machine acquires the ip address dynamically. If you don't get the ip address, run the dhclient command to get the ip address again.