ntpd as broadcastclient - not working?

Danny Mayer mayer at gis.net
Sat Sep 4 19:10:12 PDT 2004

At 04:59 AM 9/3/2004, W. D. wrote:
>Well folks,
>I got it working--sorta.

You message shows that you are not running broadcast.

>This page has to have the date stuff on
>the left side edited out: http://tinyurl.com/72c69
>The result is then substituted for /libisc/ifiter_ioctl.c, and
>then the whole thing is rebuilt.

More properly you could just have used the latest version of the tarball
that you had.

>The time only seems to be set if I use in /etc/ntp.conf:
>   rather than:

This is illegal. There are no additional parameters to broadcastclient.
except for novolley. If you didn't get an error message about that then
that's a bug.

>Also, Tardis must be set to send NTP broadcasts
>to the FreeBSD box's IP address:

Again that's not a broadcast address. That's the IP address of that one
machine.  The address you put in broadcastclient is what should have
been put into the tardis configuration.

>Here is the output from ifconfig -a:
>         inet6 fe80::2a0:ccff:fe50:e7c7%dc0 prefixlen 64 scopeid 0x1
>         inet netmask 0xffffff00 broadcast
>         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 netmask 0xff000000
>ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
>sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
>faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
>Here is what is logged in ntpd.log:
>  3 Sep 03:29:32 ntpd[88]: logging to file /var/log/ntpd.log
>  3 Sep 03:29:32 ntpd[88]: ntpd 4.2.0a at 1.1220-o Thu Sep  2 21:37:09 GMT
>2004 (1)
>  3 Sep 03:29:32 ntpd[88]: precision = 4.191 usec
>  3 Sep 03:29:32 ntpd[88]: Listening on interface dc0,
>  3 Sep 03:29:32 ntpd[88]: Listening on interface dc0,
>  3 Sep 03:29:32 ntpd[88]: Listening on interface lo0, ::1#123
>  3 Sep 03:29:32 ntpd[88]: Listening on interface lo0, fe80:3::1#123
>  3 Sep 03:29:32 ntpd[88]: Listening on interface lo0,
>  3 Sep 03:29:32 ntpd[88]: kernel time sync status 2040
>  3 Sep 03:29:32 ntpd[88]: frequency initialized -0.094 PPM from
>  3 Sep 03:29:32 ntpd[88]: Unable to listen for broadcasts, no broadcast
>interfaces available

This shows that you are not getting any broadcasts since it can't configure
a socket for broadcast. So you don't have the fix in place.

>  3 Sep 03:29:41 ntpd[88]: synchronized to, stratum 2
>  3 Sep 03:29:34 ntpd[88]: time reset -6.102537 s
>  3 Sep 03:29:34 ntpd[88]: kernel time sync disabled 2041
>  3 Sep 03:29:42 ntpd[88]: synchronized to, stratum 2
>  3 Sep 03:29:52 ntpd[88]: kernel time sync enabled 2001
>  3 Sep 03:30:15 ntpd[88]: no servers reachable

This tells you that it's not getting any packets from any server you listed
in ntp.conf.

>Here is the output from ntpdc> monlist:
>remote address          port local address      count m ver code avgint
>localhost               1041 ::1                    5 7 2      0
>34       0
>            123        132 5 3      0
>3       3

Which is not broadcast.

>How can I get the FreeBSD box to listen on

I told you repeatedly.

>How would I know when it hears an NTP broadcast?

You would see it in the log that it's enabled for broadcast.
ntpq -p should show it.

>Does ntpd adjust for drift against the realtime clock, and
>then use this if the broadcasts stop for some reason?

If nothing is available it just leaves things where they are.

>Any other glaring errors here?

Too many. See above.


More information about the freebsd-questions mailing list