ntpd fails on boot

Jeremy Chadwick freebsd at jdc.parodius.com
Sat Dec 18 22:02:48 UTC 2010


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 at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.               PGP:4BD6C0CB |



More information about the freebsd-stable mailing list