[Dnsmasq-discuss] Details of the --dhcp-optsdir=<path> option

Chris Green cl at isbd.net
Sat Sep 4 11:07:55 UTC 2021


On Sat, Sep 04, 2021 at 11:29:32AM +0100, Ed W wrote:
> On 04/09/2021 09:15, Chris Green wrote:
> 
> >> This works if your DHCP server only hands out static addressing so the host
> >> names are all listed in the /etc/hosts or addn hosts location on both
> >> machines.   If the DHCP server is handing out addresses from a pool, then
> >> only the DHCP dnsmasq instance will know about those hosts by name.
> >>
> > I was aiming to synchronise the lease file in /var between the two
> > systems as well as the configuration.
> >
> 
> Did you see my suggestion to cross post the events to each machine using 
> a script? I replied in one 
> of your other threads re this situation? I think you could make a simple/imperfect cluster setup
> like this fairly easily? (good enough for a small home lan)
> 
Yes, but I'm not quite clear what you mean by "cross post the events"?
Do you mean something more than just synchronising the /var/lib/misc/dnsmasq.leases 
file between the two systems?

Anyway I think I'm slowly working my way to a reasonable way of doing
this.  My latest idea changes things a little:-

Run identical dnsmasq configurations on two systems, keep the
configuration files and lease files synchronised.  Use
--listen-address to tell dnsmasq to listen to an IP that is only
configured on one of the systems.  Then, if that system dies, use 'ip
addr add x.x.x.x eth0' to create the IP that dnsmasq will use on the
backup system and all will be well.

Will dnsmasq complain if the --listen-address doesn't exist?  If so I 
can simply disable dnsmasq on the backup system (still synchronise
files) and start it up as well as configure the IP when I need it.

Can anyone see any major holes in this?

-- 
Chris Green



More information about the Dnsmasq-discuss mailing list