Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ping fails but http link works

Tags:

windows

In one of the system (Windows), if I ping to a particular public forum site, [lets say testsite.com here], then I get a request timed out message. However, if I just put that site address in the browser (used IE6, but its not specific) with http://, then the link works fine and the browser goes to the web page. What is it that the browser doing differently ?

like image 796
user11718 Avatar asked Oct 21 '08 04:10

user11718


People also ask

Why can I access a website but not ping it?

What this means is that any router or firewall between you and the server you try to ping may just block your pings. Pinging a server is not a reliable way to see if it is up.

How do you troubleshoot ping failure?

Check the Network Hardware. Ensure sure your network is free of physical issues, such as a wire that hasn't been disconnected or a switch switched off. After you've double-checked the physical connections, rebooting your network devices sometimes works.

Why do pings fail?

The reason the first ping usually fails is that the remote router in that LAN has to put the ping request on hold to send out an ARP broadcast to learn the MAC address of the remote device, then wait for a response, and then send the first ping through. This delay is usually too long.

Can I ping with HTTP?

You don't ping a URL, only the server name or IP, so omit the opening "http" or other prefix in an address you'd use in your Web browser. Type only with the domain name or IP address.


3 Answers

Ping sends an ICMP request package. The webserver can choose to ignore it and not respond, instead of responding with an ICMP response.

The web brower uses HTTP, which means it opens a TCP connection on port 80 by using a SYN/SYNACK/ACK exchange.

These two processes are completely different and independant, so you can enable/disable either independantly.

like image 82
Laurent Avatar answered Sep 26 '22 02:09

Laurent


Public servers often don't respond to ping requests. After all, people don't type ping testsite.com before they open their browser, right? So there's no real point to answer pings forthese sites. On the other hand:

A few years ago, a kid managed to simultaneously bring amazon.com and a couple of other such big sites down to thei knees during a couple of hours by having a few hundreds machines bomb them with loads of ping requests.

Since then, ping has not been considered that much friendly by admins.

like image 32
Serge Wautier Avatar answered Sep 25 '22 02:09

Serge Wautier


The site may be behind a firewall that blocks ICMP requests (e.g., ping). HTTP requests that your browser sends out goes over TCP/IP.

like image 22
Randy Avatar answered Sep 25 '22 02:09

Randy