Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just installed bind on my qmail server with the goal of avoiding DNS queries for domains that the server already ask a few seconds/minutes ago, as caching server. So now, resolv.conf has 127.0.0.1 as nameserver, and after a while the new local-bind is answering almost every query.

However, I can see (using tcpdump) that the server is still asking for a lot of domain to my primary and secondary DNS servers (Using forward), and just realized this:

DNS query : MX? hotmeil.com

DNS answer: ServFail

Well, as you can see I'm receiving a NXDOMAIN (ServFail)

The question, is it possible to tell my local-DNS to not retry for NXDOMAIN received?, at least remember the fail for a while, and thus avoiding all these useless queries?

Thanks guys!.

share|improve this question
    
Sorry, I mean that I'm receiving a NOERROR response, not NXDOMAIN. –  CarlosH Jul 23 '10 at 0:01
    
You can edit your question to change the context –  Mark Henderson Jul 23 '10 at 0:02

1 Answer 1

A NOERROR (aka NODATA) response means that the domain exists, but that the specific resource record type requested (MX?) does not.

Your DNS server should wait for the "minttl" time specified in that response before asking again. This also applies to the SERVFAIL response, if seen. See RFC 2308.

Note though that any such TTL is advisory. If your name server runs out of cache it's perfectly free to forget that a record doesn't exist and query for it again when asked.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.