[Dnsmasq-discuss] How to set timeout on upstream DNS server connections

Simon Kelley simon at thekelleys.org.uk
Wed Apr 24 14:30:05 BST 2013


On 24/04/13 13:25, Geoff Meakin wrote:
> Hi, I've searched for the answer to this, but can't find anything useful.
>
> I have a multi-vagrant VM local environment setup, using dnsmasq to find
> services on it, delegating to a VM DNS server where necessary. It works
> like a dream except for:
>
> Part of my DNSmasq configuration is to do this:
>
> server=/1.2.10.in-addr.arpa/10.2.1.2
>
> For reverse DNS lookups.
>
> However, sometimes the VM at 10.2.1.2 is not up, or not needed, in which
> case it is frustrating that lots of services which do reverse-dns lookups
> are extremely slow, as DNSmasq takes ~20s to return from trying to connect.
>
> Is there a way of configuring DNSmasq to timeout DNS lookups to certain
> servers after shorter amounts of time?
>


The upstream timeout for dnsmasq is always identical to the client's 
timeout, so the only way to do this is to reduce the timeouts at the 
client end.

However, if you can arrange that packets sent to 10.2.1.2 return a "No 
route to host" error when it's not up, things will fail much quicker. 
That may be possible by arp table or routing table manipulation, I've 
not looked at the details.


cheers,

Simon.



More information about the Dnsmasq-discuss mailing list