[Dnsmasq-discuss] Multiple Resolv Files?

Petri Savilahti petri.savilahti at gmail.com
Tue Nov 25 12:15:21 GMT 2008

>> What if the primary link (/etc/resolv.conf) goes down? Dnsmasq will
>> not get any replies using nameservers from this file. Does dnsmasq
>> automatically read then the /etc/ppp/resolv.conf?
> dnsmask reads all specified files on startup, creates a list of upstream dns
> servers, then chooses the one which "works best" (first querys go round robin,
> to measure). If this choosen server goes down, it reelects another one from its
> list. Additionally, if any resolvfile gets rewritten while dnsmask is running,
> it rereads the file and updates its list.
> Its simple as this, but it is not simple to say which server dnsmask will choose ;)

I tried this with the latest dnsmasq-2.46 and can't get it working. I
configured a static
configuration (IP address and /etc/resolv.conf) for the ADSL
connection and dynamic
DHCP configuration (IP address and /var/run/ppp/resolv.conf) for the
mobile connection.

I have the following lines in my dnsmasq.conf

When I reboot my machine I get the following lines to my /var/log/messages:
daemon.info dnsmasq[2862]: started, version 2.46 cachesize 150
daemon.warn dnsmasq[2862]: overflow: 7 log entries lost
daemon.info dnsmasq[2862]: using nameserver X.Y.182.230#53
daemon.info dnsmasq[2862]: using nameserver X.Y.180.230#53

and 5 sec later  when the mobile connection starts:
daemon.info dnsmasq[2862]: reading /var/run/ppp/resolv.conf
daemon.info dnsmasq[2862]: using nameserver Z.M.0.47#53
daemon.info dnsmasq[2862]: using nameserver Z.N.54.100#53.

Dnsmasq will forward only to the last two DNS  servers (Z.M.0.47 and
Z.N.54.100) even
if it would not get any response from them (mobile connection down).
The first two
nameservers (X.Y.182.230 and X.Y.180.230) are not even tried.

Any help would be appreciated.

- Petri

More information about the Dnsmasq-discuss mailing list