Operating System - HP-UX
1834673 Members
2480 Online
110069 Solutions
New Discussion

nslookup fails to search all DNS servers

 
Norman Dignard
Regular Advisor

nslookup fails to search all DNS servers

HPUX 11i server & NIS master, multi-homed on different domains with seperate W2K DNS servers.

I've tried multi variations and can't seem to get ping or nslookup to work against hosts in a second domain. Doing a nslookup host server works but not nslookup host. If fails say not found in the first DNS server.
7 REPLIES 7
Jeroen Peereboom
Honored Contributor

Re: nslookup fails to search all DNS servers

L.S.

Do you have multiple DNS servers listed in your recolv.conf? How is your nsswitch.conf?

JP.
Steven E. Protter
Exalted Contributor

Re: nslookup fails to search all DNS servers

To work this out you will have to modify your nsswitch.conf file

The standard recommended HP setup will not try the secondary server in /etc/resolv.conf unless the primary is unreachable.

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
Norman Dignard
Regular Advisor

Re: nslookup fails to search all DNS servers

Missed from my original post -
my nisswitch.conf file has
hosts - files dns

resolve.conf has
search dom1 dom2
nameserver DNS IP of dom1
nameserver DNS IP of dom2
Clay Jordan
Advisor

Re: nslookup fails to search all DNS servers

Well, First off I assume when you say you can't ping to work your trying only the hostname and not the IP, otherwise it is another problem.

With regard to DNS lookups only and resolv.conf, each server in turn is checked until one responds, no further checking is done. If you maintain a private internal DNS server and consult the external first, no internal names would be found so long as the external server was up, unless you use an NIS trick.

You mention that you use NIS. Assuming you have a NIS host map, you are not referencing it in you nsswitch.conf file, hence NIS is never consulted. Since NIS has the capabilty to use DNS in its lookups befor it returns a result, you could consult NIS using DNS for internal names and later DNS using the external server and get a combined view.

Another problem I see is thatyour resolve.conf specifies no actions to take pending on the status of a particular service lookup. There are defaults that come with the libraries some tools are compiled with but not all. That means you can get lookup failures with one tool and not others. It is documented in the nsswitch.conf man page but you might try a line like:
host: hosts [ NOTFOUND=continue ] dns [ NOTFOUND = continue ] nis

A couple of other notes. The resolver libraries that most apps use are not used by nslookup, so this is not the best testing utility. HP also provides nsquery which does use the resolver libraries. Also, one thing important to HP is that forward and reverse lookups match, so much so that the resolver will do a forward and reverse lookup even if you only ask for a forward lookup. Having these not match will cause a lot of problems and it is one of the first things I look at when a problem comes up.
Norman Dignard
Regular Advisor

Re: nslookup fails to search all DNS servers

The NIS "trick" I don't see being the answer. The host is the NIS master which is only being used for user/group accounts. Having an entry in nsswitch.conf for hosts to seacrh NIS redundant as the maps are built from the local hosts files.

Jeroen Peereboom
Honored Contributor

Re: nslookup fails to search all DNS servers

Norman,

according to SEP the second DNS server will not be queried ('standard HP config').

So what's probably happening is that the first DNS server replies a NOT FOUND. And the second DNS server (who knows the answer) isn't even queried.

I think you'll have to instruct your 1st DNS server to forward queries to the second DNS server.

JP
Kevin Wright
Honored Contributor

Re: nslookup fails to search all DNS servers

Your 'first' dns server needs to be able to resolve the querry. Either make it a slave for the zone from the DNS master, or forward requests for the domain to the DNS master in named.conf.