Article directory
After installing the virtual machine, various applications will be installed in the system in the virtual machine in the future. If the system in the virtual machine cannot connect to the Internet, there is no way to talk about it, so the first step is to solve the problem between the system in the virtual machine and the physical machine. Networks must be interconnected so that they can connect to the Internet.
1) Virtual machine settings
The actual test result of option 4 below is that you can choose "NAT mode (N) for sharing the IP address of the host" or "Customize (U): Specific virtual network->VMnet8 (NAT mode)".
2) Virtual network editor
3) Linux network card settings
1. Step one: Log in to the virtual machine CentOS system and check the system network card device: ip addr
2. Step two: Modify the network card configuration parameters, modify the ONBOOT parameter to yes, save and exit:
cd /etc/sysconfig/network-scripts/
vi ifcfg-网卡名称
After entering the page above i, enter to change the content. After changing, escpress the key . Finally, enter and press the key:wq . 3. Step 3: Restart the network card:enterservice network restart
4) Check network status
1. Use "ping ip address" to successfully ping the physical machine from the virtual machine, which means that CentOS and the physical machine are connected to the Internet. As long as the physical machine has a network, CentOS can also access the Internet.
References:
Solve the problem of unable to connect to the network after newly installed CentOS 7.* in VMware