You can set the time you cache items by editing the file:
/var/named/named.local and editing the line:
86400 ) ; MinimumThat is 24 hours default on my caching name server ... and probably on your as well. So, your server will cache all info for 24 hours for outside zones....BUT -----
BUT remember that the primary domain controller for a zone controls the minimum refresh rate for that zone ... so
yahoo.com controls thier minumum refresh rate. Your caching server will do 24 hours or the minimum they specify ... which ever is less.
It just so happens that yahoo.com specifies 600 seconds as minimum time ... so 600 seconds it is.
Here is how to see the time specified for a zone ... use this command:
nslookup -silnow you are in the nslookup prompt ... issue the command:
set type=soanow issue the command:
yahoo.comthe result should be:
CODE
yahoo.com
origin = ns1.yahoo.com
mail addr = hostmaster.yahoo-inc.com
serial = 2004062922
refresh = 900
retry = 300
expire = 604800
minimum = 600
Authoritative answers can be found from:
ns1.yahoo.com internet address = 66.218.71.63
SO, no matter what you do, your name server will requery yahoo.com at every 600 seconds...(and since retry is 300 seconds ... the server will retry every 300 seconds).
now type the command:
abc123.comthe result:
CODE
Non-authoritative answer:
abc123.com
origin = dns37.register.com
mail addr = root.register.com
serial = 200103273
refresh = 10800
retry = 86400
expire = 604800
minimum = 3600
Authoritative answers can be found from:
dns37.register.com internet address = 216.21.234.89
SO your server would query that record every 3600 seconds (1 hour)...since the retry is 86400, it will retry every 3600 seconds (the minimum of the 2).
The contoller of the domain sets the minimum refresh time for thier domain ... I don't think you can override it.
------------------------
The cache is initially stored in memory, but can also be written to disk in /var/named .
-----------------------
Also .. in the dig command, the second column is how long till that record will be lookup up again ... so do:
dig www.yahoo.comthe answer section says:
[code];; ANSWER SECTION:
www.yahoo.com. 300 IN CNAME www.yahoo.akadns.net.
www.yahoo.akadns.net. 46 IN A 216.109.117.107
www.yahoo.akadns.net. 46 IN A 216.109.117.207
www.yahoo.akadns.net. 46 IN A 216.109.117.108
www.yahoo.akadns.net. 46 IN A 216.109.118.71
www.yahoo.akadns.net. 46 IN A 216.109.118.72
www.yahoo.akadns.net. 46 IN A 216.109.118.66
www.yahoo.akadns.net. 46 IN A 216.109.118.69
www.yahoo.akadns.net. 46 IN A 216.109.117.109[/b]
SO ... yahoo.com will be 300 seconds ...
you will quesry YOUR name server (from your machine) every 60 seconds ... and your DNS will retry every 300 seconds to the yahoo.com server.
------------------
see this reference:
http://ldp.hughesjr.com/HOWTO/DNS-HOWTO-3.html