Home  >  Article  >  Operation and Maintenance  >  centos cannot ping external network

centos cannot ping external network

王林
王林Original
2020-04-02 13:56:302525browse

centos cannot ping external network

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

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

If this still does not work, you can try to add routing: (You need to add it 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 tutorials: centos tutorial

The above is the detailed content of centos cannot ping external 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