Why can I ping google.com, but not nasa.gov?
Solution 1:
Because for some reason, they have not added a DNS "A record" for nasa.gov, so it does not resolve, and returns a host unknown. Most administrators do configure their DNS to respond to requests, especially for HTTP, to both the domain.com and www.domain.com. You can ping www.nasa.gov though.
Although, not in this case, another reason would be if they chose to drop ICMP ping requests, which is configured on a firewall or router.
Solution 2:
$ host nasa.gov
nasa.gov mail is handled by 10 ndjsnpf01.ndc.nasa.gov.
nasa.gov mail is handled by 10 ndjsnpf02.ndc.nasa.gov.
nasa.gov mail is handled by 10 ndjsnpf03.ndc.nasa.gov.
nasa.gov mail is handled by 10 ndmsnpf01.ndc.nasa.gov.
nasa.gov mail is handled by 10 ndmsnpf02.ndc.nasa.gov.
nasa.gov mail is handled by 10 ndmsnpf03.ndc.nasa.gov.
So you can send mail to [email protected]
, but there is no machine nasa.gov
to connect to.
$ host www.nasa.gov
www.nasa.gov is an alias for www.nasa.gov.speedera.net.
www.nasa.gov.speedera.net is an alias for www.nasa.gov.edgesuite.net.
www.nasa.gov.edgesuite.net is an alias for a1718.x.akamai.net.
a1718.x.akamai.net has address 92.122.213.138
a1718.x.akamai.net has address 92.122.213.200
So when you ping www.nasa.gov
you are really pinging an Akamai machine via several indirections.
The NASA mail server is run by NASA directly. It doesn't reply to ping requests:
$ host ndjsnpf01.ndc.nasa.gov
ndjsnpf01.ndc.nasa.gov has address 198.117.1.121
$ whois 198.117.1.121
[...]
National Aeronautics and Space Administration NETBLK-NSI (NET-198-116-0-0-1) 198.116.0.0 - 198.123.255.255
[...]
$ ping ndjsnpf01.ndc.nasa.gov
PING ndjsnpf01.ndc.nasa.gov (198.117.1.121) 56(84) bytes of data.
Solution 3:
NASA's firewall is probably dropping ICMP (ping) packets, thus your pings will time out. The largest factor of latency is physical distance, the further away your target, the bigger the latency (speed of light is the top limiting factor)