The Precision Time Protocol (PTP) 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 was originally defined in the IEEE 1588-2002 standard, officially entitled "Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems" and published in 2002. In 2008, IEEE 1588-2008 was released as a revised standard; also known as PTP Version 2, it improves accuracy, precision and robustness but is not backward compatible with the original 2002 version.
"IEEE 1588 is designed to fill a niche not well served by either of the two dominant protocols, NTP and GPS. IEEE 1588 is designed for local systems requiring accuracies beyond those attainable using NTP. It is also designed for applications that cannot bear the cost of a GPS receiver at each node, or for which GPS signals are inaccessible.
The Precision Time Protocol (PTP), defined in IEEE standard 1588, enables precise synchronization of device clocks in packet based networks. Devices are automatically synchronized to the most accurate clock in the network. The protocol supports system wide synchronization accuracy, usually in the sub microsecond range, with minimal network and local clock computing resources. The protocol is used in applications such as test and measurement, power-line management, industrial automation and telecoms.
PTP accuracy is based on an assumption that the delay in Ethernet is approximately constant and symmetric. The protocol is a master-slave type and it includes a Best Master Clock selection algorithm that organizes the clocks in the network to form a tree-like structure: master clocks use the BMC algorithm to determine whether they should remain master clocks, or follow some better master. Non-master clocks use the BMC algorithm to determine which master clock to follow, or whether to become master clocks themselves. A few different types of clock exist:
A master clock typically has an external clock source connected to it, or it has a very accurate internal time reference, for example an atomic clock. A master clock is a source of time information for the PTP network.
A slave clock uses the PTP protocol to follow the time of its selected master clock.
A boundary clock is a clock that is located between two or more network segments. A boundary clock acts as a slave clock in one of the network segments, and as a master in the other segments. Boundary clocks forward the clock information from one network segment to another.
Transparent clocks forward clock information in the same way as boundary clocks, but they are not visible to the IP layer or to the PTP protocol. A transparent clock can , for example, be integrated into an Ethernet switch, so that the switch modifies PTP frames on-the-fly, minimizing the effect of its own packet queuing delays to the synchronization accuracy.
Version 2 of the IEEE1588 standard was released in 2008.