Ping request time out although web browser works o

2020-04-03 02:43发布

I'm on the World Wide Web right now, as evidenced by posting on StackOverflow. However, if I try to ping stackoverflow.com from the command line, the ping times out. What do I need to do for ping to work?

> ping stackoverflow.com

Pinging stackoverflow.com [198.252.206.140] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 198.252.206.140:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Edit, try tracert

> tracert stackoverflow.com

Tracing route to stackoverflow.com [198.252.206.140] over a maximum of 30 hops:

  1     *        *        *     Request timed out.
  2     *        *        *     Request timed out.
  3     *        *        *     Request timed out.
  4     *        *        *     Request timed out.
  5     *        *        *     Request timed out.
  6     *        *        *     Request timed out.
  7     *        *        *     Request timed out.
  8     *        *        *     Request timed out.
  9     *        *        *     Request timed out.
 10     *        *        *     Request timed out.
 11     *        *        *     Request timed out.
 12     *        *        *     Request timed out.
 13     *        *        *     Request timed out.
 14     *        *        *     Request timed out.
 15     *        *        *     Request timed out.
 ...
 Trace complete.

It's Request timed out. all the way to 30 hops.

Edit, try ping google.com

Same result. :-)

1条回答
叛逆
2楼-- · 2020-04-03 03:26

Some hosts have a firewall that block the ICMP (http://ca.wikipedia.org/wiki/Internet_Control_Message_Protocol) packets like ping. You can use traceroute (cmd line tool or online webs like http://ping.eu/traceroute/) or tcptraceroute (http://linux.die.net/man/1/tcptraceroute).

Some routers also have a firewall that block ICMP. You can detect this by doing ping google.com. It that fails, then it's your local router that's problematic not the remote host.

hope it can help you

查看更多
登录 后发表回答