From owner-freebsd-stable@FreeBSD.ORG Sat Dec 18 22:02:47 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 E63CF1065670 for ; Sat, 18 Dec 2010 22:02:47 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta14.westchester.pa.mail.comcast.net (qmta14.westchester.pa.mail.comcast.net [76.96.59.212]) by mx1.freebsd.org (Postfix) with ESMTP id 8F6AE8FC14 for ; Sat, 18 Dec 2010 22:02:46 +0000 (UTC) Received: from omta13.westchester.pa.mail.comcast.net ([76.96.62.52]) by qmta14.westchester.pa.mail.comcast.net with comcast id kltp1f00317dt5G5Em2n85; Sat, 18 Dec 2010 22:02:47 +0000 Received: from koitsu.dyndns.org ([98.248.34.134]) by omta13.westchester.pa.mail.comcast.net with comcast id km2l1f00F2tehsa3Zm2mN2; Sat, 18 Dec 2010 22:02:47 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 5F4909B427; Sat, 18 Dec 2010 14:02:44 -0800 (PST) Date: Sat, 18 Dec 2010 14:02:44 -0800 From: Jeremy Chadwick To: Dan Allen Message-ID: <20101218220244.GA19039@icarus.home.lan> References: <20101215004712.GA56065@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: 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: Sat, 18 Dec 2010 22:02:48 -0000 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. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP:4BD6C0CB |