ntpd not adjusting the clock?

Chuck Swiger cswiger at mac.com
Tue Oct 17 22:40:14 UTC 2006

On Oct 17, 2006, at 3:13 PM, Zbigniew Szalbot wrote:
> My ntp.conf file looks like that:
> server 2.pl.pool.ntp.org prefer
> server 1.europe.pool.ntp.org
> server 0.europe.pool.ntp.org
> restrict default ignore
> driftfile /var/db/ntp.drift

Unless you've got additional restrict lines which permit some hosts  
to make changes, using only "restrict default ignore" will prevent  
ntpd from paying attention to the timeservers you've listed and it  
will even prevent ntpd from changing the local clock or being  
administered via ntpq from localhost.

This misconfiguration will also cause your ntpd to generate excessive  
numbers of queries, rather than syncing up and reducing the NTP  
polling interval from minpoll to maxpoll. [1]

Remove that line and restart ntpd.

> The rc.conf file has these lines:
> ntpd_enable="YES"
> ntpd_flags="-g -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ 
> ntp.drift"
> What am I doing wrong that instead of having the time synced I see  
> more and more discrepancy. When I rebooted and started the service  
> 6 days ago there was about 20 seconds difference. Now it is well  
> over 30.


     ntpq -c peers

...and you will be able to see the delay and offset from the NTP  
clocks you've configured in ntp.conf.


[1]: There are entire Linux distributions which have shipped with  
ntp.conf configured to prevent ntpd from working properly.  These  
client machines end up querying NTP servers in the pool.ntp.org  
service repeatedly at minpoll (or even faster, if iburst is  
specified) because they discard the responses given to them, and  
therefore constitute an abuse of NTP server resources.

More information about the freebsd-questions mailing list