Why “ping google.com” returns 100% packet loss if I am experiencing a perfect internet connection?

China☆狼群 提交于 2021-01-29 12:36:52

问题


I am not very knowledgeable on computer networks, but my understanding is that the ping command on Linux tests internet connection by computing the amount of sent and received packages to some IP address.

For this I often use the ping command if I am experiencing connection issues. But the results are ofter very counterintuitive: For example now I seem to have a perfect internet connection, but the results from a ping command to any address returns 100% packet loss

>>> ping google.com

PING google.com(lga25s62-in-x0e.1e100.net (2607:f8b0:4006:81a::200e)) 56 data bytes

--- google.com ping statistics ---
27 packets transmitted, 0 received, 100% packet loss, time 26618ms

What is an explanation for this? What is the ping command really telling me about my current connection?


回答1:


Yout PC defaults to IPv6 so it ping google IPv6 address 2607:f8b0:4006:81a::200e and your network does not route IPv6. You can ping google with IPv4 with command:

ping -4 google.com

What OS and Kernel you are using, what is the result of command:

uname -a



回答2:


You may take the following step:

  1. View your routing table with route -n
  2. Ping the gateway of destination 0.0.0.0
  3. If it works, try traceroute to www.google.com. If there's ISP problem, you will notice the failure of the hop right after the gateway
  4. Verify DNS settings
  5. Verify that google hostname is not falsely mapped manually

Hope that it helps



来源:https://stackoverflow.com/questions/64175206/why-ping-google-com-returns-100-packet-loss-if-i-am-experiencing-a-perfect-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!