Re: [chrony-users] Reference ID

2016-05-30 Thread Bryan Christianson

> On 30/05/2016, at 7:22 PM, Miroslav Lichvar  wrote:
> 
> On Sat, May 28, 2016 at 10:17:31AM +1200, Bryan Christianson wrote:
>> 
>> 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.
> 
I like the MAC-style format too. Even without IPv6 we have the ambiguity 
associated with reference clocks
e.g.
Reference ID: 83.79.67.75 (SOCK)

Maybe for chrony 2.5 (I think its probably too late for 2.4) the chronyc 
tracking display should carry a warning that the first field is not an IP 
address and that the format will change in the future. The change could then be 
made in chrony 2.6.

Bryan Christianson
br...@whatroute.net




--
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.



Re: [chrony-users] Reference ID

2016-05-30 Thread Miroslav Lichvar
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
https://datatracker.ietf.org/doc/draft-stenn-ntp-ipv6-refid-hash/?include_text=1

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-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.



Re: [chrony-users] Reference ID

2016-05-30 Thread Bill Unruh





Maybe for chrony 2.5 (I think its probably too late for 2.4) the chronyc 
tracking display should carry a warning that the first field is not an IP 
address and that the format will change in the future. The change could then be 
made in chrony 2.6.


Do you really want an extra paragraph of bumf in the tracking output, each and
every time you use tracking? This kind of thing belongs in the documentation
(I know, most never read it, but making each command carry its own
documentation as output each time it is run is not a solution.)





--
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.

Trouble?  Email listmas...@chrony.tuxfamily.org.