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.

Is it possible to setup Unbound (or maybe BIND) to be a resolver that increases the TTL on records it resolves?

Basically, I am having trouble with a DNS server that has very low TTL (60 minutes) on its records that is apparently being rebooted. I am getting some random "unknown host names" when apparently it is being rebooted. If I could setup a resolver to cache the entires and possibly increase the TTL locally or fail over to last entry. Is that even possible?

share|improve this question
    
Maybe the configuration variable "cache-min-ttl" for Unbound? –  Carson Reinke Nov 27 '13 at 13:46

3 Answers 3

up vote 2 down vote accepted

IMHO unreliability of the server is not a problem for the clients to solve! DNS has sufficient built-in provisions for redundancy, back-up name servers etc.

The hostmaster sets the TTL, which is an instruction that you may cache this record at most TTL seconds.

If you're allowed to do a zone transfer you may run as slave of that faulty zone, which may have a longer expiry then the TTL of the records in that zone.

Caching records longer then their TTL is generally considered a bad idea. Caching records shorter then their TTL allows is according to standards, therefore bind has a max-cache-ttl option and not the reverse.

Unbound does though:

cache-min-ttl:

          Time  to  live  minimum  for  RRsets  and messages in the cache.
          Default is 0.  If the the minimum kicks in, the data  is  cached
          for longer than the domain owner intended, and thus less queries
          are made to look up the data.  Zero makes sure the data  in  the
          cache is as the domain owner intended, higher values, especially
          more than an hour or so, can lead to trouble as the data in  the
          cache does not match up with the actual data any more.
share|improve this answer
    
Yes, I agree with your opinion. You would think the backup DNS server would handle the queries, so my troubles maybe with something else. –  Carson Reinke Nov 27 '13 at 14:41

I just found it right after putting the question up.

I was able to change the cache-min-ttl setting in Unbound and that was able to do what I wanted.

share|improve this answer

This is rarely a good idea, there are still way too many sites that use DNS for MX load balancing.

For reference, in Bind it's min-cache-ttl = seconds.

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.