Is there a standard time duration before DNS caches are cleared, so that if a distracted operator or stuck key turns a TTL of 86400 into 864000000 you don't end up with an authoritative resource record or even entire DNS zone whose changes won't be recognized for 27.397 years?

And, if there is no protection against this sort of error, then what is the reasoning behind allowing TTL duration up to 68 years instead of a maximum value of perhaps one month?

  • Possible duplicate of What happens when your TTL gets screwed up in your DNS record? – Andrew B Apr 24 '16 at 9:33
  • @AndrewB Very related indeed, but not an exact duplicate. The answer given by Michael Hampton answers the question being asked better than any of the answers to your duplicate suggestion does. – kasperd Apr 24 '16 at 10:32
  • @kasperd Michael's answer mentions the config options for several implementations by name and got my upvote (as did the question which had a score of zero), but otherwise this is a rehash of the same points. I don't really care whose answer you like better. – Andrew B Apr 24 '16 at 16:23

You'll be happy to know that most (if not all) DNS server software has protection against this scenario.

For example:

Microsoft DNS server has a MaxCacheTTL setting, which defaults to 86400. So regardless of any TTL setting in DNS RRs, if this is not adjusted, the DNS server will not cache anything longer than a day.

BIND also has a similar setting max-cache-ttl, which defaults to 604800 (7 days).

PowerDNS alao has the setting max-cache-ttl and defaults to 86400.

Unbound names the setting cache-max-ttl and defaults to 86400.

Since BIND is still the most popular DNS server out there, its 7 day default will affect you. If you find out this has happened, you'll probably have to wait a week before most everyone has flushed their caches.

| improve this answer | |
  • Excellent. Thanks for the information. So, I guess then it's just a matter of the operators of these resolving DNS servers not having adjusted them unwisely. – user981178 Apr 24 '16 at 5:36
  • Of course, this doesn't protect you if the DNS operators also mess up the max-cache-ttl settings. We hope they don't. – Braiam Apr 24 '16 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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