Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Understanding how the local DNS resover works.

Dude!Jan 17 2013 — edited Jan 17 2013
Hello,

Some years ago I was troubleshooting a DNS lookup issue for mail exchangers (MX). It was not under Linux. However, the problem turned out that a DNS MX lookup did not query all the specified name servers until it found a match. Instead, as soon as the name server responded with the record or that it cannot resolve the query, the query was done and no other name servers were used.

DNS queries were performed in a round robin fashion, but due to the TTL (Time to Live) value of the DNS record, only every 10th or other query would succeed. It was just a matter of time and order of attempt for a query to contact the "good" name server. Apparently this was an expected behavior because the local DNS resolver was only supposed to fall-back to query another listed name server if the name servers being queried does not respond.

How does Enterprise Linux or perhaps Linux in general work when it is configured for search domains and several name servers. For instance, following /etc/resolv.conf:

serach example1.com example2.com example3.com
nameserver 192.168.10.1
nameserver 172.16.32.1
nameserver 10.0.0.1
nameserver 8.8.8.8

I do not see any option here, unlike in other OS's, that will allow me to configure the resolver that 192.168.10.1 should be queried for domain example1.com and 172.16.32.1 should be queried for example2.com, etc. Instead according to the man page of resolv.conf, name servers will be used in the order they appear, unless I configure round-robin.

So in other words, if I query, e.g. host1, without specifying a domain name, the local resolver will attempt to resolve host1.example1.com, host1.example2.com and host1.example3.com, but only querying 192.168.10.1 until it finds a match. I suppose the first successful query wins. But other name servers are not being queried, unless 192.168.10.1 is down. But even if it can be configured to contact specific name servers based on the domain name, how will this work with reverse IP lookup?

My current understanding is that the list of name servers in /etc/resolve.conf provides only a fall-back support in case a name server is down and does not respond. In order to partition a DNS lookup, every DNS server will have to be configured to forward queries accordingly.

Is this correct? Any thoughts please?

Thanks.
This post has been answered by Avi Miller-Oracle on Jan 17 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 14 2013
Added on Jan 17 2013
3 comments
333 views