标签:
[root@86 ~]# ping -c 2 www.baidu.com ping: unknown host www.baidu.com
如果出现上面的问题,先看DNS配置是否有问题:
[root@86 ~]# cat /etc/resolv.conf options timeout:1 attempts:1 rotate nameserver 10.202.72.116 nameserver 10.202.72.118
[root@86 ~]# ping 10.202.72.116 PING 10.202.72.116 (10.202.72.116) 56(84) bytes of data. ^C --- 10.202.72.116 ping statistics --- 29 packets transmitted, 0 received, 100% packet loss, time 28080ms
[root@86 ~]# ping 8.8.8.8 -c 2 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. --- 8.8.8.8 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 10999ms [root@86 ~]# ping 8.8.8.8 -c 8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=41 time=57.6 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=41 time=58.8 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=41 time=57.3 ms 64 bytes from 8.8.8.8: icmp_seq=7 ttl=41 time=62.7 ms --- 8.8.8.8 ping statistics --- 8 packets transmitted, 4 received, 50% packet loss, time 8005ms rtt min/avg/max/mdev = 57.335/59.137/62.782/2.185 ms
[root@86 ~]# cat /etc/resolv.conf options timeout:1 attempts:1 rotate nameserver 8.8.8.8 nameserver 4.4.4.4
[root@86 ~]# ping www.baidu.com -c 2 PING www.a.shifen.com (220.181.111.188) 56(84) bytes of data. 64 bytes from 220.181.111.188: icmp_seq=1 ttl=52 time=3.82 ms 64 bytes from 220.181.111.188: icmp_seq=2 ttl=52 time=3.79 ms --- www.a.shifen.com ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1170ms rtt min/avg/max/mdev = 3.796/3.810/3.824/0.014 ms
ping: unknown host www.baidu.com
标签:
原文地址:http://www.cnblogs.com/bass6/p/5568940.html