[ntp:hackers] Ghetto mode and broadcast/multicast
David L. Mills
mills at udel.edu
Sat Oct 1 21:30:12 UTC 2005
Ghetto mode is designed to obsolete the local clock driver as ultimate
backup. The contraption operates as usual unless the tos ghetto
<stratum> command is used, where <stratum> is something less than 16, 5
recommended. In use a number of machines on a broadcast/multicast
capable network are configured with cookie-cutter
broadcast 22.214.171.124 key 4
tos ghetto 5
One or more base servers are configured in addition for a reference
clock and/or external NTP server. Light the match and all other machines
will find the base server(s) and light up associations as expected.
If all base servers or there sources fail, all machies enter ghetto
mode. The stratum is forced to the ghetto stratum and the machines
synchronize among themselves. They run an election algorithm previously
seeded by a random nonce at startup. The remaining machines can fail in
any combination and the rest of the rascals will continue in the ghetto.
When an outside source is recovered, all machines exit ghetto mode and
resume regular operation.
In a note to Harlan I suggested the ghetto residents receive all other
ghetto broadcasts and average using the combining algorithm. This didn't
work very well, as the averagers tended to do a random-walk number.
Better to elect a leader and each follow the other. This required a
small change to the unfit() routine which finds and disables direct
neighbor timing loops by comparing the reference ID in the packet with
the local address. This detects direct loops, but not indirect ones,
where one machine discovers another machine is synchronized to the same
server. Now, both direct and indirect loops are detected and avoided.
I have tested the ghetto in broadcast mode, but only if the
broadcastclient command preceeds the broadcast command. At the moment,
multicast doesn't work at all, but that might be cockpit trouble.
The fun questino is whether this works in large networks where
disconnected cliques can form and especially when the clustering
algorith casts off a considerable fraction of the ghetto residents.
More information about the hackers