Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2008 07:08:52 -0800
From:      Jeremy Chadwick <koitsu@freebsd.org>
To:        freebsd-stable@freebsd.org
Subject:   Re: ntpd fails to synchronize on FreeBSD 6.3-STABLE
Message-ID:  <20080227150852.GA98989@eos.sc1.parodius.com>
In-Reply-To: <20080227145828.GA2091@gmail.com>
References:  <20080227110137.C14251065670@hub.freebsd.org> <20080227145828.GA2091@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 27, 2008 at 09:58:28PM +0700, Pongthep Kulkrisada wrote:
> root@bsdhost:~#	/etc/rc.d/ntpdate start
> Setting date via ntp.
> 27 Feb 20:46:53 ntpdate[2000]: no server suitable for synchronization found
> root@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

You're not getting responses back from __any__ of those NTP servers.  If
you have a firewall *in front* of your BSD box (meaning a separate box,
not ipfw/ipfilter/pf on the same BSD box!), then this is likely the
cause of the problem.

If not, there's two explanations:

* Your uplink provider is filtering incoming packets destined to your
  network on port 123.
* If you're using NAT on this BSD box, somehow your NAT rules are
  broken, or you're doing something bizarre with network interfaces.

The point here is that you should be seeing NTP responses destined to
192.168.1.10 (which is obviously a NAT'd IP -- again, I don't know where
or how you're doing the NAT), but you're not.

That explains why ntpdate and ntpd both are not working for you.

You also confirm this by stating that you're able to talk to NTP servers
if you use a dial-up connection on the same box, so it really sounds
like you have a NAT problem and not an NTP problem.

-- 
| 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 |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080227150852.GA98989>