We have 2 DHCP servers (Ubuntu 18.04), they are configured as failover mode (primary / secondary).
They work brilliantly, no issues with them since about 4 years.
Now, we had a power cut, so one of them went down (the primary) for about 6 hours. For my surprise, the secondary refused to issue any IP addresses at all, so it looked like that both of them have to be online to work, which is not the purpose of having failover mode.
Both of them started to work as soon as the power came back and the primary came online again.
Any idea why we lose DHCP service if one is out of order? As mentioned, failover mode should work in case one server goes down for any reason.
MY configurations is as follows:
Primary:
/etc/dhcp/dhcpd.conf
log-facility local7;
authoritative;
ddns-update-style none;
failover peer "failover" {
primary;
address 172.17.1.11;
port 519;
peer address 172.17.1.20;
peer port 520;
max-response-delay 30;
max-unacked-updates 10;
load balance max seconds 3;
mclt 3600;
split 128;
}
Secondary:
log-facility local7;
authoritative;
ddns-update-style none;
failover peer "failover" {
secondary; # declare this to be the secondary server
address 172.17.1.20;
port 520;
peer address 172.17.1.11;
peer port 519;
max-response-delay 30;
max-unacked-updates 10;
load balance max seconds 3;
}
Would it help if I change "split" to 255 in the primary (instead of 128) OR use hba, as below
hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff;
instead of "split" and add the following to both ?
max-lease-misbalance 2;
max-lease-ownership 1;
min-balance 300;
max-balance 1800;
Many thanks
Madona