dnsmasq Client TTL
        Posted  
        
            by 
                user548971
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by user548971
        
        
        
        Published on 2012-11-29T21:51:07Z
        Indexed on 
            2012/11/29
            23:08 UTC
        
        
        Read the original article
        Hit count: 307
        
I have a situation where my hosts file is constantly changing. Because of this I don't want clients to cache ip addresses resolved using the hosts file. Here is the command that starts dnsmasq for me:
 /usr/sbin/dnsmasq -K -R -y -Z -b -E -S 8.8.8.8 -l /tmp/dhcp.leases -r /tmp/resolv.conf.auto --stop-dns-rebind --rebind-localhost-ok --dhcp-range=lan,192.168.2.2,192.168.2.249,255.255.255.0,12h -2 eth0
In looking at this site: http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
I see that the -T option has this description:
 -T, --local-ttl=<time>
 When replying with information from /etc/hosts or the DHCP leases file
 dnsmasq by default sets the time-to-live field to zero, meaning that 
 the requester should not itself cache the information. This is the 
 correct thing to do in almost all situations. This option allows a 
 time-to-live (in seconds) to be given for these replies. This will 
 reduce the load on the server at the expense of clients using stale 
 data under some circumstances.
My command doesn't have the -T option. Do I need it or does dnsmasq default TTL to zero without it?
© Server Fault or respective owner