[Dnsmasq-discuss] Is this a reasonable solution to providing DHCP/DNS backup?
Chris Green
cl at isbd.net
Thu Dec 2 20:04:55 UTC 2021
I have been thinking about this problem on and off ever since I
brought it up here a few months ago.
I think I have what sounds to me like a workable solution but I'd like
to hear what others think, particularly if there are any very obvious
holes in it.
The idea is to have two systems on the LAN which are configured to run
dnsmasq with identical configuration.
I have systems with static IP, call them maindns on 192.168.1.2 and
backupdns on 192.168.1.3 at the moment. At preset 192.168.1.2 is the
DNS and DHCP server for the LAN.
So, to provide backup I will configure backupdns to run dnsmasq as
well, with listen-address=192.168.1.2 in its configuration so that it
doesn't actually do anything (except provide local DNS via the
loopback address maybe).
If maindns dies then I simply add 192.168.1.2 to backupdns's
ethernet interface:-
ip addr add 192.168.1.2 dev enp0s25
It won't provide instant failover as I have to execute the above
command and I'm not going to try and automate it, I don't need instant
hot backup. However I can't see why it shouldn't work and allow me to
fix maindns at my leisure.
Can anyone see any major holes in this strategy? ... or even minor
holes that mean I'll have to do a bit more than the 'ip' command?
I'm aiming to synchronise /etc/dnsmasq.conf and /etc/dnsmasq.d (or at
least keep them in step manually, it's not as if they change frequently).
I may even try and synchronise the dnsmasq lease file.
--
Chris Green
More information about the Dnsmasq-discuss
mailing list