On 7/3/2012 11:24 PM, Erich Titl wrote:
> Hi Victor
> at 03.07.2012 19:37, Victor McAllister wrote:
>> I am running LEAF 4.2.1
>> Every once in a while i run into long pauses trying to resolve an a DNS
>> address. I have 3 internal networks (one wireless) all of which look to
>> the router for DNS.
>> My /etc/reslov.conf
>> nameserver 127.0.0.1
>> nameserver isps dns numbers
>> nameserver 192.168.1.254
>> nameserver 192.168.2.254
>> nameserver 192.168.5.254
>> finds its nameservers from /etc/resolv.conf
>> # If you want dnsmasq to listen for DHCP and DNS requests only on
>> # specified interfaces (and the loopback) give the name of the
>> # interface (eg eth0) here.
>> # Repeat the line for more than one interface.
>> Occasionally I get long pauses on clients looking for say www.google.com
>> During these pauses that can last for several seconds, I can run a
>> nslookup ON THE LEAF BOX
>> nslookup www.google.com
>> and it just hangs looking for an address.
>> If I run
>> nslookup www.google.com ns1.sonic.net
>> it seems to resolve the address (ns1.sonic.net is my isp's primary dns)
> The way I understand the resolver is that it takes the uplink DNS server
> primarily from /etc/resolv.conf
> Now your resolv.conf points to your own local DNS server.
> You state that your dnsmasq settings get the name from resolv.conf, so
> that looks like a loop.
> I have not understood the above settings, where yoiu specify name
> servers apparently for all your interfaces.
> In a primitive set up I would first decouple dnsmasq from resolv.conf.
> Then put your real uplink DNS server into both.
> Secondly if you want to make dnsmasq depend from resolv.conf, then set
> your real uplink dns server there.
> I believe what happens is something like
> 1) your dnsmasq settings primarily build a loop
> 2) the resolver is timing out and tries to figure out where else to look
> according to the DNS hints
> 3) it follows the redirections in the hints and by sheer luck it finds a
> server which is willing to respond.
I changed resolv.conf to only list 127.0.0.1 and my isps DNS machines.
This improved the workings of dnsmasq. It has only lost its bearings to
the outside DNS once in two days. When it did so, I did an nslookup on
the router specifying the ip of the outside DNS servers and it
immediately found its bearings. Evidently dnsmasq can get lost even when
it only knows itself and two dns servers.
I put the dns servers in a separate file /etc/dns.conf to decouple
dnsmasq from resolv.conf. This file only has the IPs of my ISPs DNS servers.
resolve.conf only has 127.0.0.1
This is working - but I will watch it for a while to see if dnsmasq can
still get "lost". Thanks.