[Dnsmasq-discuss] DNS/host lookup delay, how to diagnose?

Chris Green cl at isbd.net
Thu Feb 20 09:22:05 GMT 2020

On Thu, Feb 20, 2020 at 07:36:02AM +0100, Geert Stappers wrote:
> On Wed, Feb 19, 2020 at 10:16:17PM +0000, Chris Green wrote:
> > I have a small home LAN with a number of machines running (mostly)
> > xubuntu versions 19,10 and 18.04.
> > 
> > I have a local DNS/DHCP server machine (a Raspberry Pi) running dnsmasq.
> ambiguous, Because I can read
> } I have a local DNS/DHCP server machine implemented by running dnsmasq.
> } I have a local DNS/DHCP server machine that is also running dnsmasq.
Yes, sorry. - Draytek router with DHCP/DNS turned off. - Desktop running xubuntu 19.10 - Raspberry Pi running DHCP and DNS for LAN, Raspbian GNU/Linux, dnsmasq version 2.76
    192.168.1.x - Other machines running xubuntu etc. DHCP assigned addresses
> > If I reboot one of my machines and then do a DNS query using 'host'
> > for a local machine the first (and only the first) response takes a
> > long time.  The correct IP address is returned instantly but then
> > there is a long (5 seconds) delay before getting back to the command
> > prompt.  Subsequent searches are much faster.
> > 

Thus the DNS on the Raspberry Pi is providing the initial response to
the query but the client's local dnsmasq cache is providing the
response to subsequent queries (xubuntu installs dnsmasq for local DNS

> > Presumably the faster subsequent responses are down to the local DNS
> > cache in the client machine but why am I getting that five second
> > delay for the first request?
> > 
> > How can I diagnose this?
> Chart all compoments, shared the new map with us, tell again the situation.
> Regards
> Geert Stappers
> P.S.
> Here is assumed that original poster found in manual page:
>   --log-queries
>           Log the results of DNS queries handled by dnsmasq.

Yes, thanks, I'll be trying that but I wasn't sure how much timing
information it would provide.

Chris Green

More information about the Dnsmasq-discuss mailing list