Home  >  Article  >  Operation and Maintenance  >  Unable to ping external network under centos7

Unable to ping external network under centos7

王林
王林Original
2020-03-31 15:26:242934browse

Unable to ping external network under centos7

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

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

(Recommended tutorial: centos tutorial)

If it still doesn’t work, you can try adding a route: (according to your own network segment settings)

[root@cgls]# route add default gw 192.168.11.1

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

[root@cgls]# ping www.baidu.com

Recommended related video tutorials: linux video tutorial

The above is the detailed content of Unable to ping external network under centos7. 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