Kea / hostapd conflict
I am currently migrating my DHCP server setup from dhcpd to kea. While doing so, I came across a problem that so far I have been unable to solve.
There are three network interfaces on my system that are relevant here, namely lan_wifi (3), lan_ether (4), and a bridge interface br_lan (6), of which these two are slaves:
[thomas@sarkovy ~]$ networkctl list
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 enp38s0 ether off unmanaged
3 lan_wifi ether enslaved configured
4 lan_ether ether enslaved configured
5 eth_cable ether routable configured
6 br_lan bridge routable configured
6 links listed.
In my existing dhcpd-based setup, there is an instance of the hostapd daemon running on the lan_wifi interface:
[root@sarkovy kea]# lsof -i udp:67
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
hostapd 18322 root 5u IPv4 288312 0t0 UDP *:bootps
dhcpd 19279 dhcpd 8u IPv4 312588 0t0 UDP *:bootps
Both these daemons apparently co-exist just fine. If, however, I try to replace dhcpd with kea-dhcp4, a conflict arises:
Aug 31 11:57:18 sarkovy kea-dhcp4[19308]: 2023-08-31 11:57:18.970 WARN [kea-dhcp4.dhcpsrv/19308.140339384615296] DHCPSRV_OPEN_SOCKET_FAIL failed to open socket: Failed to open socket on interface br_lan, reason: failed to bind fallback socket to address 192.168.0.1, port 67, reason: Address already in use - is another DHCP server running?
Aug 31 11:57:18 sarkovy kea-dhcp4[19308]: 2023-08-31 11:57:18.970 INFO [kea-dhcp4.dhcp4/19308.140339384615296] DHCP4_OPEN_SOCKETS_FAILED maximum number of open service sockets attempts: 0, has been exhausted without success
I have to stop hostapd in order to be able to start kea-dhcp4. Unfortunately, I need both of them. My kea configuration includes the following "interfaces-config" section:
"interfaces-config": {
"interfaces": [ "br_lan/192.168.0.1" ],
"dhcp-socket-type": "raw",
"service-sockets-require-all": true
},
Is there anything I can do to resolve this conflict?