1. Make sure that the two hosts are in the same network segment and can ping each other. (Change the server type to NTP. To do this, follow these steps: a. Click Start, click Run, type regedit, and then click OK ".
B. Locate and click the following registry subitem:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ W32Time \ Parameters \ Type
C. In the right pane, right-click "Type" and click "modify ".
D. in the edit Value Field, type NTP in the value data box, and click OK ". Some machines do not need to do this step)
2. Set the server, start the menu, and enter the regedit command to open the registry.
3. Modify the keys of the following options
Set Enabled in HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ W32Time \ TimeProviders \ NtpServer to 1 to enable the NTP server function. (NTP Server is disabled by default, unless the computer is upgraded to a domain control site)
4. Modify the following key values
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ W32Time \ Config \ AnnounceFlags is set to 5, which forces the host to declare itself as a reliable time source, the built-in Complementary Metal Oxide Semiconductor (CMOS) clock is used. This setting forces the host to declare itself as a reliable time source, using a built-in Complementary Metal Oxide Semiconductor (CMOS) clock. If you want to use an external time server, use the default a value.
5. Run the following command on the doscommand line to restart the Win32Time service. Make sure the preceding modification takes effect.
Net stop w32time
Net start w32time
Others: if the server is connected to the internet, it is recommended to append the following configuration to avoid ntp synchronization between the server and the internet:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ W32Time \ TimeProviders \ NtpClient's enable is set to 0 to prevent the client from automatically synchronizing external time Services
Client configuration (Run --> regedit ):
1. Modify HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ W32Time \ TimeProviders \
NtpClientSpecialPollInterval value is modified to decimal 43200 (unit: Second, 43200 is 12 hours, this value is the update interval)
SpecialPollTimeRemaining value is changed to [time synchronization server], 0 for example: 192.168.1.1, 0 for ntp server address
2. Modify the default Update Server
HKEY_LoCAL_MACHINE \ SOFTWARE \ MICROSOFT \ WINDOWS \ CURRENTVERSION \ DATETIME \ SERVERS \ default
3. Restart the Win32Time service: net stop w32Time & net start w32Time
A valid NTP server address is attached: ntp.sjtu.edu.cn 202.120.2.101 (address of the NTP server in the Network Center of Shanghai Jiao Tong University) (210.72.145.44 (IP address of the National Time Service Center Server)