On Tue, 2005-05-17 at 09:37 -0500, Johnny Hughes wrote:
On Tue, 2005-05-17 at 07:28 -0700, Lee Parmeter wrote:
I started the named server on CentOS and it seems to resolve DNS request OK, but it does not seem to retain the info for very long. From what I can tell using "dig", a domain's ip address is retained for less than 12 hours. So in the morning, it takes 4+ seconds to resolve again the first time. Is there an adjustment somewhere for this or is the caching named support not enabled by default?
Also, I thought it would be faster if I set named to use my ISP's named server as the first choice. Where do I set this up, in root.hints?
Anyone who knows more about "named" please feel free to comment!
Thanks! Lee
The owner of the domain controls how long DNS entries are cached. If you do a dig, one of the things you get from an authorized DNS server for that domain is the TTL (time-to-live). That is how many seconds your entry will remained cached in a non-authoritative DNS server.
for example:
dig www.yahoo.com
; <<>> DiG 9.2.4 <<>> www.yahoo.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2270 ;; flags: qr rd ra; QUERY: 1, ANSWER: 9, AUTHORITY: 10, ADDITIONAL: 2
;; QUESTION SECTION: ;www.yahoo.com. IN A
;; ANSWER SECTION: www.yahoo.com. 300 IN CNAME www.yahoo.akadns.net. www.yahoo.akadns.net. 60 IN A 68.142.197.89 www.yahoo.akadns.net. 60 IN A 68.142.197.90 www.yahoo.akadns.net. 60 IN A 68.142.197.73 www.yahoo.akadns.net. 60 IN A 68.142.197.75 www.yahoo.akadns.net. 60 IN A 68.142.197.76 www.yahoo.akadns.net. 60 IN A 68.142.197.80 www.yahoo.akadns.net. 60 IN A 68.142.197.83 www.yahoo.akadns.net. 60 IN A 68.142.197.88
;; AUTHORITY SECTION: akadns.net. 127047 IN NS asia5.akadns.net. akadns.net. 127047 IN NS asia9.akadns.net. akadns.net. 127047 IN NS eur10.akadns.net. akadns.net. 127047 IN NS za.akadns.org. akadns.net. 127047 IN NS zh.akadns.org. akadns.net. 127047 IN NS eur3.akadns.net. akadns.net. 127047 IN NS use1.akadns.net. akadns.net. 127047 IN NS use9.akadns.net. akadns.net. 127047 IN NS usw6.akadns.net. akadns.net. 127047 IN NS usw7.akadns.net.
;; ADDITIONAL SECTION: za.akadns.org. 526 IN A 208.185.132.176 zh.akadns.org. 526 IN A 63.208.48.46
;; Query time: 164 msec ;; SERVER: 192.168.0.2#53(192.168.0.2) ;; WHEN: Tue May 17 09:35:27 2005 ;; MSG SIZE rcvd: 424
So that will remain in cache another 127047 seconds :) _______________________________________________
oops ... I was wrong ... for 300 seconds :)