$ pacman -Ss kea
community/kea 1.9.3-1 [installed]
High-performance, extensible DHCP server engine from ISC, supporting both DHCPv4 and DHCPv6
It is excellent to see Arch now has the latest and operational version of this modern replacement for the old ISC DHCP.
The documentation for the current version is now at https://kea.readthedocs.io/en/kea-1.9.3/arm/intro.html (the arm in the url is not related to the arm architecture}
]]>Setting up the config files was not as difficult as I had imagined, and there is also a nice test mode to check syntax. For a basic server all that is needed are the config files:
keactrl.conf
kea-ctrl-agent.conf
kea-dhcp4.conf
which can be started using the sample files from the package. Then once set up the configs can be checked with:
kea-ctrl-agent -t kea-ctrl-agent.conf
kea-dhcp4 -t kea-dhcp4.conf
and then run with
# systemctl start kea-ctrl-agent
and start the dhcp server:
systemctl start kea-dhcp4
Once running they can be started at boot by enabling the services.
There are multiple options for storage of the leases - but the basic way is in a text csv file - which is nicely readable - and you get a file similar to this:
$ cat /var/lib/kea/kea-leases4.csv
address,hwaddr,client_id,valid_lifetime,expire,subnet_id,fqdn_fwd,fqdn_rev,hostname,state,user_context
10.0.0.63,60:6d:3c:13:c8:40,01:60:6d:3c:13:c8:40,14400,1609615403,1,0,0,amazonfiretv,0,
10.0.0.66,d8:c0:a6:8c:c6:c3,ff:2b:db:95:11:00:02:00:00:ab:11:72:87:2a:da:87:7d:16:67,14400,1609621019,1,0,0,ryzen1,0,
10.0.0.72,5c:41:5a:b6:6c:8d,,14400,1609620901,1,0,0,echomasterbed,0,
10.0.0.73,5c:41:5a:92:e7:be,01:5c:41:5a:92:e7:be,14400,1609618688,1,0,0,echokitchen,0,
10.0.0.74,cc:9e:a2:26:0b:0b,01:cc:9e:a2:26:0b:0b,14400,1609619374,1,0,0,echolounge,0,
10.0.0.78,7c:61:66:42:c0:b0,01:7c:61:66:42:c0:b0,14400,1609620511,1,0,0,echobed3,0,
10.0.0.82,08:a6:bc:e7:3d:4d,01:08:a6:bc:e7:3d:4d,14400,1609615083,1,0,0,echobed2,0,
10.0.0.83,36:cd:d5:7a:20:e8,01:36:cd:d5:7a:20:e8,14400,1609615425,1,0,0,pixeldeb,0,
10.0.0.88,ec:b5:fa:04:dc:2a,,14400,1609619404,1,0,0,huebridge,0,
It is easy to set log files for /var/log/kea/ and the level of logging can be changed - initially INFO is useful to indicate any issues with the config lines, and then once running changing to just WARN.
So it all works very nicely - the only thing is that the package in arch could do with bringing up to date - the version in testing does have issues, but with 1.9.2 running well it would be nice to see the arch package, at least in testing, updated to the git upstream version 1.9.2 - since it works and I have not found any problems running it. However one of the package maintainers seems to no longer be an arch packager, and the other two named on the package are not responsive on email at the moment. I wonder if this could be 'adopted' by another maintainer who might have an interest, since kea seems to be the package that is being taken up by web servers to replace the old dhcp package in increasing numbers, and given that arch usually is very bleeding edge and up to date, it would be nice to see arch have this package available for those arch users who want to be more up to date with dhcp services. Is this worth putting in an arch bug report for a request to bring the package into the repos more up to date?
]]>