Automatic Selection

Enhanced PTP User Guide (UG1602)

Document ID
UG1602
Release Date
2022-10-18
Revision
1.0 English

By default, sfptpd automatically selects the time source to use. The set of all configured sync instances represents a list of candidates available for selection.

A sync instance in the SLAVE state is considered before another instance in the LISTENING state.

A candidate is automatically selected using the following criteria, in descending order of priority:

  1. State

    A sync instance in the SLAVE state is considered before another in the LISTENING state.

  2. No Alarms

    A sync instance having no PTP alarms present is considered before others where alarms are active.

  3. Instance priority

    The value of the priority configuration option for the instance. Smaller values have higher priority. By default, all instances have priority 128, and so this criterion is ignored.

    Note: This is not related to the IEEE-1588 specification priority 1 and priority 2 properties of a PTP master clock.
  4. Clock class

    Locked clocks are considered ahead those which are in holdover or are free-running.

  5. Accuracy

    This is the sum of:

    1. Clock accuracy

      Estimate of error between clock and primary reference source.

    2. Sync module accuracy

      Estimate of error implied by the synchronization mechanism that would be used to sync to the remote clock, such as NTP with software timestamping vs. PTP with hardware timestamping.

  6. Allan variance

    Estimate of stability of clock.

  7. Identity of clock

    If all other comparisons fail, the identity of the clock is used as a tie-breaker.

The source of the clock class and accuracy varies:

  • For the PTP sync module, the clock class and clock accuracy are values conveyed in PTP messages from the upstream PTP master clock.
  • For the PPS sync module, the clock class and clock accuracy have default values but can also be set by the user.
  • For the NTP sync module, the clock class and clock accuracy come from the remote clock.
  • For the Freerun sync module, the clock class and clock accuracy use default values.