[Dnsmasq-discuss] Finding actual DNS server used

Chris Green cl at isbd.net
Sat Jan 14 19:27:28 GMT 2017


On Sat, Jan 14, 2017 at 07:29:47PM +0100, Albert ARIBAUD wrote:
> Hi again Chris,
> 
> Le Sat, 14 Jan 2017 16:06:39 +0000
> Chris Green <cl at isbd.net> a écrit:
> 
> > On Sat, Jan 14, 2017 at 03:40:52PM +0100, Albert ARIBAUD wrote:
> > > > I've not spotted anything in the manual page that stands out for
> > > > that purpose.  
> > > 
> > > There is not much point for it, is there? I mean, if dnsmasq has
> > > upstream servers (possibly per request domain) and acts as a local
> > > server, it is so that DNS clients on the LAN do *not* have to know
> > > these upstream servers.
> > > 
> > > Or maybe I am missing something. What is your use case?
> > >   
> > Well for one it's useful to be able to check whether dnsmasq is using
> > a sensible DNS server.  
> 
> Whatever server dnsmasq uses, it does so because its configuration
> tells it to. The servers in this configuration are there either
> because they were put in there by the dnamasq host admin (e.g., for
> handling unqualified names as LAN names), or because the host has one
> or more interfaces on which it is a DHCP client, not server, and the
> actual DHCP server announces a DNS server which e.g. the Network
> Manager added to the dnsmasq config. Do you see another case?
> 
Yes, so I want to check that the DNS server I *think* it should be
using from the configuration or DHCP is *actually* what it's using.


> > On my home LAN I have a full dnsmasq running on a Raspberry Pi and
> > point all the other systems at that for DNS.  The other systems
> > include a number of xubuntu Linux systems which run the 'local only'
> > dnsmasq which is run automatically by Network Manager.
> 
> Pretty much the same here on the very machine I am typing on right
> now except my LAN's dnsmasq does not run on a RPi. :)
> 
> > Thus in my case, to prove that everything is working as intended, I'd
> > like to be able to see that all systems (except the Raspberry Pi) are
> > using the Raspberry Pi as their DNS server.  In addition I might also
> > want to check what upstream servers the Pi is using.
> 
> I don't understand your problem... The local dnsmasq on my Xubuntu
> machine takes its servers from its only source of DNS server IPs: the
> DHCP (and RA) info it receives from my LAN's dnsmasq, and I control that
> (as you control that on your RPi's dnsmasq), therefore I *know* which
> DNS servers my Xubuntu machine can use.
> 
If it's working right and as you expected, yes.  However it could be,
for example, that your desktop machine is getting the wrong DHCP
server (I have routers that might, if misconfigured, provide DHCP).


> Why do you think any of your Xubuntu machine would use a DNS server it
> was not provided through DHCP or RA ?
> 
I don't, but it *might* not have used the DHCP server I thought it did.


Why is is so difficult to provide this information?  At the very least
it would provide a confidence check that all is working as intended.
It might very well help if something isn't working too.

For example if my machine can't connect to another machine on the LAN
but can see the outside world it suggests it's getting DNS from
something other than my Pi DNS server.  If I could check what DNS it
is using then it would confirm that either it has got it's DNS set up
from somewhere else or that it has got the right DNS (the Pi) but that
the Pi is set up wrong somehow.

-- 
Chris Green



More information about the Dnsmasq-discuss mailing list