Best Master Clock Discriminator

Enhanced PTP User Guide (UG1602)

Document ID
UG1602
Release Date
2023-04-07
Revision
1.1 English

sfptpd (version 3.3.0.1007 onwards) provides an option to disqualify PTP master clocks which advertise a time differing by more than a specified threshold from a selected timesource.

A PTP slave can disqualify a master clock based on the received timestamp in the following messages:

  • SYNC message (in the case of 1-step synchronization)
  • FOLLOWUP message (in the case of 2-step synchronization)

When a master clock is disqualified it is excluded from the synchronization process and is removed from the sfptpd foreign master records until such time it reports time offset values below the threshold value.

This feature is primarily designed to use NTP as the discriminator against multiple master clocks within the same PTP domain.

To use NTP as the discriminator, configure both PTP and NTP sync_modules in the sfptpd config file.

Set the NTP sync_module priority lower than the PTP priority to ensure that NTP is used as the discriminator, but not selected ahead of any PTP clock as the synchronizing timesource.

Usage

bmc_discriminator <clock> <threshold>
  • <clock> can be a sync instance name or clock name.
  • <threshold> is a millisecond value.

Example Configuration File

Note: This example contains only parameters to demonstrate the bmc_discriminator feature using NTP as the discriminator. Refer to example configuration files for other parameters.
[general]
sync_module ptp ptp1 ptp2
sync_module ntp ntp1
[ptp1]
ptp_mode slave
ptp_domain 101
priority 10
[ptp2]
ptp_mode slave
ptp_domain 101
priority 20
[ptp]
interface eth1
bmc_discriminator ntp1 1
[ntp1]
ntp_key 8 bmctest
priority 255
Note: The server system clock or a NIC clock could be selected as the <clock> discriminator, but these are untested scenarios.