Stand-alone XP or 2000 SNTP or NTP server for Windows CE devices

V

Vic

I'm trying to support a closed network where a bunch of Windows CE devices
query a specified PC in order to periodically synchronize their time. I
don't need time so accurate that an additional hardware device is necessary.
I just want all CE devices to be in sync with the PC because the clocks on
the CE devices are not very consistent. Sounds simple, right?

For a Windows 2000 Professional PC, it seems that all I need to do is create
a DWORD value of 1 with name LocalNTP
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
The CE devices query and adjust their time.

Doing this for Windows XP Pro is a different story. I have done the above
as well as ensure that Enabled has value 1 in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\N
TPServer
However, this is not sufficient. The CE devices only adjust their time if
the XP server has been synchronized with an external server, like
time.nist.gov. This is not good enough for me because I would like users
(who have to abide by strict security restrictions) to be able to run the PC
and devices without ever connecting to another network.

Any suggestions would be greatly appreciated! I'm stumped.

-Vic
The rest of this message is debug log info and hypotheses:


I don't have the means to look directly at network packets. I also don't
know of any way to log time service activity on the CE devices, but one
thing I noticed from w32time debug logs on an XP machine
(FileLogEntries=="1-300") is that it appears that the packets coming from
the 2000 SNTP server seem to have a stratum of 2 while the XP NTP server
seems to issue packets with a stratum of 0.

I say this because this is what I see in the XP log when trying to
synchronize it (not a CE device) with the 2000 PC after setting NTPServer to
an empty string in the 2000 registry, restarting the 2000 PC w32time
service, and restarting the XP w32time service so that it queries the 2000
box:

147345 19:54:25.2101920s - PeerPollingThread: PeerListUpdated
147345 19:54:25.2101920s - Resolving Cm003769
147345 19:54:25.2101920s - Peer poll: Max:1024.0000000s Cur:00.0000000s
147345 19:54:25.2101920s - PeerPollingThread: waiting 0.000s
147345 19:54:25.2101920s - W32TmServiceMain: Network Topology Change
147345 19:54:25.2101920s - ClockDispln:147345 19:54:25.2101920s -
ClockDispln TimeSlip:147345 19:54:25.2101920s - LI:3 S:0 RDl:0 RDs:0
TSF:0x0
147345 19:54:25.2101920s - TimeProvCommand([NtpServer], TPC_NetTopoChange)
called.
147345 19:54:25.2101920s - TimeProvCommand([NtpClient], TPC_NetTopoChange)
called.
147345 19:54:25.2101920s - PeerPollingThread: WaitTimeout
147345 19:54:25.2101920s - Polling peer Cm003769
(ntp.m|0x0|160.84.35.232:123->160.84.35.57:123)
147345 19:54:25.2101920s - Sending packet to Cm003769
(ntp.m|0x0|160.84.35.232:123->160.84.35.57:123) in Win2K detect mode, stage
1.
147345 19:54:25.2101920s - Peer poll: Max:1024.0000000s Cur:00.0000000s
147345 19:54:25.2101920s - PeerPollingThread: waiting 1024.000s
147345 19:54:25.2101920s - ListeningThread -- DataAvailEvent set for socket
0 (160.84.35.232:123)
147345 19:54:25.2101920s - ListeningThread -- response heard from
160.84.35.57:123
147345 19:54:25.2101920s - /-- NTP Packet:
147345 19:54:25.2101920s - | LeapIndicator: 0 - no warning; VersionNumber:
3; Mode: 2 - SymmetricPassive; LiVnMode: 0x1A
147345 19:54:25.2101920s - | Stratum: 2 - secondary reference (syncd by
(S)NTP)
147345 19:54:25.2101920s - | Poll Interval: 10 - 1024s; Precision: -7 -
7.8125ms per tick
147345 19:54:25.2101920s - | RootDelay: 0x0000.0000s - unspecified;
RootDispersion: 0x0001.0290s - 1.01001s
147345 19:54:25.2101920s - | ReferenceClockIdentifier: 0x00000000 -
unspecified
147345 19:54:25.2101920s - | ReferenceTimestamp: 0x0000000000000000 -
unspecified
147345 19:54:25.2101920s - | OriginateTimestamp: 0xC468AEF135CF2495147345
19:54:25.2101920s - - 12730679665210192000ns - 147345 19:54:25.2101920s
147345 19:54:25.2101920s - | ReceiveTimestamp: 0xC468A0E461CAC083147345
19:54:25.2101920s - - 12730676068382000000ns - 147345 18:54:28.3820000s
147345 19:54:25.2101920s - | TransmitTimestamp: 0xC468A0E461CAC083147345
19:54:25.2101920s - - 12730676068382000000ns - 147345 18:54:28.3820000s
147345 19:54:25.2101920s - >-- Non-packet info:
147345 19:54:25.2101920s - | DestinationTimestamp: 147345
19:54:25.2101920s - 0xC468AEF135CF2495147345 19:54:25.2101920s - -
12730679665210192000ns147345 19:54:25.2101920s - - 147345 19:54:25.2101920s
147345 19:54:25.2101920s - | RoundtripDelay: 000ns (0s)
147345 19:54:25.2101920s - | LocalClockOffset: -3596828192000ns -
59:56.828192000s
147345 19:54:25.2101920s - \--
147345 19:54:25.2101920s - Peer Cm003769
(ntp.m|0x0|160.84.35.232:123->160.84.35.57:123) may be Win2K. Will verify on
next packet.
147345 19:54:25.2101920s - Peer poll: Max:1024.0000000s Cur:00.0000000s
147345 19:54:25.2101920s - Response from peer Cm003769
(ntp.m|0x0|160.84.35.232:123->160.84.35.57:123), ofs: -3596.8281920s
147345 19:54:25.2101920s - 5 Age:5 Ofs:+00.0000000s Dly:+00.0000000s
Dsp:16.0000000s Dst:16.0000000s FDsp:08.0000000s
147345 19:54:25.2101920s - 4 Age:4 Ofs:+00.0000000s Dly:+00.0000000s
Dsp:16.0000000s Dst:16.0000000s FDsp:12.0000000s
147345 19:54:25.2101920s - 3 Age:3 Ofs:+00.0000000s Dly:+00.0000000s
Dsp:16.0000000s Dst:16.0000000s FDsp:14.0000000s
147345 19:54:25.2101920s - 2 Age:2 Ofs:+00.0000000s Dly:+00.0000000s
Dsp:16.0000000s Dst:16.0000000s FDsp:15.0000000s
147345 19:54:25.2101920s - 1 Age:1 Ofs:+00.0000000s Dly:+00.0000000s
Dsp:16.0000000s Dst:16.0000000s FDsp:15.5000000s
147345 19:54:25.2101920s - 0 Age:0 Ofs:-3596.8281920s Dly:+00.0000000s
Dsp:01.0200242s Dst:01.0200242s FDsp:07.7500000s


Here is what I see when a CE device tries to get the time from the XP box
that is not externally synchronized:

147345 18:48:27.2288944s - ListeningThread -- DataAvailEvent set for socket
0 (160.84.35.232:123)
147345 18:48:27.2389088s - ListeningThread -- response heard from
160.84.35.111:1083
147345 18:48:27.2589376s - /-- NTP Packet:
147345 18:48:27.2589376s - | LeapIndicator: 0 - no warning; VersionNumber:
4; Mode: 3 - Client; LiVnMode: 0x23
147345 18:48:27.2689520s - | Stratum: 0 - unspecified or unavailable
147345 18:48:27.2889808s - | Poll Interval: 0 - unspecified; Precision: 0 -
unspecified
147345 18:48:27.2989952s - | RootDelay: 0x0000.0000s - unspecified;
RootDispersion: 0x0000.0000s - unspecified
147345 18:48:27.3090096s - | ReferenceClockIdentifier: 0x00000000 -
unspecified
147345 18:48:27.3190240s - | ReferenceTimestamp: 0x0000000000000000 -
unspecified
147345 18:48:27.3390528s - | OriginateTimestamp: 0x0000000000000000 -
unspecified
147345 18:48:27.3490672s - | ReceiveTimestamp: 0x0000000000000000 -
unspecified
147345 18:48:27.3590816s - | TransmitTimestamp: 0xC469FEED00000000147345
18:48:27.3590816s - - 12730765677000000000ns - 147346 19:47:57.0000000s
147345 18:48:27.3590816s - >-- Non-packet info:
147345 18:48:27.3590816s - | DestinationTimestamp: 147345
18:48:27.3590816s - 0xC4689F7B3D29208A147345 18:48:27.3590816s - -
12730675707238908800ns147345 18:48:27.3590816s - - 147345 18:48:27.2389088s
147345 18:48:27.3590816s - | RoundtripDelay: -89969761091200ns (-89969s)
147345 18:48:27.3590816s - | LocalClockOffset: 44984880545600ns -
749:44.880545600s
147345 18:48:27.3590816s - \--
147345 18:48:27.3791104s - TransmitResponse: sent
160.84.35.232:123->160.84.35.111:1083


Note that I have seen an (unanswered) newsgroup post questioning whether
Windows 2000 had a bug where the stratum was reported as 2 even though the
author expected it to be 3 or 4.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top