BMCA

Best Master Clock Algorithm

Other →
Introduced in Rel-16

BMCA is the distributed algorithm used in 5G networks to select the most accurate and reliable timing source from multiple available sources to ensure critical network-wide synchronization.

Category
Other
Introduced
Rel-16
Where
Core Network › 5G Core
Specifications
2 specs
BMCA Description Purpose Detected Changes Specifications

Description

The Best Master Clock Algorithm (BMCA) is a core component of the Precision Time Protocol (PTP) framework, specifically defined within IEEE 1588, and is adopted and specified by 3GPP for use in 5G System (5GS) architectures to achieve precise network synchronization. Its primary function is to dynamically and autonomously determine the single best timing reference, known as the Grandmaster Clock, within a network of multiple potential clock sources. This selection process is continuous and distributed, meaning each node (or clock) in the PTP domain runs the algorithm independently based on received timing messages, ensuring a consistent and stable hierarchy without requiring centralized configuration for master selection.

The algorithm operates by having each clock port (which can be in a master, slave, or passive state) exchange specific PTP messages, primarily Announce messages. These Announce messages carry critical data used for the decision-making process, organized in a data set. The key comparison parameters, evaluated in a strict hierarchical order, are: 1) Priority1 (a configurable administrator-set value), 2) Clock Class (indicating the traceability and quality of the clock, e.g., to a primary reference time clock (PRTC)), 3) Clock Accuracy, 4) Clock Variance (Allan Variance, indicating short-term stability), 5) Priority2 (a second-level configurable value), and 6) the Clock's Unique Identifier (typically its MAC address). The BMCA performs a side-by-side comparison of these datasets—its own and those received from other clocks—following this priority order. The clock with the 'better' dataset (e.g., lower Priority1, higher Clock Class) wins the comparison at each step. The port that determines it has the best data set becomes the master port, while others become slaves to it. Ports that are neither the best master nor a slave to the best master enter a passive state to prevent timing loops.

Within the 3GPP 5G architecture, BMCA's role is crucial for distributing a common phase and time reference across the Radio Access Network (RAN), particularly for features like Coordinated Multipoint (CoMP) and New Radio (NR) TDD operations. The 5G system can utilize multiple time sources, such as Global Navigation Satellite System (GNSS) at a gNB, or a timing flow from the core network via the User Plane Function (UPF). The Transport Network (TN) between gNBs and between gNB and UPF also runs PTP with BMCA. Therefore, BMCA operates at multiple layers: within the TN's timing distribution network to select the Grandmaster, and within the 5GS to manage which timing source (e.g., gNB with GNSS vs. core network timing) is selected as the master for a particular timing domain. Its robust and deterministic selection process ensures that if a superior clock source (like a directly connected GNSS receiver) becomes available, it will automatically take precedence over a downstream or less accurate source, maintaining optimal synchronization quality.

The implementation and requirements for BMCA in 5G are detailed in 3GPP specifications, particularly TS 23.501 for system architecture principles and TS 33.851 for security aspects of timing synchronization. Security is a significant concern, as a malicious actor could spoof Announce messages to manipulate the BMCA outcome, causing the network to synchronize to an incorrect or malicious time source, leading to service disruption. Therefore, 3GPP mandates the use of the MACsec-based PTP security mechanism defined in IEEE 1588, which includes integrity protection and replay protection for PTP messages, to secure the BMCA decision process against such attacks.

Purpose & Motivation

BMCA exists to solve the fundamental problem of establishing and maintaining a single, authoritative, and high-quality time reference in a distributed packet network with multiple potential timing sources. Prior to standardized algorithms like BMCA, network synchronization often relied on hierarchical master-slave configurations that were manually provisioned (e.g., using SyncE for frequency only) or on external systems like GNSS at every node. Manual configuration is inflexible, error-prone, and does not adapt to network failures or the introduction of better clocks. Relying solely on GNSS at every site is costly, has physical installation limitations, and is vulnerable to jamming and spoofing attacks.

The creation and adoption of BMCA within IEEE 1588 and subsequently 3GPP were motivated by the need for automated, reliable, and precise phase/time synchronization over packet-switched networks to support new generation services. 4G LTE-Advanced began requiring tight phase alignment for features like eICIC and CoMP. 5G NR, with its use of higher frequencies, massive MIMO, and stringent TDD configurations, demands even more precise synchronization (often on the order of hundreds of nanoseconds). Furthermore, the convergence of 5G with industrial and mission-critical applications, encapsulated in concepts like Integration with Time-Sensitive Networking (TSN) and support for Ultra-Reliable Low-Latency Communications (URLLC), makes robust, fault-tolerant, and secure timing distribution a non-negotiable network primitive.

BMCA addresses the limitations of previous approaches by providing a fully distributed, state machine-based algorithm. It automates the critical process of master clock selection, enabling self-forming timing hierarchies. This allows the network to dynamically adapt to topology changes, clock failures, or the introduction of a new, higher-quality clock source without manual intervention. This autonomy is essential for operational robustness and scalability in large, complex 5G deployments, including non-public networks (NPNs) and network slicing scenarios where different slices may have different synchronization requirements. It forms the intelligent control plane for PTP, ensuring that the physically best available clock always governs the synchronization domain.

Detected Changes Across Releases

from 3GPP Change Requests

Specific changes extracted from the „Change history“ tables of 3GPP specifications (13 CRs across 3 releases). Complements the general historical overview above with the evidence-based evolution of this function.

Rel-16 3 changes

In Release 16, the BMCA function was enhanced to introduce **5GS BMCA support and PTP port state configuration** for managing PTP instances within the 5G system. This allows the 5GS to operate as a Boundary Clock, determining the grandmaster PTP instance and the time-synchronization spanning tree via the BMCA procedure. Furthermore, support was added for using the **5G internal system clock** as a time reference for timestamping gPTP event messages at the DS-TT.

  • TSC Burst Arrival Time usage and Clock Reference TS 23.501CR1423
  • Clarifying TSCAI based on TSN clock used by PSFP gate operation TS 23.501CR2067
  • 5GS BMCA support and PTP port state configuration TS 23.501CR2405
Rel-17 9 changes

In Release 17, the enhancements for the BMCA function specifically supported the 5GS operating as an IEEE 1588 Boundary Clock, allowing it to participate in the PTP Best Master Clock Algorithm. This included updates to handle PTP within the time synchronization service and introduced support for the exemption where the originTimestamp does not require updating with the syncEventEgressTimestamp when synchronized to an external Grandmaster. Furthermore, the release defined mechanisms for mapping timing information between the TSN Grandmaster clock and the 5GS clock.

  • Support for PTP in time synchronization service and BMCA TS 23.501CR2668
  • Support for IEEE 1588 Boundary Clocks in time synchronization service TS 23.501CR2690
  • Update for PTP in time synchronization service and BMCA TS 23.501CR2773
  • Link delay measurement for the end-to-end Transparent Clock TS 23.501CR3260
  • Update the correction field for the end-to-end Transparent Clock TS 23.501CR3386
  • Mapping TSCAI between TSN GM clock and 5GS clock TS 23.501CR3414

+ 3 more changes

Rel-18 1 change

In Release 18, the BMCA function was enhanced to include a clock status indication from the RAN to the TSCTSF. This allows the RAN to inform the network's Time Synchronization Client Function about the quality or stability of its internal clock, which is traceable to a common time reference. The specific criteria and algorithms for determining when this status is suitable and stable to send are vendor-specific.

  • Clock status indication from RAN to TSCTSF TS 23.501CR5344

Explore further

Broader topics and technologies where BMCA plays a role.

Defining Specifications

3GPP specifications that define or reference BMCA, with the latest known release. Sourced from the 3GPP document catalog — see methodology.

SpecificationTitleRelease
TS 23.501 vk00 5G System Architecture Stage 2 Rel-20
TR 33.851 vh10 Security for Industrial IoT in 5G Rel-17