From owner-freebsd-stable@FreeBSD.ORG Sun Dec 19 22:33:43 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E33D9106564A; Sun, 19 Dec 2010 22:33:42 +0000 (UTC) (envelope-from marka@isc.org) Received: from mx.ams1.isc.org (mx.ams1.isc.org [IPv6:2001:500:60::65]) by mx1.freebsd.org (Postfix) with ESMTP id 7B00B8FC13; Sun, 19 Dec 2010 22:33:42 +0000 (UTC) Received: from farside.isc.org (farside.isc.org [IPv6:2001:4f8:3:bb::5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "farside.isc.org", Issuer "ISC CA" (verified OK)) by mx.ams1.isc.org (Postfix) with ESMTPS id 8B3125F9865; Sun, 19 Dec 2010 22:33:27 +0000 (UTC) (envelope-from marka@isc.org) Received: from drugs.dv.isc.org (drugs.dv.isc.org [IPv6:2001:470:1f00:820:ea06:88ff:fef3:4f9c]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by farside.isc.org (Postfix) with ESMTP id 4E729E6030; Sun, 19 Dec 2010 22:33:25 +0000 (UTC) (envelope-from marka@isc.org) Received: from drugs.dv.isc.org (localhost [127.0.0.1]) by drugs.dv.isc.org (Postfix) with ESMTP id 111868083B1; Mon, 20 Dec 2010 09:33:23 +1100 (EST) To: Jeremy Chadwick From: Mark Andrews References: <20101215004712.GA56065@icarus.home.lan> <20101218220244.GA19039@icarus.home.lan> In-reply-to: Your message of "Sat, 18 Dec 2010 14:02:44 -0800." <20101218220244.GA19039@icarus.home.lan> Date: Mon, 20 Dec 2010 09:33:22 +1100 Message-Id: <20101219223323.111868083B1@drugs.dv.isc.org> X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mx.ams1.isc.org Cc: Dan Allen , dougb@freebsd.org, FreeBSD-STABLE Mailing List Subject: Re: ntpd fails on boot X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2010 22:33:43 -0000 In message <20101218220244.GA19039@icarus.home.lan>, Jeremy Chadwick writes: > On Sat, Dec 18, 2010 at 11:37:21AM -0700, Dan Allen wrote: > > > > On 14 Dec 2010, at 5:47 PM, Jeremy Chadwick wrote: > > > > > Anyway, many people are using the below with success. > > > > Sorry to say that netwait did NOT in the end fix the problem. > > > > I however discovered that if I put > > > > synchronous_dhclient="YES" > > > > into my /etc/rc.conf file, that over many days & reboots now has > > been delivering reliable networking such that ntpd always works. > > > > Thanks again to everyone for their help. > > For DHCP-based clients, yeah, netwait itself isn't sufficient; you'd > need to use synchronous_dhclient as you discovered. > synchronous_dhclient will accomplish the same thing as netwait for > DHCP-based clients. > > Explanation: dhclient will sit and wait until DHCP is fully negotiated > before continuing on with remaining rc scripts. The negotiation > involves packets going back/forth between the client and server on UDP > ports 67 and 68, which obvious acts as a validator that traffic is > flowing across the interface. > > I'll add a comment to the top of the netwait script noting that it > should be used for environments where the system is not using DHCP > (configured static IPs in rc.conf), and mention for DHCP-based clients > to use synchronous_dhclient instead. My solution was to start/re-start ntp using /etc/dhclient-exit-hooks whenever the IP address changed. -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org