From owner-freebsd-net@freebsd.org Mon Jun 15 12:17:56 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06F0233206F for ; Mon, 15 Jun 2020 12:17:56 +0000 (UTC) (envelope-from meka@tilda.center) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 49lr2C5rzmz4Wb4 for ; Mon, 15 Jun 2020 12:17:55 +0000 (UTC) (envelope-from meka@tilda.center) Received: by mailman.nyi.freebsd.org (Postfix) id C8E733322BA; Mon, 15 Jun 2020 12:17:55 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8B2133254B for ; Mon, 15 Jun 2020 12:17:55 +0000 (UTC) (envelope-from meka@tilda.center) Received: from mail.tilda.center (mail.tilda.center [45.63.43.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49lr2C1S6tz4WPn; Mon, 15 Jun 2020 12:17:54 +0000 (UTC) (envelope-from meka@tilda.center) Received: from tilda.center (109-93-225-192.dynamic.isp.telekom.rs [109.93.225.192]) by mail.tilda.center (Postfix) with ESMTPSA id D7466134AA; Mon, 15 Jun 2020 14:17:47 +0200 (CEST) Date: Mon, 15 Jun 2020 14:17:46 +0200 From: Goran =?utf-8?B?TWVracSH?= To: Andriy Gapon Cc: Ryan Steinmetz , jaap@NLnetLabs.nl, net@FreeBSD.org Subject: Re: unbound and (isc) dhcpd startup order Message-ID: <20200615121746.z5yimfnhfm2xafzm@tilda.center> References: <3ace8441-a59b-8667-ed32-324853360281@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vh7iy2uhf6z5lrdc" Content-Disposition: inline In-Reply-To: <3ace8441-a59b-8667-ed32-324853360281@FreeBSD.org> X-Rspamd-Queue-Id: 49lr2C1S6tz4WPn X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:45.63.40.0/22, country:US] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 12:17:56 -0000 --vh7iy2uhf6z5lrdc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Mon, Jun 15, 2020 at 09:10:18AM +0300, Andriy Gapon wrote: > > 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 It might not be the exact answer you're looking for, but you might get some idea. I run isc-dhcpd inside CBSD jail and CBSD is started after local_unbound. For most of my needs, CBSD's b_order (short for boot order) works nicely, so if jail is an option for you, you might consider having services in jails and then use your jail manager (does jail.conf boots jails in order they appear in .conf file or is otherwise able to sort jail startups?) to force jail startup order. Regards, meka --vh7iy2uhf6z5lrdc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE1WIFkXy2ZeMKjjKEWj1TknovrLYFAl7nZucACgkQWj1Tknov rLYcDA/7B8lqAD1J0wGY9UWmdExzQEPjYeajFd0keFEIauEcNJViUa+tJBlm4UOd jxxw672x9MsmBSmiRfwxLAzBqxAQ5DLgNXJ0FCm0V4MkhoNd+4deLE7CC3XluGtM /qtm2gtBKlYw0BXIfVhePhUR9LhpdGVa3btkfu1lVGk3ExMo7BoEmn+wh14np1e5 76NckukAer+2gVsClWSDPds/DIXAtBExTdLvrFocD6ZHzlrcKxpH9QLXfDXGojma u8H1QWnKMWP2OfRTBi/yXxEvP5fjFpEjii6mUgEx0rsK+EmzOGM4cyh7bKY0pXTb oQ9HubSuxkkWYHu1FhHPSyJhT8+7vpzhA968zye6qGtWiYnHThrHy/n2xTHk9o5l dp+QOkoICKFlpfansOmQY2SvqqGUPTa82D8JIvGrfWOtMeBOY8sQlkugsZgPmUs9 o9BB3o504O/lnZWnjQfv5RnACw1tMkWnRuFDCfhzJnPbf3XaBqoV5zeaNSqkBZSM ntOoFanNzc+RK27PtA2rTbBetfe4chr3onI5gpWYmnwIVm5o1+r2/zUbXg8NfUtE eEafpRNmh4zvzhd1Z1Xz/ZXxiPKPSC3t+O3rzuN02+t//It8h+hGG6vQCxujXAMU e26JcxkCN7crBljE4rVd9dFRu7x9izLTMphuXOxcRPDfMQwoqvg= =A5WP -----END PGP SIGNATURE----- --vh7iy2uhf6z5lrdc--