If you can't ping an ip address since you are not resolving a canonical name this has nothing to do with dns and only has to do with the inability to reach that machine (routing) right?
3 Answers
You are correct in that if you ping an IP address you are not using DNS. If you are using a hostname instead of an IP address with ping
, then you will be using DNS.
However, just because you are using ping
with an IP address, even if you don't get a response this does not necessarily mean there is a routing problem. Many hosts are configured to rate limit ICMP echo requests (i.e. ping) or to ignore them entirely.
Correct.
DNS is a service which resolves a name to an IP address. If you are not pinging a name, you aren't using DNS.
"PING" on a Windows 7/8 machine will attempt to perform a "Reverse DNS" lookup on the IP address before attempting a PING. It's reverse DNS because you are doing the reverse of what DNS natively does, i.e. resolve a name to an IP address. But that is just a feature to help identify what you're pinging.
PING still uses the IP address to formulate its echo request. The inability to perform the reverse DNS does not preclude the ICMP echo request to be sent, nor does it prevent the echo reply to come back if there is one.
Hope this helps.
-
1Do you have anything to back up this answer? It may be true in certain circumstances, by my Windows 7 does not do a reverse lookup when pinging an IP address. Verified with captures from both the computer and a span port on switch.– YLearnFeb 23, 2015 at 20:10
-
-
Good catch. I think this behavior changed between Windows XP and Windows Vista/7/8. I just tried it and my statement is incorrect. Mar 10, 2015 at 20:00
-
Looks like you now need the "-a" switch to resolve an IP address to a hostname when using ping. Mar 10, 2015 at 20:00