Precision Time Protocol (PTP) is a protocol designed to go beyond what Network Time Protocol (NTP) can offer relative to accuracy. PTP is IEEE standard 1588 that can give local computing systems accuracy within the sub-microsecond range (such as microsecond, nanosecond or picoseconds) whereas NTP is within milliseconds or longer. PTP standard was first released in 2002 and known as 1588-2002. In 2008, the IEEE released a revised standard for PTP, known as 1588-2008, that improved the accuracy and precision of the protocol. It is also known as PTPv2 and is not backward compatible with the older version. PTP was developed for packet based network for control and measurement systems.
The primary use case for PTP that I’ve dealt with is in the power industry with smart grid power automation applications such as peak-hour billing, virtual power generators and outage monitoring and management; these applications require extremely precise time. Timing precision improves network monitoring accuracy, supportability and troubleshooting of the grid. Many of the changes done in the 2008 update were to accommodate the needs of the power industry but can useful with any application that requires precise timing.
PTP uses a lightweight packet structure that requires very little bandwidth to operate, and it’s important to note it uses a different structure for distributing time compared to NTP. Its intended use is over local area networks, such as Ethernet. IEEE 1588 defines a hierarchical master-member architecture for clock distribution. A typical configuration would have a Grandmaster clock as the ultimate time source, and the Master clocks would feed from the Grandmaster thereby acting as Members. From there, clocks on the individual segments (networks) would be Members and feed time from the Masters.
The Grandmaster is the primary time source for the hierarchy and will typically get time from a GPS or atomic clock. The Masters can also be known as a boundary clock, which is a clock source that has more than one network port. One or more ports receive timing on while one or more to send time out. The end client device, the Member to a Master, is known as an ordinary clock. That device will have only one network port to receive time. These are not typically a PC or workstation but could be industrial devices, sensors, relays, monitoring and metering systems. There is also a role of transparent clock, which is to update the time interval field within the PTP event messages. The updates compensate for any switches in the path and give the event messages accuracy within one picosecond.
PTP sends a message between the Master and Member device(s) to determine delay. PTP measures the exact time messages are transmitted and received. Then, it uses that information to determine the delay between the devices by averaging the path delay. The Member will then adjust the received time based on the calculated path delay. When a network has multiple Master clock sources, a mechanism selects the best Master; this mechanism is known as the Best Master Clock Algorithm. The Members will evaluate the quality, stability, and logical distance to the clock source.
PTP is a feature that can be configured on different vendor switches to act as either a boundary and/or transparent clock for the networks that they are attached to. It is supported in the Cisco Nexus product line of data center switches as well as those intended for the power industry and other IOS or IOS-XE based switches.
The requirement for time and accuracy will dictate which network timing protocol you will choose. If millisecond or longer is good enough, then use NTP. (For more information on NTP, see this related blog on Network Time Protocol.) If the need is a microsecond or less, then pick PTP.
Want to learn more? Check out these related courses: