page_title: Precision Time Protocol
section_title: Synchronization
hierarchical_section_title: Precision Time Protocol / Synchronization
caption_attribution_description: English: IEEE1588 communication mechanism
context_page_description: The Precision Time Protocol is a protocol used to synchronize clocks throughout a computer network. On a local area network, it achieves clock accuracy in the sub-microsecond range, making it suitable for measurement and control systems. PTP is currently employed to synchronize financial transactions, mobile phone tower transmissions, sub-sea acoustic arrays, and networks that require precise timing but lack access to satellite navigation signals.
  The original version of PTP, IEEE 1588-2002, was published in 2002. IEEE 1588-2008, also known as PTP Version 2 is not backward compatible with the original 2002 version. IEEE 1588-2019 was published in November 2019 and includes backward-compatible improvements to the 2008 publication. IEEE 1588-2008 includes a profile concept defining PTP operating parameters and options. Several profiles have been defined for applications including telecommunications, electric power distribution and audiovisual. IEEE 802.1AS is an adaptation of PTP for use with Audio Video Bridging and Time-Sensitive Networking.
context_section_description: Through use of the BMC algorithm, PTP selects a master source of time for an IEEE 1588 domain and for each network segment in the domain.
  Clocks determine the offset between themselves and their master. Let the variable  represent physical time. For a given slave device, the offset  at time  is defined by:
  where  represents the time measured by the slave clock at physical time , and  represents the time measured by the master clock at physical time .
  The master periodically broadcasts the current time as a message to the other clocks. Under IEEE 1588-2002 broadcasts are up to once per second. Under IEEE 1588-2008, up to 10 per second are permitted.
  Each broadcast begins at time  with a Sync message sent by the master to all the clocks in the domain. A clock receiving this message takes note of the local time  when this message is received.
  The master may subsequently send a multicast Follow_Up with accurate  timestamp. Not all masters have the ability to present an accurate timestamp in the Sync message. It is only after the transmission is complete that they are able to retrieve an accurate timestamp for the Sync transmission from their network hardware. Masters with this limitation use the Follow_Up message to convey . Masters with PTP capabilities built into their network hardware are able to present an accurate timestamp in the Sync message and do not need to send Follow_Up messages.
  In order to accurately synchronize to their master, clocks must individually determine the network transit time of the Sync messages. The transit time is determined indirectly by measuring round-trip time from each clock to its master. The clocks initiate an exchange with their master designed to measure the transit time . The exchange begins with a clock sending a Delay_Req message at time  to the master. The master receives and timestamps the Delay_Req at time  and responds with a Delay_Resp message. The master includes the timestamp  in the Delay_Resp message.
  Through these exchanges a clock learns , ,  and .
  If  is the transit time for the Sync message, and  is the constant offset between master and slave clocks, then
  Combining the above two equations, we find that
  The clock now knows the offset  during this transaction and can correct itself by this amount to bring it into agreement with their master.
  One assumption is that this exchange of messages happens over a period of time so small that this offset can safely be considered constant over that period. Another assumption is that the transit time of a message going from the master to a slave is equal to the transit time of a message going from the slave to the master. Finally, it is assumed that both the master and slave can accurately measure the time they send or receive a message. The degree to which these assumptions hold true determines the accuracy of the clock at the slave device.
caption: IEEE 1588 synchronisation mechanism and delay calculation
exif: {}