[ntp:questions] NTP over redundant peer links, undetected loops

Dave Hart davehart at gmail.com
Sun Feb 15 19:13:21 UTC 2009

On Feb 15, 6:23 pm, ma... at ntp.org (Danny Mayer) wrote:
> Dave Hart wrote:
> > Why play roulette if you have a globally unique IPv4 address to use as
> > a refid?  Since IPv6 addresses are hashed down to 32 bits if used as a
> > refid, again, IPv4 global addresses if available are better unique
> > identifiers.
> Because I want to get away from the notion that these are meant to be IP
> addresses.

Well, hash it.  As long as your hash is good, it the result should be
as unique as the non-rfc1918, non-multicast, non-loopback IPv4
address.  It breaks ntptrace and yes I know ntptrace is broken for
IPv6 as well.  Looking at the loop detection functionality, a hashed
unique IPv4 address is good as is the unmangled address.  Since
there's a small installed base using IPv4 addresses now (and hashed
IPv6), it might not be a good idea to change horses midstream.

> In addition in an IPv6-only environment that wouldn't work
> either.

I have no idea why preferring any non-RFC1918 IPv4 address over any
RFC1918 IPv4 address when selecting a refid would have any impact
whatsoever in an IPv6-only environment, where today and presumably
tomorrow your 32-bit refid would derive from one of your more unique
IPv6 addresses.

> Why create work when it's unnecessary just to find a valid IP
> address?

Maybe it's not worth doing anything special about widely-shared
private IPv4 addresses.  If loop detection is all that matters, who
cares about a few false positives?  Nowhere near as harmful as false

> In addition with anycast addresses are not globally unique.

Anycast is worse than useless for NTP.  Non-issue.

> The
> chances that you will create a non-unique random number within a network
> is extremely low.

nodes in network times one in two billion, or one in four billion,
assuming a perfect PRNG.  But why gamble?  Global IPv4 addresses work
today and are more than unique enough.  Same with IPv6 addresses using
a consistent hash.  RFC1918 addresses, as I said, at worst lead to
false positive loop detection and therefore reduce the server choice
for the victim, not exactly the kind of thing that causes riots either

Dave Hart

More information about the questions mailing list