[Dnsmasq-discuss] TTL override for clients?

Fredrik Ringertz Fredrik_Ringertz at livewire-connections.com
Fri May 7 09:18:33 BST 2010


Hi Justin,

Yes it is true that not all applications/operating systems respect the TTL. However there is no way you will be able to get around this.

There are a few registry settings in Windows you can modify to change its behaviour though. See http://www.updatexp.com/dns-windows-xp.html for a few of the options. I haven't done any of this though as I don't have access to my clients PCs.


Best Regards

Fredrik

-----Original Message-----
From: Justin McAteer [mailto:justin.mcateer at gmail.com] 
Sent: 06 May 2010 19:01
To: Fredrik Ringertz
Cc: dnsmasq-discuss at lists.thekelleys.org.uk
Subject: Re: [Dnsmasq-discuss] TTL override for clients?

Fredrik

I am interested in this and have a few questions. Is this being used
with web browsers, or other DNS clients? I have heard that there is
usually caching by Windows and also by the browser which may or may
not pay attention to the TTL information they are given.

If you are using this with web browsers, which versions. Also, have
you had to make any changes related to the client OS or client browser
configuration to support your custom TTL values?

Thank You,
Justin McAteer




On Thu, May 6, 2010 at 3:15 AM, Fredrik Ringertz
<Fredrik_Ringertz at livewire-connections.com> wrote:
> Hi Simon,
>
> Yes you are right, I did not think of that :)
>
> Thank you very much for your help on this!
>
>
> Best Regards
>
> Fredrik
>
> -----Original Message-----
> From: Simon Kelley [mailto:simon at thekelleys.org.uk]
> Sent: 05 May 2010 21:50
> To: Fredrik Ringertz
> Cc: dnsmasq-discuss at lists.thekelleys.org.uk
> Subject: Re: [Dnsmasq-discuss] TTL override for clients?
>
> Fredrik Ringertz wrote:
>> Hi Simon,
>>
>> Thanks again for all your help! I believe my patch seems to be
>> working fine now after some more testing.
>>
>> I have attached it here in case anyone else would be interested in
>> it. It will add a new configurable option (can be set in both command
>> line or dnsmasq.conf) called "max-ttl". The TTL (in seconds)
>> specified after it will be a maximum ttl which will be handed out to
>> a client.
>>
>> For example, if max-ttl is set to 150 and a client looks up
>> google.com which has a TTL of 300, then dnsmasq will add google.com
>> to its cache with a TTL of 300 still, however it will tell its
>> clients that the TTL is 150. If the returned TTL for google.com
>> happened to be 60, then 60 would be given to the clients since it is
>> lower then the configured max-ttl value.
>>
>> This is handy if for example like me you want your clients to have a
>> low ttl to avoid longer caching, but you don't want to override the
>> actual TTL value (to avoid flooding the upstream DNS servers).
>>
>>
>> Any feedback on the patch is highly appreciated as I am going to
>> apply it in a working environment soon and my C++ knowledge is basic
>> at best :)
>>
>> I haven't been able to add the max-ttl option to the French and
>> Spanish man page but otherwise I think it is all in there :)
>>
>>
>
> That looks great. The only problem I can see is that you don't take into
> account that --max-ttl may not be supplied, in which can daemon->max_ttl
> will be zero and nothing should be done.
>
>
> For your deployment it's fine. I've folded the patch into
>
> http://www.thekelleys.org.uk/dnsmasq/test-releases/dnsmasq-2.53test20.tar.gz
>
> and fixed the no --max-ttl issue there.
>
> Cheers,
>
>
> Simon.
>
>
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>



More information about the Dnsmasq-discuss mailing list