I found a few threads about this,
https://old.reddit.com/r/PFSENSE/comments/11papaf/is_it_possible_to_have_a_secondary_dhcp_server_on/
https://old.reddit.com/r/openwrt/comments/13fj4e5/need_advice_configuring_dns_server_failover_on_an/
https://old.reddit.com/r/openwrt/comments/1edpm01/how_to_have_two_dhcp_servers_that_dont_interfere/
And right now I think the most openwrt-friendly way of doing this is
-
synchronize leases via scripts
synchronize the file dhcp.leases with a script, using maybe netcat
So that the servers stay in sync, this requires figuring out how to make the dhcp server -reload it's dhcp.leases file when it is changed externally -
synchronize configuration via cron script
Also having another cron activated script that checks if /etc/config/dhcp has changed every 20 seconds.
If it has changed, then copy this tile to all other dhcp server and make the dhcp server reload their configuration, maybe luci will also have to reload ? -
create server watchdogs
another cron script will have one server query the other server at a fast interval, say once per 20 seconds. Each server knows it's priority level. If there is no other server at a high priority level that responds then that server is turned on.
This should preserve all the luci dhcp server configuration abilities
Has anyone done this before/already ?