[Dnsmasq-discuss] upstream server for "local domain" adresses

Simon Kelley simon at thekelleys.org.uk
Wed Jun 11 20:05:42 UTC 2014


On 08/06/14 22:01, Johann Knoeferl wrote:
> Hello,
> I am trying to use dnsmasq in an "excotic" way:
> I have two different subnets (two locations connected by OpenVPN): 192.168.6.0 
> and 192.168.10.0
> Both nets use the same domain.
> Both sides use dnsmasq as DNS and DHCP server.
> On each side, local adresses are kept in the hosts file.
> Now I tried to avoid redundant information in the hosts file and only wanted to 
> store the "real" local machines.
> E.g.:
> 192.168.6.1 (router1) hosts file:
> ---------------------------------------
> 192.168.6.11   00:0C:76:B0:BB:B6 * pc01                  # machine 1
> 192.168.6.12   00:0C:76:B0:BB:B6 * pc01                  # machine 2
> ...
> 192.168.10.1 (router2) hosts file:
> ---------------------------------------
> 192.168.10.17   00:0C:76:B0:BB:B6 * pc07                  # machine 7
> 192.168.10.18   00:0C:76:B0:BB:B6 * pc08                  # machine 8
> ...
> To reach all machines from net 1 (192.168.6.x) I tried the following config:
> domain-needed
> log-async=10
> no-resolv
> server=8.8.8.8
> server=192.168.180.2
> dhcp-range=192.168.6.20,192.168.6.200,168h
> domain=mydomain.lan
> expand-hosts
> read-ethers
> server=/mydomain.lan/192.168.10.1
> server=/10.168.192.in-addr.arpa/192.168.10.1
> It works almost as expected, but as soon as I do an nslookup for a machine in 
> the second net (192.168.10.x) it takes quite a long time for the answer.
> Afterwards all answers take quite lon (about 5 sec). Only solution is to restart 
> dnsmasq. But as soon as I ask for a machine in the second net, the problem 
> occurs again.
> When I put all machines in both hosts file an remove the server=/... config, I 
> don't have any delays.
> WHat is happening here? Am i abusing dnsmasq here? Is there another solution, to 
> keep only the real loacal machines in the hosts file and to acces them from both 
> sides?
> Or do I have to keep all machines in both hosts files?
> Thanks for any hints
> Robert
> 

Are you using the same configuration on both sides? I suspect that
you're somehow creating a loop where on server send the query to the
other, which sends it back to the first, which sends it again to the
second, and so on.

The first thing to do is to set

log-queries

and look at the log files to see what's happening.


Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list