I. NTP Introduction
The NTP server, as its name implies, is a Network Time Protocol. Time Synchronization is essential for Scheduled backup, intrusion detection records, distributed task scheduling, and transaction order management.
NTP-level relational terms
NTP clocks are organized in a hierarchical model. Each layer in a hierarchy is called a stratum (hierarchy ). The stratum concept illustrates how many NTP hops a machine has from the authorized time source.
Stratum 0 is composed of clocks without time drift, such as atomic clock. This type of clock cannot be used directly on the network. Stratum n (n> 1) Layer servers synchronize time from stratum N-1 Layer servers. The stratum n clock can communicate with each other through the network.
NTP supports up to 15 stratum levels. Stratum 16 is considered to be not synchronized and cannot be used.
NTP level description
NTP server two, server a: NTP-A, satellite clock, stratum 1;
Server B: NTP-B, using ntpd service, update from local clock source, local clock source stratum is 5.
Corresponding configuration behavior:
1Server 127.127.1.02 3Fudge 127.127.1.0 stratum 5
One NTP client, client-C, uses the Windows XP operating system.
3.1 Synchronization Experiment after ntpd is started
Start the ntpd service on server B and set C to synchronize from server B. If synchronization fails, check the NTP data packet and find that the Statum value of the data packet sent by C is 0, the value of Statum returned by B is 0:
Several minutes later, the update time is updated again. Check the NTP data packet and check that the Statum value of the data packet sent by C is 0 and the Statum value of the data packet returned by B is 6, indicates the time when B successfully updates the local clock source. Because the Statum value of the local clock source is set to 5, stratum of B is set to 6.
3.2 synchronization experiments for different NTP services
C First synchronizes data from a, and then changes it to synchronize data from B. It is found that the synchronization is not successful.
C successfully synchronizes data from a and checks the NTP data packets. It finds that the NTP data packet stratum sent by C is 0, and the NTP data packet stratum returned by A to C is 1.
When C is set to update from B, the update fails. Check the data packet sent by C and find that stratum is 2. This is because C has just been successfully updated from a, and C is the next level of, set stratum to 2. Check the data packets returned by B and find that the stratum is 6, which is larger than the value of C (2). c thinks that the local time is more reliable than that of B, and the update is rejected. restart the "Windows Time" service on the C server and update it again. It is found that the stratum of C is reset to 0 and updated smoothly from the B server.
References: 65980897
001. NTP Introduction