We help IT Professionals succeed at work.

Using Ping to get Reverse DNS

jonnyblaze
jonnyblaze asked
on
Is there an syntax that I can use with ping that will resolve an ip address to an host name.

i.e. In DOS I can use ping -a 234.232.23.52 to get the host name for this ip address.

Comment
Watch Question

CERTIFIED EXPERT

Commented:
ping -s 234.232.23.52
Though U can use ping for this purpose, tha wiser way is to use nslookup.
Syntax : nslookup <ipaddr>

Girix

Commented:
unless you switch if off, ping will most likely attempt to find the reverse IP (sometimes with bad effects when the dns server isn't available). However, it may be faster to use dig and nslookup to do this. In case you want to check dynamic or round robin DNS, I  would also use the method ahoffman suggested.
CERTIFIED EXPERT
Commented:
keep in mind that it is not reliable what ping returns for reverse lookup, 'cause it depends on the implementation, some ancient ping just use /etc/hosts

Commented:
Use:

nslookup <ip address>

Commented:
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by ahoffmann

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange

Explore More ContentExplore courses, solutions, and other research materials related to this topic.