Home > Article > Operation and Maintenance > centos7 cannot connect to the network
1. Find the NAT settings, check the subnet ip, subnet mask, gateway
##2. Enter this directory and find the network configuration filecd /etc/sysconfig/network-scripts/3. Enter the file to perform relevant configuration Note: gateway, subnet mask It must be consistent with the NAT configuration; the gateway and IP address must be in the same network segment as the subnet IP (that is, the first three numbers of the IP, for example: 192.168.152.xx)
vi ifcfg-ens334. Restart the network
service network restart5. Test whether the ping is successful
ping www.baidu.comRecommended related tutorials:
The above is the detailed content of centos7 cannot connect to the network. For more information, please follow other related articles on the PHP Chinese website!