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

centos7 cannot connect to the network

王林
Release: 2020-04-03 11:16:39
Original
4839 people have browsed it

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

1

cd /etc/sysconfig/network-scripts/

Copy after login

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)

1

vi ifcfg-ens33

Copy after login

centos7 cannot connect to the network

4. Restart the network

1

service network restart

Copy after login

5. Test whether the ping is successful

1

ping www.baidu.com

Copy after login

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!

Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template