On Tue, Oct 05, 2010 at 11:31:29PM -0700, Mohammad Shakir wrote: > Now what should I do to resolve this problem, is there I am missing in my > configuration ? I want to override its expire time to 8 days. >
You can't and you should not, TTL are there for a reason ;) (Also, please stop top-posting, this makes things unreadable) > > > --- On Tue, 10/5/10, SamLT <samuel.leth...@intelunix.fr> wrote: > > From: SamLT <samuel.leth...@intelunix.fr> > Subject: Re: [Dnsmasq-discuss] max-ttl Problem > To: "Mohammad Shakir" <s_bark...@yahoo.com> > Cc: dnsmasq-discuss@lists.thekelleys.org.uk > Date: Tuesday, October 5, 2010, 11:21 PM > > On Tue, Oct 05, 2010 at 11:09:03PM -0700, Mohammad Shakir wrote: > > I have checked the upstream server give 4min for v7.lscache4.c.youtube.com > > site so my dns should override its expire time and gives it 8 days which I > > have defined in my configuration but its not working. > > > > > > upstream-ttl = 4min > max-ttl = 8days > > max-ttl > upstream-ttl > > > > --- On Tue, 10/5/10, SamLT <samuel.leth...@intelunix.fr> wrote: > > > > From: SamLT <samuel.leth...@intelunix.fr> > > Subject: Re: [Dnsmasq-discuss] max-ttl Problem > > To: "Mohammad Shakir" <s_bark...@yahoo.com> > > Cc: dnsmasq-discuss@lists.thekelleys.org.uk > > Date: Tuesday, October 5, 2010, 10:33 PM > > > > On Tue, Oct 05, 2010 at 10:21:17PM -0700, Mohammad Shakir wrote: > > > 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. > > > > > > From the manual: > > The specified maximum TTL will be given to clients instead of the true TTL > > value if it is lower > > > > > > It may be confusing a little but it's "if the maximum TTL (max-ttl) is lower > > than the true TTL given by the upstream servers > > > > > > > > > > > > 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. > > > > > > > > > > > > > > > > > _______________________________________________ > > > Dnsmasq-discuss mailing list > > > Dnsmasq-discuss@lists.thekelleys.org.uk > > > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > > > > > > > > > > > > > >