Solaris Troubleshooting DNS : TTL settings on DNS

Sometimes DNS generates the following error:

No default TTL set using SOA minimum instead.

What is TTL – A quick review.

In order to force resolvers to discard information after a certain time, each RR (resource record) is associated with a TTL (time to live). The TTL field specifies the time in seconds that the information is to remain valid after it has been retrieved from the server. Specifically the maximum amount of time other nameservers may keep the RR in their cache.

The “minimum” TTL field is the default value for resource records that do not explicitly contain one. This time applies only to normal lookups, and has nothing to do with the time after which a secondary (slave) server should try to update the zone information.

Beginning with BIND 8.2, a $TTL directive is needed in order to set the default TTL for the zone.

Add a ‘$TTL XXXXXX‘ directive prior to the SOA record for the zone, at the top of the zone data files. This value is also specified in seconds. The suggested algorithm to convert the existing files is to put the current minimum TTL value from the last field of the SOA record into a $TTL directive, then set the Minimum TTL field to a smaller value.

For example: this is how zone datafile with $TTA appears

$TTL 28800
@ IN SOA ns1.domain.com. hostmaster.domain.com.(
1 ;serial number
10800 ;refresh after 3 hours
3600 ;retry after 1 hour
604800 ;expire after 1 week
600 ) ;minimum TTL of 10 min
IN NS ns1.domain.com.
IN NS ns2.domain.com.
domain.com. IN MX 10 mail.domain.com.
IN A 1.2.3.4
www IN CNAME domain.com.
mail IN A 1.2.3.5

Note:  The last field of the SOA record, the minimum TTL, is now interpreted as the “negative caching” time. Negative caching is the length of time a non-response answer remains in cache. This amount of time must expire before a new query to the DNS server is performed. Thus, set this value to something appropriately small; we suggest a value below 3 hours.

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

1 Response

  1. December 5, 2010

    […] This post was mentioned on Twitter by IT Blog Network, SOA Security. SOA Security said: Solaris Troubleshooting DNS : TTL settings on DNS « Gurkulindia.com: Add a '$TTL XXXXXX' directive prior to the … http://bit.ly/eLxw1S […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us