Uploaded image for project: 'Precision Time Protocol'
  1. Precision Time Protocol
  2. PSPTP-125

PTP BMC selects lower-quality Grandmaster due to inverted dataset comparison in IEEE 1588 BMCA implementation

    Details

    • Account:
      SPC TCP_IP (SPCTCPIP)

      Description

      In the current PTP implementation, the Best Master Clock Algorithm selects a Grandmaster with worse Announce dataset values although another Grandmaster with better priority values is present in the same PTP domain.

      Observed behavior:
      A netX device selected a Grandmaster whose Announce messages contained worse dataset values, for example priority1 = 248, priority2 = 248 and clockAccuracy = Unknown, instead of another available Grandmaster with lower priority1 and priority2 values. The behavior was reproducible over time and the selected Grandmaster could switch temporarily after parameter changes, but later fall back to the lower-quality clock.

      Root cause:
      The dataset comparison in the BMCA implementation was inverted for the case of different Grandmaster identities. Larger values of priority1, clockClass, clockAccuracy, offsetScaledLogVariance and priority2 were treated as better, although IEEE 1588 requires the better dataset to win, which means lower priority values and better clock quality values must be preferred. In addition, the tie-break comparison for identical Grandmasters used an incorrect sourcePortIdentity comparison.

      Impact:
      The netX may prefer the wrong Grandmaster although the Announce datasets clearly indicate a better candidate. This can lead to unstable or non-compliant Grandmaster selection.

      Expected behavior:
      Grandmaster selection must follow IEEE 1588 BMCA dataset comparison rules and must not depend on source subnet. Only the configured PTP domain and the Announce dataset attributes should influence the master selection.

        Attachments

        1. ptp_bmc_behavior_test.py
          39 kB
          Kai Michel
        2. ptp_test.log
          9 kB
          Kai Michel
        3. ptp_test.pcapng
          61 kB
          Kai Michel

          Issue Links

            Expenses

              Activity

                Status Description

                  People

                  • Reporter:
                    KMichel Kai Michel
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    0 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved: