[ntp:questions] ntpd as broadcast client not working

Tina tinac at intellambda.com
Mon Oct 25 03:12:08 UTC 2004


I have download the latest production NTP code from the following web
(Version 4.2.0).

I have setup a server ( which is synchronized to
external stratum (1 or 2) NTP servers.  And I want to use this
server( as a broadcast server, to synchronize other
machines on a subnet.

The server is running fine and indicates that it is synchronized to
the external server and the broadcast address is
indicated as a broadcast (^):

ntpdc> peer
     remote           local      st poll reach  delay   offset    disp
=LOCAL(0)       10   64  377 0.00000  0.000000
*    1  512  377 0.00948  0.000283
^         16   64    0 0.00000  0.000000

But I am having problem getting the ntpd running as a broadcast client
on the other machines.  It seems that the initial volley of eight
client/server cycle is somehow missing.  Below is the output of the
NTPD running as a broadcast client.  It seemed the first receive is
from the wrong interface:

(NOTE: I tried a previous version (NTP 4.1.1). It is parts of the
RedHat distribution, which running fine. I use the same configure

[root at pc28 ntpd]# ntpd -d -n
ntpd 4.2.0 at 1.1161-r Thu Oct  7 20:41:43 PDT 2004 (8)
addto_syslog: ntpd 4.2.0 at 1.1161-r Thu Oct  7 20:41:43 PDT 2004 (8)
addto_syslog: signal_no_reset: signal 13 had flags 4000000
addto_syslog: precision = 1.000 usec
addto_syslog: no IPv6 interfaces found
bind() fd 4, family 2, port 123, addr, flags=8
bind() fd 5, family 2, port 123, addr, flags=0
bind() fd 6, family 2, port 123, addr, flags=8
bind() fd 7, family 2, port 123, addr, flags=0
init_io: maxactivefd 7
local_clock: at 0 state 0
bind() fd 9, family 2, port 123, addr, flags=8
io_setbclient: Opened broadcast client on interface 2, socket: 9
io_setbclient: Opened broadcast clients
addto_syslog: frequency initialized 10.221 PPM from /etc/ntp/drift
local_clock: at 0 state 1
report_event: system event 'event_restart' (0x01) status 'sync_alarm,
sync_unspec, 1 event, event_unspec' (0xc010)
auth_agekeys: at 1 keys 2 expired 0
timer: refresh ts 0
receive: at 41<- mode 5 code 5 keyid
00000002 len 48 mac 20 auth 1
Finding addr in list of addresses
key_expire: at 41
peer_clear: at 41 assoc ID 26484 refid INIT
newpeer:> mode 3 vers 4 poll 6 10 flags
0x212 0x20 ttl 0 key 00000002
receive: at 41<- mode 5 code 6 keyid 00000002 len
48 mac 20 auth 1
peer event 'event_reach' (0x84) status 'unreach, auth, 1
event, event_reach' (0x6014)
auth_agekeys: at 60 keys 2 expired 0

Here is my server's configure file:

restrict default ignore 
restrict nomodify

server     # local clock
fudge stratum 10

driftfile /etc/ntp/drift
broadcastdelay  0.008

authenticate yes

keys            /etc/ntp/keys

broadcast key 2 ttl 8
trustedkey 2

Note: the content of /etc/ntp/keys
   2   M   pass 

And the ntp broadcast client machine has the following in its ntp.conf

enable auth
#restrict nomodify
broadcastdelay 0.00800
driftfile /etc/ntp/drift
keys      /etc/ntp/keys
trustedkey 2

Can anyone tell me if there is any problem with the configuration
files?  As I mentioned earlier, I am able to run a different version
of ntpd as broadcast client, but have problem with the 4.2.0 version.

Is there a bug in the code where it sets up the interfaces?

Thank you in advance,


More information about the questions mailing list