IEEE 1588 PTP v1 and v2
- Home
- >
- PTP/IEEE-1588 Solutions
Our Solutions
PTP Synchronization Basics
The protocol defines synchronization messages used between a Master and Slave clock similar to the Server and Client mode used in the Network Time Protocol (NTP).
The Master is the provider of time, and the Slave synchronizes to the Master. A Grandmaster is a Master that is synchronized to a time reference such as GPS.
Messages in the protocol include Master sync message, Master delay response message, and the Slave clock delay request messages.
In addition to the messages, the Best Master Clock (BMC) algorithm allows multiple Masters to negotiate the best clock for the network.
Clock synchronization on the LAN requires at least one Master and one Slave. Multiple Slaves can synchronize to a single Master.

The Master clock provides synchronization messages that the Slaves use to correct their local clocks. Precise timestamps are captured at the Master and Slave clocks. These timestamps are used to determine the network latency which is required to synchronize the Slave to the Master.
There is a sync message transmitted typically every two seconds from the Master, and a delay request message from the Slave less frequently, about one request per minute.
How it works
Four timestamps are captured between the Master and Slave clock. The timestamps are required for the Slave offset calculation. The timestamps are commonly referred to as T1, T2, T3, and T4.
Two delay paths must be calculated, the Master to Slave and the Slave to Master.
First find the Master to Slave difference:
- The first timestamp is T1. It is the precise time of the sync message from the Master. This timestamp is sent in the follow-up message since the time of T1 was sampled when the sync message was transmitted on the Ethernet port.
- The second timestamp is T2. It is the precise time of the sync message as it is received at the Slave.
- The Master to Slave difference can be calculated once T1 and T2 are available at the Slave.
- Master to Slave difference = T2 - T1
Second, find the Slave to Master difference:
- The third timestamp is T3. It is the precise time of the delay request message from the Slave. The fourth timestamp is T4. It is the precise time of the delay request message when received at the Master.
- The Slave to Master difference can be calculated once T3 and T4 are available at the Slave.
- Slave to Master difference = T4 - T3

The one-way delay can be calculated once the Master to Slave and Slave to Master difference is available at the Slave:
- One way delay = (Master to Slave difference + Slave to Master difference) / 2
The offset is used to correct the Slave clock:
Offset = Master to Slave difference – One way delay
or
Offset = ((T2 – T1) – (T4 – T3)) / 2
Therefore, the following statements are true with respect to this algorithm, assuming constant network propagation delays and gradually changing operating conditions such as temperature:
The Slave clock utilizes the offset to adjust the time to agree with the Master clock. Typically, the Slave clock will use a clock tuning algorithm that can account for network propagation delays affecting the offset and the Slave clock crystal temperature and aging effect on its stability.