Introduction and analysis of NTP clock source (GPS time source)


Introduction and analysis of NTP clock source (GPS time source)

Introduction and analysis of NTP clock source (GPS time source)

For more information, please refer to




1. Time synchronization process:

By default, the client will use its connected domain control as the clock source, and the domain control will synchronize the time from the authoritative clock source in the forest. If no domain control is specified as the authoritative clock source, the domain control with PDC role will act as the authoritative clock server.

There are two ways for authoritative clock source to obtain time: one is the hardware clock installed in the intranet, and the other is the external clock server. If none is configured, PDC will use its own internal clock.


2. Query command

W32tm / query / source – query clock source


W32tm / query / status query time service status


W32tm / query / configuration – query the current configuration information


Use NC tool to check whether port 123 of clock source is open, as shown in the following figure, the prompt is open

nc.exe -vuz 123


3. Manually specify clock source

w32tm /config /update /manualpeerlist: /syncfromflags:manual /reliable:yes

After completing the command, you need to restart the service with the command: net stop w32tm & & Net start w32tm


W32tm / resync / nowait ා resynchronize the clock, unequal synchronization, and directly return the result


4. Corresponding registry description

Path: HKEY_ LOCAL_ MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Parameters


Type Description:

Nosync: indicates that the client has no synchronization time

NTP: indicates that the client synchronizes the time from an external time source, and the ntpserver field defines the time source

Nt5ds: indicates that the client is configured to use the domain architecture as its own time synchronization

Allsync: indicates that the client will synchronize time from any reliable time source, including domain structure and external time source.

Note: the default value is nt5ds on domain control, and NTP on independent client or server.

5. Debug log function

Open debug: w32tm / debug / enable/ file:c :\w32 time.log / size:10000000 /entries :300

(the generated debug log is in C: \ W32 time.log , the maximum value of circular logging is 10m, and the type range of logging is 0-300300, indicating that all information is recorded.)


Close debug: w32tm / debug / disable

(turn off debug logging)