[ntp:questions] NTPd instability and openntpd

Mij mij at bitchx.it
Tue Sep 18 16:45:16 UTC 2007


I'll try to respond to all of your mails at once. Thanks.

I am sure that UDP packets come in:

05:59:13.157285 IP zeta.33075 > 10.0.0.5.ntp: NTPv2, Reserved, length
12 05:59:13.157361 IP 10.0.0.5.ntp > zeta.33075: NTPv2, Reserved,
length 432 05:59:13.157390 IP 10.0.0.5.ntp > zeta.33075: NTPv2,
Reserved, length 180 06:13:13.278316 IP zeta.33075 > 10.0.0.5.ntp:
NTPv2, Reserved, length 12 06:13:18.272598 IP zeta.33075 >
10.0.0.5.ntp: NTPv2, Reserved, length 12 06:27:13.352924 IP zeta.33075
> 10.0.0.5.ntp: NTPv2, Reserved, length 12 06:27:13.353035 IP
10.0.0.5.ntp > zeta.33075: NTPv2, Reserved, length 32

and in fact the poller machine "zeta" logs

Tue Sep 18 06:14:11 CEST 2007
no answer

Another sniffer report that logs the packets that are filtered by
thefirewall is empty

tcpdump -n -w /var/ntpdenied.dump -i pflog0 udp and port 123
ls -l /var/ntpdenied.dump
-rwxr-xr-x   1 root  wheel  0 Sep  7 10:22 /var/ntpdenied.dump

>  There is no such thing as L1 and L2 in ntpd (at least the reference
>  implementation).

debug level 1 and 2. -D1 and -D2

>  What version are you running?

ntpd 4.2.0-a

>  You run debug mode by adding the -D2 or -d arguments to the command
> line. Please post the output of ntpq -p

if this is useful... :
     remote           refid      st t when poll reach   delay   offset
 jitter
=======================================================================
======= *193.204.114.233 .UTCI.           1 u  510 1024  377    7.277
  1.227   0.777 +80.83.192.129   150.254.183.15   2 u  580 1024  377
15.525    3.803   0.206 +62.173.184.58   193.204.114.233  2 u  529
1024  377   22.609   -8.480   3.044 -85.88.21.202    192.36.144.22
2 u  634 1024  377   46.788   15.443   0.654 +194.42.48.120
192.53.103.104   2 u  577 1024  377    7.650    0.281   0.418

>  your config file

it's pretty simple (comments stripped)

server ntp2.inrim.it prefer
server ntps.net4u.it
server ntp2.altarisoluzione.com
server time.proxgate.net
server clock.tix.ch
driftfile /var/db/ntp.drift
statistics clockstats loopstats peerstats sysstats
statsdir /var/log/ntpd/
filegen clockstats file clockstats.log type month enable
filegen loopstats file loopstats.log type month enable
filegen peerstats file peerstats.log type month enable
filegen sysstats file sysstats.log type month enable

> and the command-line arguments.

/usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid

>  It's hard to determine what's wrong without any information. Also
> postanything logged in your syslog which might show what's going on.

Besides a lot of
Sep 14 23:47:02 voodoo ntpd[21093]: kernel time sync disabled 2041
Sep 14 23:49:09 voodoo ntpd[21093]: kernel time sync enabled 2001
..
Sep 15 08:09:03 voodoo ntpd[23987]: kernel time sync enabled 6001


3 of these appeared

Sep 14 23:19:30 voodoo ntpd[20438]: too many recvbufs allocated (40)
Sep 14 23:36:39 voodoo ntpd[21058]: too many recvbufs allocated
(40)Sep 17 17:34:10 voodoo ntpd[33902]: too many recvbufs allocated
(40)

confronting with the downtimes as reported from
<http://www.pool.ntp.org/scores/81.208.58.150>
none of these seems a justification.

>  There are issues with OpenNTPd and I believe it does not support
> mode 6 packets which is required to run ntpq against it. In addition
> it is notan NTP server but an SNTP server.

It's a SNTPv4 + NTPv3 server.
>From <http://www.openbsd.org/cgi-bin/man.cgi?query=ntpd:>

"ntpd can also act as an NTP server itself, redistributing the local
time. It implements the Simple Network Time Protocol version 4, as
described in RFC 2030, and the Network Time Protocol version 3, as
described inRFC 1305."

Reading from
<http://sunsite.ualberta.ca/Documentation/Misc/ntp-4.0.99a/release.htm>
 the major additions of NTPv4 wrt NTPv3 involve only advanced features
(autokey authentication, 64bit, multi/many cast) that are pretty
uselessin the ntp pool. 

I'd say the major concerns in pool are accuracy and
compatibility/availability. I see that NTPv4 clients understand NTPv3
reponses, so openntpd would be in service for new clients. Moreover,
from real data this is how myserver responds

ntpdc 81.208.58.150
ntpdc> sysstats
current version:        4612
previous version:       36810

This is what a popular stratum 1 server reports:
ntpdc ntp2.inrim.it
ntpdc> sysstats
current version:        137699
previous version:       196733

This makes me think the the vast majority of clients are still NTPv3
orless, and NTPv4 is shyly more popular among servers.

For the accuracy, it might be interesting to try replacing ntpd with
openntpd and see how the accuracy graph from the pool system looks
like.

bye

-- 
I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo




More information about the questions mailing list