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.

I need to test various DNS changes on my domain which require that the zone file changes I make are updated quickly.

I'm a bit confused between Refresh, Retry, Expire and TTL values. Which is the one I need to set to a minimum, to "propogate DNS changes" (if I may use the term) without much latency? I'm rather new to nameservers, but have three nameservers set to rsync their zone files every 2 minutes. The first server (ns1.mydomain) has the following setup:

mydomain.com.       IN      SOA     ns1.mainnameserver.co.in. admin.mydomain.com. (
                   2007010401           ; Serial
                         1800           ; Refresh [1h=3600] 1800=30m
                          600           ; Retry   [10m]
                        86400           ; Expire  [2weeks] 86400=1day
                          600 )         ; Negative Cache TTL [1h]
;
$TTL 3m;
mydomain.com.      IN     NS      ns1.mainnameserver.co.in.
mydomain.com.      IN     NS      ns2.mainnameserver.co.in.
mydomain.com.      IN     NS      ns3.mainnameserver.co.in.
mydomain.com.      IN     MX      10 her.mainnameserver.co.in.
mydomain.com.      IN     A       198.13.18.223
www.mydomain.com.  IN     A       198.13.18.223
ns1.mydomain.com.  IN     A       197.18.72.23
ns2.mydomain.com.  IN     A       36.124.102.106
ns3.mydomain.com.  IN     A       36.117.98.133
mydomain.com.     3501    IN     TXT   "v=spf1 a:her.mainnameserver.co.in mx:hermes.mainnameserver.co.in mx: ip4:191.21.218.223 ~all"
*.mydomain.com.   3600    IN      CNAME   mydomain.com.

I've assumed that TTL is the value I need, and have set it as above, to 3 minutes. Is it the right way to do it?

On a related note..With the above zonefile, when I do a named-checkzone, I get /var/lib/bind/db.mydomain.com:1: no TTL specified; using SOA MINTTL instead. Why is this message shown? How do I avoid the warning and do it properly?

share|improve this question
    
Related: serverfault.com/questions/389801/… –  Deer Hunter Jun 12 '13 at 7:42
    
Have you increased the serial after updating the zonefile and before reloading bind? –  krissi Jun 12 '13 at 7:53
    
@krissi I've never incremented the serial, but have had DNS changes work. Is it required? –  Droidzone Jun 12 '13 at 7:57
    
Not sure in your case. If you restart all your servers after updating it may not be required. If you were using AXFR to replicate your zone to the servers or just reload your bind it would be required. For your scenario it would be a good idea to switch to AXFR anyways. It allows faster updates without downtimes. You can use dig www.mydomain.com. to check the remaining TTL of the record. –  krissi Jun 12 '13 at 8:11
    
What I've done is two seperate cron jobs. One cron rsyncs zone and config files to the other two. A seperate cron (on each server) restarts bind9 half a minute after the rsync. These run every 5 minutes. Is this an inefficient implementation? –  Droidzone Jun 12 '13 at 8:16
show 1 more comment

1 Answer 1

up vote 2 down vote accepted

TTL is definitly the value you need.

Have you tried writing it in seconds? set your TTL value to the following:

$TTL 180;

I believe the error you get is because you've used minutes. It doesn't understand you have actually specified the TTL and therefore defaults back to the SOA MINTTL value.

Remember to restart bind and run a new named-checkzone!

This page also describes what you're after in a nice way - Link

share|improve this answer
    
I have never even thought of using other units I'm afraid.. I found this article ipamworldwide.com/dns-zone-files.html describing zonefiles and the ability of using m,h,d,w. On the other hand, that should have worked with your "3m" so it could be that Bind is the culprit here.. –  xstnc Jun 12 '13 at 8:28
    
Actually the error message was still there. It disappeared when $TTL was added to the top of the file. It seems to accept 3m too as input. –  Droidzone Jun 12 '13 at 9:52
    
Good to know! Glad it worked out! –  xstnc Jun 12 '13 at 10:12
1  
The warning has a bit of history behind it. Originally, the last field of the SOA record defined the default TTL. RFC 2308 redefined it as negative TTL, and moved default TTL to the $TTL directive. Not specifying one rightly means that your server is falling back to the global default. –  Andrew B Jun 16 '13 at 17:57
add comment

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.