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
@ 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 220.127.116.11
www IN CNAME domain.com.
mail IN A 18.104.22.168
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.