[ntp:questions] Three NTP servers, one strange IP-address in 'refid'

Harlan Stenn stenn at ntp.org
Mon Apr 7 08:47:48 UTC 2014


Martin Burnicki writes:
> Rob wrote:
> > When the NTP server puts an IPv6 hash in the refid field, it could set
> > the upper 4 bits to 1.  (so the hex value starts with F)
> > A valid IPv4 address never has that, so ntpq could print it in hex in
> > this case, and as a dotted quad in other cases.
> >
> > This also guarantees a hashed IPv6 can never collide with a valid IPv4
> > refid.  But at the same time, it shrinks the space of IPv6 hashes,
> > increasing the chance of a hash collision between two IPv6 addresses.
> 
> In my opinion this sounds reasonable. The danger of collision might be 
> slightly higher (less with IPv4, a little bit more with another IPv6 
> hash), but for users it would avoid confusing IPv4 addresses with IPv6 
> hashes.

I'm wondering if we have a spare bit somewhere that we could use to
indicate that the refid is an IPv6 hash and not an IPv4 address instead.
If so, great.  If not, I'd be happy with a bug report and a patch.  This
would also work for older ntpq instances talking to ntpd that does this
- it would simply print a dotted quad where the high-order number will
be at least 240.
-- 
Harlan Stenn <stenn at ntp.org>
http://networktimefoundation.org - be a member!


More information about the questions mailing list