Solved

can ping ONLY by HOSTNAME but not ip address

Posted on 2006-11-04
6
3,343 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now