Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Apr 2001 15:56:04 -0700
From:      steve@Watt.COM (Steve Watt)
To:        stable@freebsd.org
Subject:   NTP odd?
Message-ID:  <200104272256.f3RMu4X77734@wattres.Watt.COM>

next in thread | raw e-mail | index | archive | help
I'm running a 4.3-RC2 (17 apr) system as the NTP server for our subnet,
and have it set up as a broadcast server thusly:

 - - - obscured snip from /etc/ntp.conf - - -
server	xxxxxxx.xxxx.xxx
server	xxxxxxx.xxxx.xxx
server	xxxxxxx.xxxx.xxx
server	xxxxxxx.xxxx.xxx

peer xxxx.com
peer xxxx.com

driftfile /var/db/ntp.drift

broadcast 192.168.1.255
 - - - >8 end snip - - -

And I've got a 4.3-STABLE (26 Apr) client trying to listen to the
broadcasts, but it fails with "bad protocol 5" at every packet:

 - - - 8< - - -
# ntpd -b -p /var/run/ntpd.pid -f /var/db/ntp.drift -d -d -d -d
create_sockets(123)
interface <xl0> OK
[ much interface <blah> removed ]
bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=1
flags for fd 4: 06
bind() fd 5, family 2, port 123, addr 192.168.1.22, flags=1
flags for fd 5: 06
bind() fd 6, family 2, port 123, addr 127.0.0.1, flags=0
flags for fd 6: 06
create_sockets: ninterfaces=3
interface 0:  fd=4,  bfd=0,  name=wildcard,  flags=0x1
              sin=0.0.0.0  bcast=0.0.0.0,  mask=255.255.255.255
interface 1:  fd=5,  bfd=0,  name=xl0,  flags=0x1
              sin=192.168.1.22  bcast=192.168.1.255,  mask=255.255.255.0
interface 2:  fd=6,  bfd=0,  name=lo0,  flags=0x4
              sin=127.0.0.1  mask=255.0.0.0
init_io: maxactivefd 6
loop_config: state 2 freq 37.671
authtrust: keyid 0000ffff life 1
report_event: system event 'event_restart' (0x01) status 'sync_alarm, sync_unspec, 1 event, event_unspec' (0xc010)
auth_agekeys: at 1 keys 1 expired 0
expire_all: at 1
key expire: at 1  next 65536
input_handler: fd=7 length 48 from c0a8012d 192.168.1.45
receive: at 56 192.168.1.45 restrict 00
receive: at 56 192.168.1.45 mode 5 code 5
receive: bad protocol 5
auth_agekeys: at 60 keys 1 expired 0
^C
# 

 - - - >8 - - -

I'm confused in two ways:
1.  The input_handler says fd=7, even though that doesn't appear in
    the bind() output.
2.  What's with the bad protocol?  I've tried setting the server to
    broadcast v3 and default (v4) packets, and I see the same error
    message (although a tcpdump reveals different version numbers).

Here's a tcpdump from the v3 one (in fact, the same packet that generated
the error message above):

 - - - 8< - - - tcpdump -n -v -v -v -s 512 port 123
tcpdump: listening on xl0
15:51:10.434095 192.168.1.45.123 > 192.168.1.255.ntp:  v3 bcast strat 2 poll 6 prec -20 dist 0.008255 disp 0.012405 ref clepsydra.dec.com@3197400613.448803007 orig 0.000000000 rec -0.000000000 xmt -1097566625.561255991 [tos 0x10]  (ttl 64, id 20702)
 - - - >8 - - - tcpdump -n -v -v -v -s 512 port 123

tcpdump seems to like the packet (mostly, I wonder about the xmt stamp),
but the client ntp doesn't.

Any clues?  I'm not sure when this last worked, since I last tried
it in the 2.2.8 timeframe (and it was fine back then).

-- 
Steve Watt KD6GGD  PP-ASEL-IA          ICBM: 121W 56' 57.8" / 37N 20' 14.9"
 Internet: steve @ Watt.COM                         Whois: SW32
   Free time?  There's no such thing.  It just comes in varying prices...

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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