Re: [chrony-users] Reference ID

[ Thread Index | Date Index | More Archives ]

On Sat, May 28, 2016 at 10:17:31AM +1200, Bryan Christianson wrote:
> >>> This has been argued in the past. The refid is 4 bytes, so it cannot fit in
> >>> the whole IPv6 address. And it really is not worth expanding the size of the
> >>> refid. For refclocks it is a four character name (translate the bytes to
> >>> ascii-- eg PPS0, SHM3...). I am not sure what the algorithm is for ipv6 (last
> >>> 4 bytes in the addreess.) I really do not think it is worth Lichvar's time to
> >>> rewrite the refid to be 12 bytes say, with all the potential for hidden bugs
> >>> introduced by change.  It is not supposed to be an address. It is supposed to
> >>> be just a unique id to differentiate the various sources.
> >> 
> >> Sure - I understand not wanting to change the length. That’s why I suggested using an address from one of the IPv4 reserved ranges rather than presenting some random collection of 4 bytes as an IP address.

There is actually a proposal for that

I don't like it for two reasons:
- it's an incompatible change in NTPv4, which may create problems
  between hosts using different definition, e.g. in the detection of
  synchronization loops or selection of orphan sources
- it prevents collisions between IPv4 and IPv6 addresses, but the
  space for IPv6 addresses is now reduced to 24 bits, making
  collisions between IPv6 addresses even more likely

This was discussed several times on the NTP WG list. I'm not sure if I
was able to convince anyone and if the draft won't be accepted.

> As you say it is just an ID and I guess the whole IPv4 representation is an artefact of the early days of NTP.
> Maybe it could just be displayed as 8 hex digits.

I think that would be the best solution. I was considering to use
the MAC-style format AB:CD:EF:GH. But I'm worried it will break
scripts that either incorrectly parse the field as an IP address or
rely on the refid to be in the quad-dotted format.

If someone needs the second field on the "Reference ID" line to be an
address instead of hostname, chronyc has the -n option for that. Maybe
this should be mentioned in the FAQ.

Miroslav Lichvar

To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.

Mail converted by MHonArc 2.6.19+