Advantages of NTP
NTP uses a stratum to describe the clock precision, and is able to synchronize time among all
devices within the network.
NTP supports access control and MD5 authentication.
NTP can unicast, multicast or broadcast protocol messages.
How NTP Works
shows the basic workflow of NTP. Device A and Device B are interconnected over a network.
They have their own independent system clocks, which need to be automatically synchronized through
NTP. For an easy understanding, we assume that:
Prior to system clock synchronization between Device A and Device B, the clock of Device A is set
to 10:00:00 am while that of Device B is set to 11:00:00 am.
Device B is used as the NTP time server, namely, Device A synchronizes its clock to that of Device
It takes 1 second for an NTP message to travel from one device to the other.
Figure 1-1 Basic work flow of NTP
NTP message received at 10:00:03 am
The process of system clock synchronization is as follows:
Device A sends Device B an NTP message, which is timestamped when it leaves Device A. The
time stamp is 10:00:00 am (T1).
When this NTP message arrives at Device B, it is timestamped by Device B. The timestamp is
11:00:01 am (T2).
When the NTP message leaves Device B, Device B timestamps it. The timestamp is 11:00:02 am
When Device A receives the NTP message, the local time of Device A is 10:00:03 am (T4).