unbound and (isc) dhcpd startup order

Andriy Gapon avg at FreeBSD.org
Mon Jun 15 06:10:24 UTC 2020


I am configuring a small LAN -- mostly a gateway / router for it -- and I am
using unbound for a local DNS and isc-dhcp44-server for DHCP.
I have a few hosts with static IP addresses (for various reasons).
So, in unbound.conf I have an entry like
  local-data: "hipster.home.arpa. IN A 192.168.0.222"
and in dhcpd.conf  have:
  host hipster {


    hardware ethernet 40:74:e0:xx:xx:xx;


    fixed-address hipster.home.arpa;


 }

I am using a DNS name to avoid hardcoding the same IP address twice.
But obviously this depends on the local DNS server starting before the HDCP
server if they are on the same host / router.
It seems that at the moment there is nothing to ensure that order.

For the moment I modified rc.d/unbound to add this line:
  # BEFORE: dhcpd
I am not sure if this is the best solution and it's something that can be
included into the port.

On a related note, unbound rc script provides "unbound" service.
I think that maybe it should provide something more generic such as "nameserver"
or "dns-server" (not sure if there is an established name for that).
The reason I am saying this is that, IMO, if unbound is replaced with some other
name server implementation the rc dependency chains should stay the same.

Thanks!
-- 
Andriy Gapon


More information about the freebsd-net mailing list