the systemd service files delivered with the package work fine, but start the DHCP server on all available interfaces. This is practical in many cases, but in some situations you want the DHCP server just listen on a specific interface. I propose to add two additional service files that allow interface specific startup. Reproducible: Always
on example for the dhcpv4@.service file could be: [Unit] Description=DHCPv4 Server Daemon on interface %I Documentation=man:dhcpd(8) man:dhcpd.conf(5) After=network.target After=time-sync.target [Service] ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcp -group dhcp --no-pid %i [Install] WantedBy=multi-user.target so the %i is appling the interface that is needed.
This will work fine when you specify just one interface for dhcpd to listen on, but i think it won't work for multiple interfaces. Suggestion: /etc/systemd/system/dhcpd[4,6]/service.d/00gentoo.conf [Service] Environment="DHCPD_IFACES=eth0 br0" and in /etc/systemd/system/dhcpd4.service [Service] ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcp -group dhcp --no-pid $DHCPD_IFACES Basically its working like the /etc/conf.d/ files used to do for openrc.