|
Preliminary note: Besides the problem described below, a reason for NTP synchronisation problems may be a firewall or port filter that is blocking the ports the programs use to communicate (by default UDP port 123).
Some versions of the w32time service, especially those who are coming with Windows XP,
or Windows Server 2003, may be (by default) unable to query the time from
some NTP servers. Depending on the type of the Windows PC (eg. standalone server or domain controller), NTP servers may not respond to
the type of queries sent by w32time. This is due to the type of request
packets.
This problem has not been observed with the w32time version which has
been shipped with Windows 2000. Also, the w32tm commands mentioned below
can not be used under Windows 2000 since the basic functions of the
w32tm utility have been changed for Windows versions after Windows 2000.
NTP supports several different packet types. Normally, (S)NTP clients
send "client" mode request packets to a NTP server responding with a
"server" mode packet. In the case mentioned above, the w32time service
sends "symmetric active" instead of "client" mode packets to a NTP server. This type of
packets has been implemented to support NTP's peering feature.
Peering means that a pool of computers ("peers") with "good" clocks have been
configured to synchronize their clocks among each others, in order to
agree on a common "network time", which then can be supplied to their
clients. If a peer sends a "symmetric active" packet, it is willing to modify the NTP server's time. Of course the NTP server should not accept such requests from a "normal" client.
A standard NTP server ignores such packets, unless it has
been explicitely configured to do so, and the sender can be
authenticated as a configured peer. Recent versions of NTP have a build-in
workaround which lets it send a reply, though, but don't really accept
the w32time service as peer.
Using some commands in a command line window, the behaviour of w32time
can be changed so that w32time sends the correct "client" mode request
packets. The changes are saved permanently in the Windows registry:
w32tm /config /manualpeerlist:,0x8 /syncfromflags:MANUAL
Of course, the actual IP address of the NTP server or its host name must
be entered instead of .
The flag "0x8" forces w32time not to send "symmetric active" packets but
normal "client" requests which the NTP server replies to as usual.
Then following command can be used to immediately make the changes effective:
w32tm /config /update
Alternatively, the w32time service can be restarted:
net stop w32time
net start w32time
The command
net time /querysntp
can be used to check the configuration. The output should look similar
to the line below:
The current SNTP value is: ,0x8
If the w32time service is restarted it sends immediately a request to
the NTP server. Additionally, the command
w32tm /resync
can be used to let w32time send a request. |