美文网首页
ping: unknown host 解决办法

ping: unknown host 解决办法

作者: mountain369 | 来源:发表于2018-08-03 07:22 被阅读0次

[root@localhost ~]# cat /etc/resolv.conf

[root@localhost ~]#ping www.sina.com.cn

ping: unknown host www.sina.com.cn

添加nameserver

[root@localhost ~]# cat /etc/resolv.conf

nameserver 8.8.8.8

nameserver 8.8.4.4

[root@localhost ~]# ping www.sina.com.cn

PING spool.grid.sinaedge.com (219.238.4.9) 56(84) bytes of data.

^C64 bytes from 219.238.4.9: icmp_seq=1 ttl=58 time=6.26 ms

--- spool.grid.sinaedge.com ping statistics ---

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 6.264/6.264/6.264/0.000 ms

[root@localhost ~]# ping www.baidu.com

PING www.a.shifen.com (119.75.216.20) 56(84) bytes of data.

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=1 ttl=56 time=10.7 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=2 ttl=56 time=8.50 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=3 ttl=56 time=21.4 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=4 ttl=56 time=6.05 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=5 ttl=56 time=7.13 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=6 ttl=56 time=6.40 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=7 ttl=56 time=8.24 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=9 ttl=56 time=6.02 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=10 ttl=56 time=9.95 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=11 ttl=56 time=8.04 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=12 ttl=56 time=13.7 ms

64 bytes from 127.0.0.1 (119.75.216.20): icmp_seq=13 ttl=56 time=10.6 ms

相关文章

网友评论

      本文标题:ping: unknown host 解决办法

      本文链接:https://www.haomeiwen.com/subject/hbdexftx.html