From owner-freebsd-net@FreeBSD.ORG Sat Jun 6 08:25:21 2009 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BC4A106566B; Sat, 6 Jun 2009 08:25:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 98FDC8FC0A; Sat, 6 Jun 2009 08:25:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-151-9.carlnfd1.nsw.optusnet.com.au (c122-106-151-9.carlnfd1.nsw.optusnet.com.au [122.106.151.9]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n568PGuO007993 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Jun 2009 18:25:17 +1000 Date: Sat, 6 Jun 2009 18:25:16 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Doug Barton In-Reply-To: <4A297BB4.80002@FreeBSD.org> Message-ID: <20090606174642.I16690@delplex.bde.org> References: <200906051424.n55EOIrM012619@post.behrens.de> <4A297BB4.80002@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Frank Behrens , freebsd-net@FreeBSD.org, roberto@FreeBSD.org, Edwin Groothuis Subject: Re: NTP - default /etc/ntp.conf X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jun 2009 08:25:21 -0000 On Fri, 5 Jun 2009, Doug Barton wrote: > Frank Behrens wrote: >> Edwin Groothuis wrote on 5 Jun 2009 22:44: >>> After pondering at conf/58595, I came with this text. >>> >>> The ntpd is not enabled by default, so the fact that the servers >>> are commented out should not be an issue. >>> ... >>> +# server pool.ntp.org >>> +# server pool.ntp.org >>> +# server pool.ntp.org >> >> Isn't it better to use different entries? >> server 0.pool.ntp.org >> server 1.pool.ntp.org >> server 2.pool.ntp.org >> >> To be sure that the IP addresses are different. >> See >> http://www.pool.ntp.org/en/use.html > > I agree with this suggestion, as well as the others about adding the > default restrictions and the fallback local clock. I use 1 hard-coded server (= a local server for all machines except 1) (plus fallback to the local clock for all machines) and have never had any problems using only 1 (except if the server is not up at boot time then ntpdate (which is configured separately anyway) fails and ntpd -x takes too long to sync so I sync manually. too long:= more than 30 seconds, and I use -x since any slew except ones done at boot time by ntpdate is considered an error, and I use ntpdate instead of ntpd -g[q] since ntpdate works perfectly while at least old versions of ntpd -q are very broken). > Bruce is right > about the ntp.drift file name, however we already have existing stuff > that mentions ntpd.drift, and since it's specified on the command line > in rc.conf the problems of what it says in the code are bypassed. This is a bug in rc.conf. The drift file name is also extensively documented to be ntp.drift (in /etc even) in ntpd's man page: from "man ntpd | col -bx": % -f driftfile % Specify the name and path of the frequency file, default ^^^^^^^ % /etc/ntp.drift. This is the same operation as the driftfile ^^^^ ^^^^^^^^^ % driftfile configuration command. No, the default is not in /etc and is not named ntp.drift (even if the above is ntpd's default when a driftfile is configured without specifying a pathname to it (is this possible?) this is confusing. % outside the acceptable range, ntpd enters the same state as when the % ntp.drift file is not present. The intent of this behavior is to quickly ^^^^^^^^^ No need for a pathname here. % Frequency Discipline % The ntpd behavior at startup depends on whether the frequency file, usu- % ally ntp.drift, exists. This file contains the latest estimate of clock ^^^^ ^^^^^^^^^ "usually" instead of "default" is fine. % FILES % /etc/ntp.conf the default name of the configuration file % /etc/ntp.drift the default name of the drift file ^^^ ^^^^^^^^^ ^^^ ^^^^^^^ As above. /var/db/ntpd.drift is not documented anywhere in $(find /usr/share/man) of course. > ... > One more thing, it was said some time ago that due to a quirk in how > ntpd works on our system that adding the following to the server line > makes it work more efficiently: > > server foo iburst maxpoll 9 > > If someone smarter than me could confirm that it would be great. :) I use iburst maxpoll 6 and used to use a different maxpoll and complicated settings when I had a dialup internet connection (was 120 ms ping latency; now 8; 0.150 ms to the local server). These settings probably don't matter with fast connections. Bruce