ntpd fails to synchronize on FreeBSD 6.3-STABLE

Pongthep Kulkrisada ptkrisada at gmail.com
Wed Feb 27 14:58:38 UTC 2008


> This isn't enough time.  Please try this instead.
> 
> # /etc/rc.d/ntpd stop
> # /etc/rc.d/ntpdate start
> 
> This should set your clock, even if only by a few milliseconds.
> Assuming the ntpdate part is successful, continue on:
> 
> # tcpdump -l -n -s 8192 -p "port 123"
> 
> Now, in another window, execute:
> 
> # /etc/rc.d/ntpd start
> 
> Then let the tcpdump go for about 15 minutes.  You aren't using the
> "iburst" feature on any of the servers, so it will take some time before
> they try to sync up.
Alright, here is the output.

Script started on Wed Feb 27 20:46:19 2008
root at bsdhost:~#	/etc/rc.c/ntpd stop
Stopping ntpd.
root at bsdhost:~#	/etc/rc.d/ntpdate start
Setting date via ntp.
27 Feb 20:46:53 ntpdate[2000]: no server suitable for synchronization found
root at bsdhost:~#	tcpdump -l -n -s 8192 -p "port 123"
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on fxp0, link-type EN10MB (Ethernet), capture size 8192 bytes
20:51:46.149541 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
20:51:47.149369 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
20:51:48.149192 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
20:52:50.148777 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
20:52:50.148818 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
20:52:54.149147 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
20:53:53.149127 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
20:53:56.148700 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
20:53:57.149545 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
20:54:56.149586 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
20:55:02.149701 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
20:55:02.149749 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
20:56:00.148838 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
20:56:05.149070 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
20:56:07.148751 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
20:57:06.148789 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
20:57:11.148992 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
20:57:13.148718 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
20:58:10.149016 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
20:58:17.148954 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
20:58:17.148997 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
20:59:14.149296 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
20:59:22.149048 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
20:59:23.148886 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
21:00:19.149376 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
21:00:26.149309 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
21:00:29.148856 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
21:01:23.149634 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
21:01:30.149579 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
21:01:33.149117 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
21:02:29.149586 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
21:02:35.148637 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
21:02:37.149400 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
21:03:32.149004 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
21:03:40.148796 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
21:03:41.149618 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
21:04:35.149397 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
21:04:45.148898 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
21:04:46.148714 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
21:05:39.149665 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
21:05:50.148985 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
21:05:50.149032 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
21:06:44.148776 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
21:06:54.149246 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
21:06:56.148916 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
21:07:49.148879 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
21:07:58.149478 IP 192.168.1.10.123 > 133.243.238.163.123: NTPv4, Client, length 48
21:08:00.149183 IP 192.168.1.10.123 > 122.154.11.67.123: NTPv4, Client, length 48
21:09:56.149530 IP 192.168.1.10.123 > 202.73.37.27.123: NTPv4, Client, length 48
^C
49 packets captured
230 packets received by filter
0 packets dropped by kernel
root at bsdhost:~#	^D

Script done on Wed Feb 27 21:10:30 2008

I also run ``/etc/rc.d/ntpd start'' on another root console right after tcpdump. Note that I appended the following lines in /etc/rc.conf and reboot prior to running ``/etc/rc.d/ntpdate start''.

# grep ntpdate /etc/rc.conf
ntpdate_enable="YES"
ntpdate_flags="-b time.navy.mi.th asia.pool.ntp.org ntp.nict.jp"

These 3 NTP servers are the same as ones in /etc/ntp.conf.
And same as ones in my other machine running MS Windows.
On my Windows machine behind NAT, I can always get sync with these servers.
And on my FreeBSD dial-up connection, I can also get sync with these servers.
But ntpdate and ntpd just don't work for the ``machine behind NAT''.
Even firewall on machine and router are disabled.
There must be something wrong, I don't know.

Please also noted that my clock is drifted but less than 1000secs, for sure.
It should not be a problem for ntpd. ...referred to ntpd(8)

> > Man pages over there are all FreeBSD 6.2.
> > But some timestamps dated Feb 13, 2008; but footer is still FreeBSD 6.2
> 
> I can confirm this on my RELENG_6 box (using 6.3).  I wouldn't worry
> about the footer saying 6.2.
OK, thanks. I will not worry it either.

> The procedure is documented in /usr/src/Makefile, and you should really
> follow that.  I haven't read the Handbook's documentation on what to do,
> but the above seems awfully extensive for something that is described in
> the Makefile (which I have used since the days of 4.x without issue).
Noted, thanks.

> I can't help you with anything relating to updating doc-all or your
> /usr/doc tree.  I'm not familiar with that, sorry.
No problems, actually it is not necessary.

Thanks,
Pongthep


More information about the freebsd-stable mailing list