Operating System - Linux
1825759 Members
2223 Online
109687 Solutions
New Discussion

Re: The dns resolver not querying all the nameservers listed.

 
GnanaShekar
Regular Advisor

The dns resolver not querying all the nameservers listed.

Hi,

Find below the contents of the /etc/resolv.conf and output of nslookup query:

[root@bangpcplin1 ~]# more /etc/resolv.conf
domain bea.com
nameserver 172.18.40.175
nameserver 10.160.29.91
nameserver 10.160.29.92
nameserver 10.160.29.51
[root@bangpcplin1 ~]# nslookup lclnxas4
Server: 172.18.40.175
Address: 172.18.40.175#53

** server can't find lclnxas4: SERVFAIL

The DNS resolver will not query the subsequent nameservers for the nslookup, I wonder why? Please suggest.

Thanks & Regards,
5 REPLIES 5
Ryan Goh
Frequent Advisor

Re: The dns resolver not querying all the nameservers listed.

Hi,

Do you set Access Control List? Please make sure you allow the IP Addresses Range for the hosts you want to allow for DNS query.



Alexander Chuzhoy
Honored Contributor

Re: The dns resolver not querying all the nameservers listed.

If DNS from the first entry responded others won't be contacted at all. Thus the only case when subsequent DNS server will be contacted is when a previous didn't respond.
Hope it helps.
Vitaly Karasik_1
Honored Contributor

Re: The dns resolver not querying all the nameservers listed.

Alexander is right.

If you can provide mode details about your DNS zones/configuration we'll be able to suggest you the optimal DNS config.
For example, you can ask 172.18.40.175 to forward all queries for bea.com to 10.160.29.91.
Matti_Kurkela
Honored Contributor

Re: The dns resolver not querying all the nameservers listed.

The operating system has a built-in assumption that each nameserver listed in /etc/resolv.conf will have access to identical information. If the first server reports "no such domain name exists", the OS will use that as the final answer.

If some of your nameservers have different data, you cannot configure /etc/resolv.conf to "fetch data about one domain from server A, and everything else from server B". In some situations it *seems* to work, but the situation will not be completely stable and deterministic. The name service for some domains may fail when one of the servers goes down for maintenance... and not resume when that server comes back.

To get more flexible configuration, you need BIND or another name server that can be used in forward-only configuration.

BIND 9.x is flexible enough that you can set it to forward queries to other name servers in a per-zone basis.
MK
Ivan Ferreira
Honored Contributor

Re: The dns resolver not querying all the nameservers listed.

The information provided by Alexander Vitaly and Matti is correct. I just want to add that you can specify a maximum of 3 DNS servers in the resolv.conf file.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?