Set to NTP client:
Configure Time Synchronization for Windows Server 2003:
1. Set the synchronization interval
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ w32time \ timeproviders \ ntpclient
Edit the specialpollinterval key value and switch it to decimal. The default value is in seconds. The unit is 604800, which is 7 (days) × 24 (hours) × 60 (minutes) × 60 (seconds)
2. Set the IP address of the NTP server:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ w32time \ timeproviders \ ntpserver
Create a new string value named ntpserver. Set the value to the IP address of the NTP server, and add ", 0x1" to the end when using the IP address. Separate multiple addresses with spaces.
3. Start NTP client
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ w32time \ timeproviders \ ntpclient
Edit the enable key value and set it to 1.
4. net stop w32time & Net start w32time
========================================================== ====
Set to NTP server:
Because Windows Server 2003 works as an NTP client by default, you must modify the Registry to run the system as an NTP server.
1. Set "enabled" in HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ w32time \ timeproviders \ ntpserver to 1 to enable the NTP server function.
2. modify the key value HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ w32time \ config \ announceflags to set it 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.
3. net stop w32time & Net start w32time
If the server is connected to the Internet, you are advised 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