Re: [chrony-users] Reference ID

2016-05-31 Thread Bryan Christianson

> On 30/05/2016, at 11:39 PM, Miroslav Lichvar  wrote:
> 
> On Mon, May 30, 2016 at 10:55:31PM +1200, Bryan Christianson wrote:
>> 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.
> 
> Is it safe to assume the warning message won't break some scripts?

:) I don’t think its ever safe to assume a change won’t break something for 
someone. When they re-align roads to prevent car accidents, there is always 
someone confused by the re-alignment who promptly has an accident. 

The warning could be displayed on stderr or with syslog. It could be a 3rd 
field on Reference ID but as you imply, there is always a risk that someone 
somewhere will be affected by a change.



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 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.



Re: [chrony-users] Reference ID

2016-05-28 Thread Bryan Christianson

> On 28/05/2016, at 10:08 AM, Bill Unruh  wrote:
> 
> 
> 
> William G. Unruh   |  Canadian Institute for| Tel: +1(604)822-3273
> Physics  | Advanced Research  | Fax: +1(604)822-5324
> UBC, Vancouver,BC  |   Program in Cosmology | un...@physics.ubc.ca
> Canada V6T 1Z1 |  and Gravity   |  www.theory.physics.ubc.ca/
> 
> On Sat, 28 May 2016, 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.
> 
> Not sure why that would help.
> It is a refid, not an address, in any case. Are you really liable to copy out
> that address and try to contact that machine?
> Where did you see the refid and get confused by it?
> 

I don’t have the specific case available, but when synchronised with and IPv4 
server I see the following

root@cora:~# chronyc tracking
Reference ID: 10.64.1.25 (fleur.lan.seaviewsound.co.nz)
Stratum : 2

The ‘normal’ interpretation of this kind of display would be IP address/host 
name.

In the case where the hostname resolves to an IPv6 address, you will some some 
random IPv4 address bearing no relation to the hostname displayed.

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.


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-28 Thread Bryan Christianson

> On 28/05/2016, at 9:56 AM, Bill Unruh  wrote:
> 
> On Sat, 28 May 2016, Bryan Christianson wrote:
> 
>> I recently installed an IPv6 network on my lan. When crony syncs to a server 
>> using IPv6 it extracts some bits from the IPv6 address of the server and 
>> then displays them in the Reference ID as an IPv4 address which bears no 
>> relationship to any host on my lan. I have seen similar issues with the 
>> translation of a reference clock ID to a pseudo IP address.
>> 
>> I’m wondering if in these cases it might night be better for chrony to use 
>> an IP address from one of the reserved IPv4 address ranges rather than 
>> synthesising what may well be a real IP belonging to some unrelated network.
> 
> 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.


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-27 Thread Bill Unruh

On Sat, 28 May 2016, Bryan Christianson wrote:


I recently installed an IPv6 network on my lan. When crony syncs to a server 
using IPv6 it extracts some bits from the IPv6 address of the server and then 
displays them in the Reference ID as an IPv4 address which bears no 
relationship to any host on my lan. I have seen similar issues with the 
translation of a reference clock ID to a pseudo IP address.

I’m wondering if in these cases it might night be better for chrony to use an 
IP address from one of the reserved IPv4 address ranges rather than 
synthesising what may well be a real IP belonging to some unrelated network.


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.





Just a thought.

Bryan