Bodet-Time
  • Home
  • Resources
  • Blog
  • What is the BMCA algorithm in the PTP protocol?
Qu’est-ce que l’algorithme BMCA dans PTP ?

There are many protocols available to synchronise clocks within a network infrastructure. The most widely used are NTP and SNTP, but when the highest possible level of accuracy is required, the PTP protocol (Precision Time Protocol) is chosen.

PTP has been introduced in 2002 via the IEEE 1588 standard which has known many evolutions since (the last version of the standard dates back to 2019).

One of PTP’s most important algorithmic building blocks is the BMCA (Best Master Clock Algorithm). BMCA enables to determine which clock, among those available on the network, will provide the time reference for the entire infrastructure.

How does the BMCA algorithm work?

BMCA is a distributed leader selection algorithm. Its aim is to create a Grandmaster clock, which is a specific clock that will serve as a time reference for all the others.

To do so, all clocks participate in a selection process in order to identify which one has the best time reference. This quality is assessed according to various criteria, including:

  • A priority level defined by the user, who can bypass the algorithm by setting manually the Grandmaster Clock.
  • The clock class. This is a digital criteria which enables characterisation of the level of quality and accuracy of the clock. For example, a server directly connected to a reference clock (atomic or GPS clock) will be in class 6. The smaller the class value, the higher the priority of the clock in selecting the reference clock. The possible values range from 6 to 255, with 248 being the default value.
  • The accuracy of the clock (in nanoseconds).
  • The clock’s stability. This indicator describes the ability to maintain accurate time on a given period of time.
  • A unique identifier, such as the MAC address of the network card. It is used to distinguish between clocks that have the same characteristics.

The clock defined as reference clock will be the one with the best quality, that is to say, the one that have the best criteria according to the below mechanism:

Comparison of attributes in the ascending order

Once the reference clock has been selected, its information is broadcast across the network, thus enabling each clock to synchronise with it.

When does BMCA become active?

The selection algorithm will be active upon network startup. But it is not the only moment when the BMCA algorithm is used.

Indeed, BMCA is also active when the reference clock breaks down (outage, loss of synchronisation with its time source, and so on).

Besides, the network continuously reevaluates the state of the reference clock using the BMCA, which enables it to make sure that it remains the best time source. In practice, the reference clock is the one taking this role by broadcasting messages containing its own characteristics continuously. When a clock has better characteristics, it starts broadcasting them in order to “challenge” the reference clock and become the new reference clock.

What is the role of alternative BMCAs?

The BMCA algorithm standardised in the IEEE 1588 standard can be adapted to define different characteristics for choosing the reference clock.

For example, it is possible to create a BMCA favouring stability over time rather than immediate accuracy, or a variant that provides more robustness to failures (especially for networks subject to numerous breakdowns).

The PTP protocol along with the BMCA algorithm is used in many applications where synchronisation is paramount. To meet the specific needs of professions and enable system interoperability, a profile can define the settings and options suitable for the accuracy and stability required.

Applications

BMCA is used in many sectors requiring an accurate and synchronised time, including:

The transport sector: to maintain security and efficiency of operations, the signalling and traffic management systems require the implementation of the following profiles:

  • IEEE 1588v2 default profile
  • IEEE 1588v1 default profile

Telecommunications: to ensure consistent transmission of information, to minimise latency and optimise the quality of services, the ITU study groups defined the following Telecom profiles:

  • ITU-T G.8265.1 frequency profile
  • ITU-T G.8275.1 time/phase profile
  • ITU-T G.8275.2 time/phase profile

Energy sector: to effectively coordinate and supervise energy production, distribution and consumption, the IEEE and IEC standard institutions defined the following profiles:

  • C37.238 :2011 power profile
  • C37.238 :2017 power profile
  • IEC 61850 9-3 utility profile

Broadcast: to ensure the accuracy of audio and video signals, radio broadcasting and live broadcasting industries rely on accurate synchronisation of devices. In that case, it is recommended to use the following profiles:

  • ST 2059-2:2021 SMPTE profile
  • AES67 media profile

Industry: to achieve high-output automated manufacturing and consistent management of production data, time synchronisation is paramount. The profile used is as follows:

  • IEEE802.1AS TSN profile (Time Sensitive Network)

With more than 150 years of expertise in time management and present in more than 140 countries, Bodet Time is a major French leader in time synchronisation and time frequency. The Netsilon PTP clocks provide a secure reference time recognised in the air and rail transport sector, as well as in the healthcare and the industry sector.

Contact us

Share the article