From owner-freebsd-net@freebsd.org Mon Jun 15 06:50:04 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 506ED329E55 for ; Mon, 15 Jun 2020 06:50:04 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) 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 49lhlw0M4yz4BTS for ; Mon, 15 Jun 2020 06:50:04 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: by mailman.nyi.freebsd.org (Postfix) id 05B42329AE0; Mon, 15 Jun 2020 06:50:04 +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 05485329E54 for ; Mon, 15 Jun 2020 06:50:04 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lhlv4MpWz4BQl; Mon, 15 Jun 2020 06:50:03 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 05F6o1R5091570 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sun, 14 Jun 2020 23:50:08 -0700 (PDT) (envelope-from bsd-lists@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 Cc: Andriy Gapon In-Reply-To: <3ace8441-a59b-8667-ed32-324853360281@FreeBSD.org> From: Chris Reply-To: bsd-lists@BSDforge.com To: Subject: Re: unbound and (isc) dhcpd startup order Date: Sun, 14 Jun 2020 23:50:08 -0700 Message-Id: <17b97eced1b46f6f0891c83962242c6c@udns.ultimatedns.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49lhlv4MpWz4BQl X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; REPLY(-4.00)[] 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 06:50:04 -0000 On Mon, 15 Jun 2020 09:10:18 +0300 Andriy Gapon avg@FreeBSD=2Eorg said > 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=2E > I have a few hosts with static IP addresses (for various reasons)=2E > So, in unbound=2Econf I have an entry like > local-data: "hipster=2Ehome=2Earpa=2E IN A 192=2E168=2E0=2E222" > and in dhcpd=2Econf have: > host hipster { >=20 >=20 > hardware ethernet 40:74:e0:xx:xx:xx; >=20 >=20 > fixed-address hipster=2Ehome=2Earpa; >=20 >=20 > } >=20 > I am using a DNS name to avoid hardcoding the same IP address twice=2E > But obviously this depends on the local DNS server starting before the HD= CP > server if they are on the same host / router=2E > It seems that at the moment there is nothing to ensure that order=2E Isn't there something like a "start late" available in rc=2Econf rc(8)? That would then permit starting your local unbound prior to DHCPD? Maybe that allow you to achieve your desired results? >=20 > For the moment I modified rc=2Ed/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=2E >=20 > On a related note, unbound rc script provides "unbound" service=2E > 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)=2E > The reason I am saying this is that, IMO, if unbound is replaced with som= e > other > name server implementation the rc dependency chains should stay the same=2E >=20 > Thanks! > --=20 > Andriy Gapon --Chris