[1:root@c3po dhcp]$ rpm -qa | grep dhcp | sort
dhcp-client-4.3.6-8.fc27.x86_64
dhcp-common-4.3.6-8.fc27.noarch
dhcp-libs-4.3.6-8.fc27.x86_64
dhcp-server-4.3.6-8.fc27.x86_64
I have a DHCPv4 fail-over pair who's dhcpd.conf has an include
statement:
server-name "c3po";
set my_lease_increment = 1;
include "/etc/dhcp/common/dhcpd.common.conf";
my_lease_increment and server-name are different on the fail-over
partner:
server-name "jabba";
set my_lease_increment = 2;
include "/etc/dhcp/common/dhcpd.common.conf";
I use my_lease_increment to set the DNS TTL so that I can tell which
partner
issued the lease:
ddns-ttl = encode-int((lease-time / 2) +
extract-int(my_lease_increment,8), 32);
when I use 'dig lan.example.com axfr':
NSPManager.lan.example.com. 7201 IN A
192.168.42.2
shipping.lan.example.com. 7202 IN A 192.168.42.60
any TTL ending in 1 the primary issued the lease; 2 is
the secondary.
Bug part: This doesn't work in DHCPv6. my_lease_increment used by
the
the included file is null. It took me awhile to figure this out.
My workaround
is I use:
option dhcp6.preference 1;
in the outer file which IS available in the included
file:
ddns-ttl =
encode-int((extract-int(config-option
server.default-lease-time,32) / 2) + extract-int(config-option
dhcp6.preference,8), 32); # works!
I realized that fail-over is not working yet but one day it will be.
Also for DHCPv6, I've noticed that some evals
https://www.isc.org/wp-content/uploads/2017/08/dhcp43eval.html
aren't working:
hardware
leased-address
lease-time
Thanks for DHCP!
Bill