Home >Operation and Maintenance >CentOS >centos7 cannot connect to the network

centos7 cannot connect to the network

王林
王林Original
2020-04-03 11:16:394754browse

centos7 cannot connect to the network

1. Find the NAT settings, check the subnet ip, subnet mask, gateway

centos7 cannot connect to the network

centos7 cannot connect to the network

##2. Enter this directory and find the network configuration file

cd /etc/sysconfig/network-scripts/

centos7 cannot connect to the network

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-ens33

centos7 cannot connect to the network

4. Restart the network

service network restart

5. Test whether the ping is successful

ping www.baidu.com

centos7 cannot connect to the network

Recommended related tutorials:

centos tutorial

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn