CentOS ping不通的话,报:ping www.baidu.com ping: unknown host www.baidu.com

原因也有其中之一:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
CentOS ping不通的话,报:ping www.baidu.com ping: unknown host www.baidu.com_第1张图片
如果BOOTPROTO前面有#的话就去掉
然后输入:service network restart
把防火墙禁掉:chkconfig iptables off
问题就解决了
[root@vhost03 ~]# ping www.baidu.com
PING www.a.shifen.com (115.239.210.27) 56(84) bytes of data.
64 bytes from 115.239.210.27: icmp_seq=1 ttl=128 time=6.46 ms
64 bytes from 115.239.210.27: icmp_seq=2 ttl=128 time=7.00 ms

你可能感兴趣的:(CentOS ping不通的话,报:ping www.baidu.com ping: unknown host www.baidu.com)