Change the network connection to bridge mode in the virtual machine settings and check Copy the physical network connection status
Virtual Network Editor Restore the default settings in . If the settings are normal, there is no need to restore, just auto-bridging.
The host runs→cmd→ipconfig /all, check the IP address, subnet mask, gateway
##linux Entervim /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=“static” ONBOOT=“yes” #如果你net模式可以联网,这个应该已经是yes了
systemctl retart network.service
The above is the detailed content of Centos cannot access the Internet after configuring a static IP. For more information, please follow other related articles on the PHP Chinese website!