Solved

can ping ONLY by HOSTNAME but not ip address

Posted on 2006-11-04
6
3,527 Views
Last Modified: 2008-09-16
Actually, I'm not actually even having this problem, but I just wanted to know how would it be possible for a computer to ping websites by hostname, but times out for its corresponding ip address.

Usually it's the other way around where you can ping by ip but not hostname, which would indicate a dns error that can sometimes be resolved by flushing the dns. Just curious to know what the technical explanation is if someone was only able to ping by hostname and not ip.
0
Comment
Question by:CHSnake
6 Comments
 
LVL 79

Accepted Solution

by:
lrmoore earned 250 total points
ID: 17874614
hostnames can sometimes resolve to multiple IP's and where dns will round-robin a request, one or more servers can be down and not answer an icmp ping so they can't be reached by IP address, but can by dns name.
It would be rare, but it is possible.
It could also be that there is a local hosts file entry for the host name where the system will resolve a hostname to IP address 1.2.3.4 which answers only if addressed by hostname, whereas an nslookup may resolve it to a different IP address that will not respond if you try to ping the IP address.

0
 
LVL 30

Expert Comment

by:IanTh
ID: 17874624
dns is a very robust service that virtually never fails. A local resolver corruption can cause this by having faulty dns data cached. The local resolver cache is a local dns system effectively
0
 
LVL 3

Expert Comment

by:jdunneuk
ID: 17875927
if you can ping a hostname and not a ip it could be that the actually server is using a nat or perhaps some adaptation of pat
0
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 

Expert Comment

by:QuietRoot
ID: 17875985
the only solution i can see is that the resolved dest ip is diff then the dst ip you're issuing.
and yeah, off course, the round-robin situation it's true as well.
i'm not shore it is possible to filter icmp traffic by checking if the Echo Request used a name server resolution process or was send with an ip address in the first place.

can u share an example?
cheers,
BC
0
 

Author Comment

by:CHSnake
ID: 17876614
Ok, I just had an issue where someone was able to ping yahoo, but not its ip, where normally they can. This of course caused a no route situation. I just wasn't sure how that happened, and what the solution would've been.

I guess I should've checked to see if the same condition existed for other websites, to narrow down whether it was happening for all websites that respond to icmp, or if yahoo just happened to be having this issue at that time.
0
 

Expert Comment

by:QuietRoot
ID: 17879674
i'm shore it's the second option :)
i'm sticking to my opinion here :D

it's the round robin situation that we're talking about and i see 2 ways of explaining this:
1) the first ping went to an ip add (ping [ip]) and the second time the dns resolved to another dst (ping [host]) due to the round robin process. and somehow you didn't noticed that there was 2 diff host addresses.
2) somehow after the replay from the first ping there was some kinda of network problem between you machine and the dst add :|.

anyway, as i recall, and i've mentioned this above, i am not familiar with any policy that can filter icmp traffic by checking if the package dst hostname was resolved before, in order to find the destination ip address, or not. :).
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Guest Wireless in a Business Environment 6 99
How to change the nameserver on Ubuntu Server 6 50
Windows 7 Networking - Public vs. Work vs Public 8 37
Public DNS  Vs BGP 20 26
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question