ntpd as broadcastclient - not working?

Danny Mayer mayer at gis.net
Tue Aug 31 10:50:36 PDT 2004


At 11:15 PM 8/30/2004, W. D. wrote:
>Hi Danny,
>
>Reply below...
>
>At 19:02 8/30/2004, Danny Mayer wrote:
> >At 07:13 PM 8/30/2004, W. D. wrote:
> >>30 Aug 21:50:05 ntpd[88]: logging to file /var/log/ntpd.log
> >>30 Aug 21:50:05 ntpd[88]: ntpd 4.2.0a at 1.1219-o Mon Aug 30 14:14:07 GMT
> >>2004 (1)
> >>30 Aug 21:50:05 ntpd[88]: precision = 4.191 usec
> >>30 Aug 21:50:05 ntpd[88]: Listening on interface dc0,
> >>fe80:1::2a0:ccff:fe50:e7c7#123
> >>30 Aug 21:50:05 ntpd[88]: Listening on interface dc0, 192.168.2.177#123
> >>30 Aug 21:50:05 ntpd[88]: Listening on interface lo0, ::1#123
> >>30 Aug 21:50:05 ntpd[88]: Listening on interface lo0, fe80:3::1#123
> >>30 Aug 21:50:05 ntpd[88]: Listening on interface lo0, 127.0.0.1#123
> >>30 Aug 21:50:05 ntpd[88]: kernel time sync status 2040
> >>30 Aug 21:50:05 ntpd[88]: frequency initialized 0.000 PPM from
> >>/etc/ntp.drift
> >>30 Aug 21:50:05 ntpd[88]: Unable to listen for broadcasts, no broadcast
> >>interfaces available
> >
> >What does ifconfig -a tell you?
>
>
>dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         inet6 fe80::2a0:ccff:fe50:e7c7%dc0 prefixlen 64 scopeid 0x1
>         inet 192.168.2.177 netmask 0xffffff00 broadcast 192.168.2.255
>         ether 00:a0:cc:50:e7:c7
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
>lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
>lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
>         inet6 ::1 prefixlen 128
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
>         inet 127.0.0.1 netmask 0xff000000
>ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
>sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
>faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
>

That means the broadcast flag is set for the dc0 interface for IP address 
192.168.2.177.
You appear to be missing the following patch to libisc/ifiter_ioctl.c:

http://ntp.bkbits.net:8080/ntp-dev/diffs/libisc/ifiter_ioctl.c@1.15?nav=index.html|src/.|src/libisc|hist/libisc/ifiter_ioctl.c

Basically you are missing the following:


         if ((lifreq.lifr_flags & IFF_BROADCAST) != 0) {
                 iter->current.flags |= INTERFACE_F_BROADCAST;
         }

That should have been the latest ntp-dev tarball. Otherwise please add it 
and rebuild.

> >
> >Danny
> >
> >>The Windows computer generating the Tardis NTP broadcasts is
> >>at IP address: 192.168.2.119.  Does anyone have any idea
> >>why it's not picking up these broadcasts?
> >
> >Also, that's not a broadcast address as I recall.
>
>It's the internal, NAT address, that my DHCP server/router
>assigned to the Windows box that is sending out NTP
>broadcast signals on port 123.


That doesn't really matter. What address is it broadcasting on?

Danny



More information about the freebsd-questions mailing list