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

Harlan Stenn stenn at ntp.org
Thu Apr 3 17:55:58 UTC 2014

Martin Burnicki writes:
> Harlan Stenn schrieb:
> > Sander Smeenk writes:
> >> Quoting Miroslav Lichvar (mlichvar at redhat.com):
> >>> For IPv6 addresses the refid is defined as first 4 bytes of the MD5
> >>> sum of the address. With 2001:7b8:3:32:213:136:0:252 (tt52.ripe.net)
> >>> that is 0xac023551, or in the quad-dotted notation.
> >>
> >> Miroslav, you're right. This is it. Thanks.
> >>
> >> I consider this a bug.
> >
> > As do we all.  And we can fix it as soon as a decent solution appears.
> Maybe just print the refid as hex bytes instead of dotted quads unless 
> it's interpreted as string?

Printing 32 bits of information in dotted-quad format takes 15

Printing 128 bits of information in base64 takes 22 characters.

I think we're going to need another way, and one way I'm seeing to do
this would be to use an internal opaque value (could be a simple
counter) to identify the source and display that value.  We'd then need
a way to query ntpd to say "what address is associated with the value".

I'm also going to take a look to see if we have a spare bit or two, and
use that information to say "IPv4 or IPv6" (if we have one spare bit),
or "REFID, IPv4, or IPv6" if we have two.

This doesn't fully solve the display problem, but it gets us a step


More information about the questions mailing list