When should NTPd broadcast/broadcastclient be used instead of client/server or peer modes

ntp

The NTP deamon if often used in its simplest mode, which is client/server: you specify one or more server directives in your ntp.conf and your clients will use those servers.

In addition to that, when you run your own NTP servers, it is good practice to peer them together, so if one of them looses connectivity to its upstream servers, it will get time from its peers.

But NTPd can also work with broadcast and/or multicast distribution of time data, with the documentation stating:

broadcast and multicast modes are intended for configurations
involving one or a few servers and a possibly very large client
population

The documentation also says elsewhere:

It is possible and frequently useful to configure a host as both
broadcast client and broadcast server. A number of hosts configured
this way and sharing a common broadcast address will automatically
organize themselves in an optimum configuration based on stratum and
synchronization distance.

I can see one obvious administrative benefit: you don't have to manually specify and update your list of NTP servers in the clients ntp.conf, so to me it looks tempting to use broadcast mode even for a small client population (say 5+ clients with 3~4 servers). I expect network traffic to be a little higher with broadcasts instead of client/server associations, but given the usual gigabit ethernet LAN the impact should be negligible unless you have a very very large number of hosts in the same broadcast domain.

At the end of the day, when should broadcast mode be used or avoided? Are there pros and cons I haven't seen?

Best Answer

No, the broadcast client mode is not supported on most OSes. The broadcast and multicast modes are inherently less accurate and less secure (even with authentication) than the ordinary server/client mode and they are not as useful as they used to be.

If you're adamant about this, you can soldier on...

Linux OS supports broadcast/manycast/multicast, but it imposes a CPU overhead by the virtue of putting older Ethernet NIC and its interface in promiscuous mode (by reading in all packets including packets intended for other hosts).

MacOSX (now macos) can support multicast NTP, but no support is given for it. You can use the following command to enable it:

sudo route -nv add -net 228.0.0.4 -interface en0

Microsoft Windows Time service does not support multicast/broadcast on Windows 2000 Server , Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, much less any of the Windows desktop variants. It used to support multicast NTP (K9 from www.mingham-smith.com/k9.htm provides multicast NTP for Windows 3.1, 95, 98, ME, NT, 2000, XP, 2003, Windows Mobile 2003).

Related Topic