Hi all.
I am trying to set-up an environment where I broadcast the time to clients.
It seems that the ntp server do broadcast to the local network. With a
network monitor I can see the broadcast packets from this server.
The NTP client does receive the broadcast packets - but does not use them.
I ntp_protoc.c I can trace that some packet are discarded in following code:
/*
* Discard broadcast packets received on the wildcard
interface
* or if not enabled as broadcast client.
*/
if (PKT_MODE(pkt->li_vn_mode) == MODE_BROADCAST &&
(rbufp->dstadr == any_interface || !sys_bclient))
return;
Anyone know what I are doing wrong?. I have attached some debug information
from the client. See later in this mail.
Here is the server setup/information
System Slackware Linux 2.2.19
Ip-adr 10.10.22.30 subnetmask 255.255.255.0
ntp.conf from the server
server 192.38.7.240 minpoll 4
driftfile /etc/drift
broadcast 10.10.22.255
Client setup/information
System Windows XP
Id-adr 10.10.22.26 subnetmask 255.255.255.0
Ntp.conf
Broadcastclient
Here is debug output from the client
D:\temp\v4\ntp-4.1.1\ports\winnt\ntpd\Debug>ntpd -dddd
create_sockets(123)
bind() fd 1812, family 2, port 123, addr 0.0.0.0, flags=1
bind() fd 1804, family 2, port 123, addr 10.10.22.26, flags=0
bind() fd 1796, family 2, port 123, addr 127.0.0.1, flags=0
create_sockets: ninterfaces=3
interface 0: fd=1812, bfd=0, name=wildcard, flags=0x1
sin=0.0.0.0 bcast=0.0.0.0, mask=255.255.255.255
interface 1: fd=1804, bfd=0, name=, flags=0x0
sin=10.10.22.26 mask=255.255.255.0
interface 2: fd=1796, bfd=0, name=, flags=0x0
init_io: maxactivefd 1812
authtrust: keyid 0000ffff life 1
report_event: system event 'event_restart' (0x01) status 'sync_alarm,
sync_unspe
c, 1 event, event_unspec' (0xc010)
auth_agekeys: at 1 keys 1 expired 0
expire_all: at 1
key expire: at 1 next 65536
Received 48 bytes from 10.10.22.30:123
Received 48 bytes from 10.10.22.30:123
IoEvent occurred
receive: at 43 10.10.22.26<-10.10.22.30 restrict 00
receive: at 43 10.10.22.26<-10.10.22.30 mode 5 code 5
receive: at 43 0.0.0.0<-10.10.22.30 restrict 00 *** This packet
is discarded
Thanks
Sarbjit Singh
|