linux下往外ping不通-出现ping: unknown host www.baidu.com

问题现象:

[root@decode from_jackzhang]# ping www.baidu.com
ping: unknown host www.baidu.com

分析问题:

dns没有配置

解决问题:

配置dns为:8.8.8.8

[root@decode from_jackzhang]# setup
[root@decode from_jackzhang]# ping www.baidu.com
PING www.a.shifen.com (119.75.217.109) 56(84) bytes of data.
64 bytes from 119.75.217.109: icmp_seq=1 ttl=54 time=31.7 ms
64 bytes from 119.75.217.109: icmp_seq=2 ttl=54 time=32.1 ms
64 bytes from 119.75.217.109: icmp_seq=3 ttl=54 time=31.5 ms
^C
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2718ms
rtt min/avg/max/mdev = 31.556/31.839/32.166/0.290 ms
[root@decode from_jackzhang]# 

 

posted @ 2017-03-17 14:25  ArcerZhang  阅读(419)  评论(0编辑  收藏  举报