ping: unknown host 解决办法


[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

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容