nslookup fails using nsswitch and files

2007-12-25 9:14:00

Everyone who has responded so far (thanks and you can stop now!) has

pointed out that on solaris, nslookup is strictly a dns tool.

     

Well, next time I'll read things even more carefully. I was snookered by

the fact that HP's implementation of nslookup has been extended to use

nsswitch. From the HP nslookup manpage:

     

      "nslookup has been extended to follow the configured name resolution

     algorithm of the host and to query NIS, as well as, DNS and host

     tables."

     

Seems to me that this is pretty useful and sun might consider implementing

it.

Also the sun nslookup man page refers to the resolver docs which clearly

talk about using nsswitch, but I forgot that nslookup doesn't do a

gethostbyname, simply looks things up in the tables.

Just for grins, I checked a linux box and it too doesn't have the nsswitch

extension. Oh well.

     

Thanks

/ Sid /

> Hello,

     

> If a system is NOT in dns, but IS in the hosts file, nslookup fails.

> It appears as though nslookup is not using nsswitch to determine its

> resolver "search order". ping and other network programs will find the

> host, but nslookup will not. (nsswitch has the "hosts: dns files"

> entry)

     

> This makes it hard to do some network troubleshooting.

     

> Am I wrong? Or is there a fix?

> Thanks,

> / Sid /

Comments

Got something to say?

You must be logged in to post a comment.