[ntp:questions] what is refid in ntpq -pn

Harlan Stenn stenn at ntp.org
Tue May 9 07:35:22 UTC 2017


Steven Sommars writes:
> RFC5905   Reference ID (refid)
>    ...
>    If using the IPv4 address family, the identifier is the four-
>    octet IPv4 address.  If using the IPv6 address family, it is the
>    first four octets of the MD5 hash of the IPv6 address.
> 
> Has this been changed?
> 
> In any case the Refid field size, 4 bytes, is too small to contain an IPv6
> address.
> 
> On Sat, May 6, 2017 at 4:39 PM, David Woolley <
> david at ex.djwhome.demon.invalid> wrote:
> 
> > On 06/05/17 22:24, Hans Mayer wrote:
> >
> >
> >> I always thought "refid"  for command "ntpq -pn" shows the next upstream
> >> server for the remote server listed below "remote". But now I have my
> >> concerns.
> >>
> >>
> > Officially, it is an opaque 32 bit identifier for the selected upstream
> > peer of the peer.  You are not supposed to assume it has any more meaning,
> > even though, on pure IPv4 systems, it is derived in the way you describe.
> >
> > Note that the selected peer is not the only source of time; it is just the
> > one used for the quality parameters.

This discussion is about S2+ REFIDs.

The REFID value is different for S1 and S0.

The REFID for S2+ can take several value formats, with more choices
coming soon.

If you're trying to backtrace the timing chain, use 'ntpq -c apeers' and
then feed the association ID to: 

 ntpq -c 'rv XXXX'

to get the srcadr for that association.

-- 
Harlan Stenn <stenn at ntp.org>
http://networktimefoundation.org - be a member!


More information about the questions mailing list