Changes between Version 1 and Version 2 of RefIDChanges


Ignore:
Timestamp:
09/06/15 08:54:39 (7 years ago)
Author:
stenn@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RefIDChanges

    v1 v2  
    33There are several problems with around `refid`s in the current RFC.
    44
    5 * The decision to use an IPv4 address was convenient and is no longer useful
    6   * S2+ `refid`s are being used as IPs for tracing
     5* The decision to use an IPv4 address was convenient and is no longer useful:
     6  * S2+ `refid`s are being used as IPs for tracing.
    77  * S2+ IPv6 `refid`s are colliding with valid IPv4 addresses
     8* The concept of a "time loop" is not well-defined.  From the document, it's clear that the timing loop being detected is one involving (only) 2 machines.
     9* The specification was written when computers generally only had 1 IP address.
    810
    911It doesn't help that the stock `ntpq -p` output shows the `refid` as an IPv4 address and does not display the association ID.  That will be changing soon:
    1012* http://bugs.ntp.org/2778
    1113* http://bugs.ntp.org/278
     14
     15The proposal is comprised of two parts.  One is a change to the `refid` value for IPv6 addresses, and the other goes to a recommended way of selecting a `refid` that will identify the current host.
     16
     17To select an IP to be used as the basis for a host's `refid`:
     18
     19* load any list of "do-not-use IPs"
     20* Scan the list of "up" IPs, ignoring any in the "do-not-use" list
     21
     22Call the IPs we have found "list A".
     23
     24If a mechanism exists to identify when there is a change to an interface, repeat the above steps, saving the results in "list B".
     25
     26For each IP in "list A", see if that IP is in "list B".  If it is not, remove the IP from "list A".
     27
     28For each IP in "list B", see if that IP is in "list A".  If it is not, add the IP to the end of "list A".
     29
     30Assign the first entry in "list A" to `candidate_IP`.
     31
     32For each of the remaining IPs in "list A", see if the new IP is "more routable" than the `candidate_IP`.  If it is, remember it as the new `candidate_IP`.
     33
     34The following list shows how "routable" an IP is.
     35
     36For IPv4 addresses, the following list goes from least to most routable:
     37* an address in 127.0.0.0/8
     38* an address in RFC1918 space
     39* any other address
     40
     41For IPv6 addresses, the following list goes from least to most routable:
     42* a localhost address
     43* an interface-local address
     44* …
     45* Unicast addresses
     46
     47If the `candidate_IP` is an IPv4 address, use that value for the `refid`.
     48
     49If the `candidate_IP` is an IPv6 address:
     50* Generate an `md5` hash of the address
     51* set the `refid` to (0xF0000000. 0xF0000000, or 0xFF000000)
     52* get the high-order 32 bits of the hash.
     53* AND these 32 bits with (0x0FFFFFFF, 0x07FFFFFF, or 0x00FFFFFF)
     54* OR this result with the `refid`.
     55