I have complie dnsmasq version 2.55 on Centos 5.3 and facing problem in max-ttl option.
I set max-ttl=691200 and try to check it, I think its not working. I want if any request goes through my dns its store for 8 days. Here is my configuration which I set in my dnsmasq.conf file. bogus-priv filterwin2k cache-size=59000 no-negcache dns-forward-max=25000 max-ttl=691200 And here is my testing result. [root@cache ~]# ifconfig eth1 eth1 Link encap:Ethernet HWaddr 4C:00:10:3A:62:90 inet addr:172.16.173.1 Bcast:172.16.173.255 Mask:255.255.255.0 inet6 addr: fe80::4e00:10ff:fe3a:6290/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:800250915 errors:7 dropped:0 overruns:0 frame:0 TX packets:965491461 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1194681302 (1.1 GiB) TX bytes:2148168146 (2.0 GiB) Interrupt:177 Base address:0x2000 [root@cache ~]# dig @172.16.173.1 v7.lscache4.c.youtube.com ; <<>> DiG 9.3.4-P1 <<>> @172.16.173.1 v7.lscache4.c.youtube.com ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29731 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;v7.lscache4.c.youtube.com. IN A ;; ANSWER SECTION: v7.lscache4.c.youtube.com. 211 IN A 221.120.218.34 ;; Query time: 18 msec ;; SERVER: 172.16.173.1#53(172.16.173.1) ;; WHEN: Wed Oct 6 09:37:58 2010 ;; MSG SIZE rcvd: 59 [root@cache ~]# dig @172.16.173.1 v7.lscache4.c.youtube.com ; <<>> DiG 9.3.4-P1 <<>> @172.16.173.1 v7.lscache4.c.youtube.com ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8861 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;v7.lscache4.c.youtube.com. IN A ;; ANSWER SECTION: v7.lscache4.c.youtube.com. 178 IN A 221.120.218.34 ;; Query time: 0 msec ;; SERVER: 172.16.173.1#53(172.16.173.1) ;; WHEN: Wed Oct 6 09:38:31 2010 ;; MSG SIZE rcvd: 59 [root@cache ~]# dig @172.16.173.1 v7.lscache4.c.youtube.com ; <<>> DiG 9.3.4-P1 <<>> @172.16.173.1 v7.lscache4.c.youtube.com ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60814 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4 ;; QUESTION SECTION: ;v7.lscache4.c.youtube.com. IN A ;; ANSWER SECTION: v7.lscache4.c.youtube.com. 300 IN A 221.120.218.34 ;; AUTHORITY SECTION: youtube.com. 311 IN NS ns3.google.com. youtube.com. 311 IN NS ns2.google.com. youtube.com. 311 IN NS ns1.google.com. youtube.com. 311 IN NS ns4.google.com. ;; ADDITIONAL SECTION: ns1.google.com. 94146 IN A 216.239.32.10 ns2.google.com. 94146 IN A 216.239.34.10 ns3.google.com. 94146 IN A 216.239.36.10 ns4.google.com. 94146 IN A 216.239.38.10 ;; Query time: 175 msec ;; SERVER: 172.16.173.1#53(172.16.173.1) ;; WHEN: Wed Oct 6 09:43:47 2010 ;; MSG SIZE rcvd: 202 In first query to v7.lscache4.c.youtube.com its take 18msec in second query its take 0msec but in third query its take 175msec. I hope you will understand my question.