1826496 Members
3084 Online
109692 Solutions
New Discussion

nslookup on Linux

 
SOLVED
Go to solution
KPS
Super Advisor

nslookup on Linux

Hi,

I'm seeing some differences in the way nslookup shows Resolved IP and Host info...

On RedHat 2.1, I use nslookup for look up on an IP and get: (Reverse Address DNS Address and Hostname resolved)

Example:) 52.205.102.10.in-addr.arpa

If I do this on an HP-UX 11.11 I only get the forward IP.

What I'm wondering is if this is correct behavior consistent with what each OS shows you or could there be something wrong with my Host Configurations in /etc/resolv.conf or /etc/nsswitch.conf on either one of these nodes specifically?
3 REPLIES 3
Steven E. Protter
Exalted Contributor
Solution

Re: nslookup on Linux

nslookup performance is determined by a number of files:

/etc/resolv.conf
/etc/nsswitch.conf

depending on the above /etc/hosts

You might want to check out the behavior of dig. It should be consistent with nslookup, but Linux has warned for years about de-supporting nslookup. If there are variances you may have nothing to change.

For reverse lookups you usually have to provide nslookup a parameter nslookup -x or nslookup -r

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jan Sladky
Trusted Contributor

Re: nslookup on Linux

hi Ken,
try to compare it with

dig and host commad

reverse lookup is done with same option -x

dig -x ip
host -x ip

br Jan

GSM, Intelligent Networks, UNIX
Ross Minkov
Esteemed Contributor

Re: nslookup on Linux

The output that nslookup produces on linux and hp-ux looks different. Both provide the same information but it is formated differently.