Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Website not pinging but is opened by Web browser

Friends, I think it is a strange thing (at least for me). Coz I have learnt that every domain name on the Internet has itself a corresponding IP address. And it is stored at some place on a DNS.

Now, This is what I get when I ping google.com from my command line.

C:\Windows\system32>ping google.com

Pinging google.com [74.125.236.135] with 32 bytes of data:
Reply from 74.125.236.135: bytes=32 time=10ms TTL=55
Reply from 74.125.236.135: bytes=32 time=11ms TTL=55
Reply from 74.125.236.135: bytes=32 time=11ms TTL=55
Reply from 74.125.236.135: bytes=32 time=10ms TTL=55

Ping statistics for 74.125.236.135:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 11ms, Average = 10ms

But when I ping www.cloudbees.net I get the following:

C:\Windows\system32>ping www.cloudbees.net

Pinging www.cloudbees.net [75.101.143.131] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

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

I also tried it with its ip address(75.101.143.131) and it returns the same result. But when I browse the same(www.cloudbees.net but not the ip address) from my browser, the webpage opens up. How that happened?

The another strange thing I noticed in the pinging is that when I ping google.com I get the following two line in the end of the ping result which I dont in case of www.cloudbees.net.

Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 11ms, Average = 10ms

So can anyone please put some light on the entire mechanism and why such a thing is happening.

like image 490
Benison Sam Avatar asked Jun 13 '14 16:06

Benison Sam


1 Answers

ping packets use the ICMP protocol, whereas on the same level web pages use the TCP protocol. Both go over the IP protocol, but they are different types of packets. (In case you have heard the term HTTP, it is a protocol which is one layer up from ICMP or TCP.)

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. Some operating systems block pings in their default configuration.

And it is even possible that people from different networks see different behaviour. @Popnoodles may be able to get his ping through, you or me not.

When I ping www.cloudbees.net, there is no answer. However, when I tell my computer to find out a bit more:

traceroute 75.101.143.131

This command shows you the servers the ping packet meets during its travel. I get approximately 20 servers before the ping vanishes somewhere in the big void. The last server is 216.182.224.73, which is somewhere in the Amazon cloud.

So, by this information, it is likely that cloudbees.net uses Amazon services. However, there is no solid technical reason for a ping packet to go the same route as a TCP packet. Usually, it does, but things can be done differently if someone wants to obfuscate the route. (In Amazon's case it's unlikely.)

By the way, there may be more than one IP address corresponding to a DNS name, and more than one DNS name may point to the same address. The first scenario (multiple IPs) is very common with large sites, and it can be used to balance the load. The second scenario (several names point to the same address) happens with name-based virtual hosting where there are several websites on a single server with only one IP address.

like image 66
DrV Avatar answered Sep 19 '22 21:09

DrV