Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nslookup doesn't work

Status
Not open for further replies.

Nostradamus

Technical User
May 3, 2000
419
SE
I have a Solaris machine running SunOS 5.7 and bind 8.2.2
A problem appeared recently. I can no longer run nslookup on that server.

This is what I get.
# nslookup
*** Can't find server name for address 172.18.50.8: Non-existent host/domain
*** Default servers are not available

If I run nslookup from my workstation and choose the one above as server, everything works fine.
172.18.50.8 doesn't have problem resolving though. Just this nslookup thing that bothers me.

Tips anyone? /Sören
 
your lookup servers probably aren't in /etc/resolv.conf ... try putting them in there.
 
I thought you might say that.
already checked that. resolv.conf looks fine.
Even ran
vi /etc/resolv.conf and :set list
to look for bad characters. everything looks normal.

I doubt that the problem is in resolv.conf
/Sören
 
I don't know if it is necessary or not, but here is something I have always done.

I always put the DNS servers in the /etc/hosts file with the correct IP addresses. I still put just the IP address in the /etc/resolv.conf file, but it is just an extra step I always took. Judging by the error you have, that might help.

Will
 
The server is already in the /etc/hosts file.

Any other tips?
/Sören
 
Two other things to check are the hosts line in the /etc/nsswitch.conf file. Make sure it says something like:

hosts: files dns

Also, verify that the address for your gateway is correct in /etc/defaultgateway. I always list the gateway IP address in /etc/hosts with the name gateway too, I don't know if it makes much difference, but it may be worth a shot.

Will
 
both nsswitch.conf and /etc/defaultrouter looks normal.

Can't see how the default gateway has anything to do with this. It's "local resolution" that's my problem.
I can ping every host on any net. Even the hostname of the local dns-server that's bothering me.
/Sören
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top