Operating System - HP-UX
1829574 Members
4630 Online
109992 Solutions
New Discussion

DNS, resolution with second dns-server doesn't work

 
centurion
Frequent Advisor

DNS, resolution with second dns-server doesn't work

We have three dns servers in our resolv.conf:

nameserver 10.200.210.7 (internal)
nameserver 10.120.3.56 (external)
nameserver 193.28.97.130 (internal)

Some servers we have to resolv with the external server. But it doesn't work. When I resolv the adress manual, it works:

nslookup 10.120.3.56

Any ideas?
8 REPLIES 8
Ganesan R
Honored Contributor

Re: DNS, resolution with second dns-server doesn't work

Hi,

As far as I know, DNS will try with first nameserver listed in resolv.conf and it will not go to the next server until or unless the first server is unavailable.

If this is the case you need to change the order in resolv.conf based on your requirment. You need to put the server first which is resolving most of the hosts.

you can put the remaining entries in your /etc/hosts file as a workaround.
Best wishes,

Ganesh.
Ivan Krastev
Honored Contributor

Re: DNS, resolution with second dns-server doesn't work

Try with nsquery to check nsswitch.conf:

nsquery hosts "dns [NOTFOUND=continue]"


regards,
ivan
centurion
Frequent Advisor

Re: DNS, resolution with second dns-server doesn't work

The most servers we resolv over the first and third one. And someone over the second.. :-(
centurion
Frequent Advisor

Re: DNS, resolution with second dns-server doesn't work

root@smallville [/]# nsquery hosts 10.128.0.109 "dns [NOTFOUND=continue]"

Using "dns [NOTFOUND=continue]" for the hosts policy.

Searching dns for 10.128.0.109
10.128.0.109 was NOTFOUND

Switch configuration: Allows fallback

All name services have been searched
TTr
Honored Contributor

Re: DNS, resolution with second dns-server doesn't work

The resolver functions as expected. From "man 4 resolver":
...The algorithm used is: Try a name server; if the query times out, try the next and continue until all name servers have been tried, then repeat trying all the name servers until a maximum number of retries have been made...
This means that the second server (external) only gets queried if the first server does not respond. If the first server responds with a negative answer, then that's your answer.
To set up external name resolution, you only use the two internal nameservers in the resolv.conf file. then in these internal DNS servers you forward all nonlocal requests to the external DNS server. Check out the BIND manuals for details, the configuration varies with different versions of bind.
Talk you your DNS admin if it is not you about external resolution.
TTr
Honored Contributor

Re: DNS, resolution with second dns-server doesn't work

The "NOT FOUND=continue" is a directive to continue from the DNS name service to other name services such as hosts, nis, ldap that may be setup in the nsswitch.conf file. It does not direct the resolver to continue to the other nameservers in the resoolv.conf file.
Puting the external host names and IPs that you need to resolve in in your local /etc/hosts file is a workaround but it is not a formal external name resolution method.
centurion
Frequent Advisor

Re: DNS, resolution with second dns-server doesn't work

I talk to our dns-admin ..
centurion
Frequent Advisor

Re: DNS, resolution with second dns-server doesn't work

we make entries in the /etc/hosts and remove the external dns-server..