Keepalived & DHCP fail-over issues

Huh, so not really any changes?This is strange.

Manually editing /var/ipfire/dhcp/dhcpd.conf from

        option routers 192.168.222.251;
        option domain-name-servers 192.168.222.251, 8.8.8.8;

To

        option routers 192.168.222.254;
        option domain-name-servers 192.168.222.254, 8.8.8.8;

Works if doing a /etc/init.d/dhcp restart
Maybe some script to check and do this if keepalived is started and restart DHCP? Hmm…

EDIT: As long as I don’t do any changes, I guess it could work with manually editing option routers.

There is also the possibility to use declaration blocks for failover peers in dhcpd.conf, but if also they get replaces if doing changes in WGI a simple change on option routers is easier. As here https://linux.die.net/man/5/dhcpd.conf they say:

The server currently does very little sanity checking, so if you configure it wrong, it will just fail in odd ways. I would recommend therefore that you either do failover or don’t do failover, but don’t do any mixed pools. Also, use the same master configuration file for both servers, and have a separate file that contains the peer declaration and includes the master file. This will help you to avoid configuration mismatches. As our implementation evolves, this will become less of a problem.

About failover peers:

https://www.madboa.com/geek/dhcp-failover/

1 Like