{"id":17507,"date":"2022-07-06T14:27:52","date_gmt":"2022-07-06T04:27:52","guid":{"rendered":"https:\/\/stepglobal.com\/?page_id=17507"},"modified":"2023-08-08T16:37:16","modified_gmt":"2023-08-08T06:37:16","slug":"precision-time-protocol-ptp-and-network-time-protocol-ntp-explained","status":"publish","type":"page","link":"https:\/\/stepglobal.com\/precision-time\/precision-time-protocol-ptp-and-network-time-protocol-ntp-explained\/","title":{"rendered":"Precision Time Protocol (PTP) and Network Time Protocol (NTP) Explained"},"content":{"rendered":"

Precision Time Protocol (PTP) and Network Time Protocol (NTP) Explained<\/h1>\n

Time synchronization is critical within any communication or control network. This is especially important in digital high-speed networks such as mobile phone and broadcast TV. If devices are not synchronized within your network, loss or corruption of your message data can occur. In electricity networks, precise synchronisation is critical for the deployment and control of Smart Grids. For financial transactions (even when accessing your internet bank account on your smartphone) time synchronization down to the nano-second level is critical for security, but even commercial and industrial organizations are starting to push for synchronization accuracy in the micro-second range.<\/p>\n

The most common source of network time synchronization for internet connected devices is to use one of the public services such as pool.ntp.org<\/span>, or your internet service provider will have their own NTP source. The time accuracy from these services is fine when you only need time accuracy in the order of a second. The problem with using these services for precise timing is that the public time source has to travel through switches, routers, and other network gear that all add a tenth of a second and that multiplies several times over. If you have two locations that are 100 kilometres apart and you are using the same time reference from a source located at one site, the time difference at the other site could be up to a second behind.<\/p>\n

Of even greater concern is synchronizing different clients within the same network. Imagine a financial institution that has exactly 100 shares of Company X’s stock. Big news breaks concerning Company X, and the financial institution sells those 100 shares not to just one investor but several over the span of a second, but because the institution’s servers aren’t synchronized with one another, there is no way to tell which buy order came first.<\/p>\n

The most secure and precise method for network time synchronization is using a local GNSS (Global Navigation Satellite System) time server as your master network clock. The time source from the GNSS network is highly accurate atomic clocks based in the satellites and synchronized with even more accurate ground stations. A GNSS based network time server provides you a Stratum 1 time source within your internal network that will be reliable, and unlike a public time server, is not impacted if the internet goes down.  Up until a couple of years ago the standard network time protocol was NTP, but with much higher speeds on networks today then you have to decide whether NTP will meet the requirements, if not then you need to go to PTP. So how do you decide which protocol is right for you.<\/p>\n

NTP Servers<\/h2>\n

NTP servers can synchronize clocks and other local network devices within microsecond accuracy, which suits most business and industrial needs for time serving accuracy.<\/p>\n

NTP, or Network Time Protocol, has a hierarchical system with different layers called strata. Stratum 0 devices at the very top include atomic clocks, like those in GNSS satellites.<\/p>\n

Stratum 1, or primary time servers, each have a one-on-one direct connection with a Stratum 0 clock, achieve microsecond-level synchronization with the Stratum 0 clocks, and connect to other Stratum 1 servers for quick sanity tests and data backup. Stratum 2 servers can connect to multiple primary time servers for tighter synchronization and improved accuracy, and so on and so forth. NTP supports up to a maximum of 15 strata, but every stratum slightly decreases client synchronization from Stratum 0.<\/p>\n

A 64-bit timestamp as currently implemented is split up into two equal 32-bit parts:<\/p>\n