Staying alive: what is TTL and why is it important for your DNS setup?

07/11/2022

Staying alive: what is TTL and why is it important for your DNS setup?

If you know about DNS, you have probably heard of the Time-to-Live (TTL) field. But mistakes with TTL are more common than you might think. Here we look at the quirks of DNS record sets, parent/child domains and how to avoid TTL problems.

By Lars-Johan Liman, Senior Systems Specialist at Netnod. Originally published here

Welcome to The Quirks of the DNS, a series of short blog posts where I highlight some of the odd corners of the Domain Name System (DNS)–the universal database for all things Internet. We will see some interesting issues that can occur with the DNS and I will give some recommendations for how to avoid problems.

In this post we will look at Time-to-Live (TTL), a field in every DNS record that tells DNS clients how long the information in that record is valid and, thus, how long it can be stored in the DNS client’s cache. You can think of TTL like the best before date on a milk carton. Once that date expires, the cache knows it has to throw away that milk carton and get a new one!

TTL and parent/child DNS records

In the DNS, the “handover” from a server serving a shorter name (se.) to one serving a longer name (netnod.se.) is expressed using records of the type NS (nameserver). A client asking the se. server for a name that ends in netnod.se. will only receive NS records telling the client to “go elsewhere” to look, namely to the servers that hold the information for netnod.se.

The records handed out by the se. server (“the parent”) will look something like this:

(Free access, no subscription required)

netnod.se.       86400 IN    NS    nna.netnod.se.

netnod.se.       86400 IN    NS    nnb.netnod.se.

netnod.se.       86400 IN    NS    nnp.netnod.se.

The views expressed by the authors of this blog are their own and do not necessarily reflect the views of LACNIC.

Subscribe
Notify of

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments