Home > Operation and Maintenance > CentOS > The centos7 system cannot ping the external network

The centos7 system cannot ping the external network

王林
Release: 2020-03-16 14:45:41
Original
4487 people have browsed it

The centos7 system cannot ping the external network

First check whether adding DNS is normal. If it does not exist, add dns:

[root@cgls]# vim /etc/resolv.conf
nameserver 114.114.114.114
nameserver 8.8.8.8
Copy after login

(Recommended tutorial: centos usage tutorial)

If it still doesn’t work, you can try adding a route: (According to your own network segment settings, mine is on the 192.168.11 network segment!)

[root@cgls]# route add default gw 192.168.11.1
Copy after login

Under normal circumstances, you can ping successfully at this time:

[root@cgls]# ping www.baidu.com
Copy after login

Recommended related video tutorials: linux video tutorial

The above is the detailed content of The centos7 system cannot ping the external network. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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