]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ntp/html/hints/winnt.htm
This commit was generated by cvs2svn to compensate for changes in r57419,
[FreeBSD/FreeBSD.git] / contrib / ntp / html / hints / winnt.htm
1 <html>
2 <head>
3    <title>NTP on Windows NT</title>
4 </head>
5 <body>
6
7 <h1>
8 NTP 4.x for Windows NT</h1>
9
10 <h2>
11 Introduction</h2>
12 The NTP 4 distribution runs as service on (i386) Windows NT 4.0 and Windows
13 2000. The binaries now work on all dual processor systems (mostly Dell)
14 that have been tested. This port has not been tested on the Alpha platform.
15 <p>Refer to System Requirements and Instructions for how to compile the
16 program.
17 <h2>
18 Reference Clocks</h2>
19 Refernce clock support under Windows NT is tricky because the IO functions
20 are so much different. The following reference clocks are supported by
21 Windows NT:
22 <p><a href="../driver1.htm">Type 1</a> Undisciplined Local Clock (LOCAL)
23 <br><a href="../driver29.htm">Type 29</a> Trimble Navigation Palisade GPS
24 (GPS_PALISADE)
25 <h2>
26 Functions Supported</h2>
27 All NTP functions are supported with some constraints. See the TODO list
28 below.
29 <h2>
30 Accuracy</h2>
31 Greg Brackley has implemented a fantastic interpolation scheme that improves
32 the precision of the NTP clock using a realtime thread (is that poetic
33 or what!) which captures a tick count from the 8253 counter after each
34 OS tick. The count is used to interpolate the time between operating system
35 ticks.
36 <p>On a typical 200+ MHz system NTP achieves a precision of about 5 microseconds
37 and synchronizes the clock to +/-500 microseconds using the <a href="http://www.trimble.com/products/ntp">Trimble
38 Palisade</a> as UTC reference. This allows distributed applications to
39 use the 10 milliseconds ticks available to them with high confidence.
40 <h2>
41 Binaries</h2>
42 Recent InstallShield based executable versions of NTP for Windows NT (i386)
43 are available from:
44 <br><a href="http://www.trimble.com/oem/ntp">http://www.trimble.com/oem/ntp</a>
45 and <a href="http://www.five-ten-sg.com/">http://www.five-ten-sg.com/</a>
46 <h2>
47 ToDo</h2>
48
49 <ul>
50 <li>
51 MD5 authentication causes problems with DNS. If you use encryption/authentication,
52 you have to use IP numbers in <tt>ntp.conf.</tt></li>
53
54 <li>
55 NMEA refclock support is in development.</li>
56
57 <li>
58 See if precision can be improved by using CPU cycle counter for tick interpolation.</li>
59
60 <li>
61 Make precision time available to applications using NTP_GETTIME API</li>
62 </ul>
63
64 <h2>
65 Compiling Requirements</h2>
66
67 <ul>
68 <li>
69 <tt>Windows NT 4.0 or 5.0 (2000)</tt></li>
70
71 <li>
72 <tt>Microsoft Visual C++ 6.0</tt></li>
73
74 <li>
75 <tt>Perl5 </tt><a href="http://www.perl.org">http://www.perl.org</a></li>
76
77 <li>
78 Some version of the archiving program <tt>ZIP</tt>.</li>
79 </ul>
80
81 <h2>
82 Compiling Instructions</h2>
83
84 <ol>
85 <li>
86 Install Perl and set the PERL environment variable to your Perl directory
87 (e.g. C:\PERL)</li>
88
89 <li>
90 Unpack the NTP-4.x.tar.gz</li>
91
92 <li>
93 Open the .\ports\winnt\ntp.dsw Visual C workspace</li>
94
95 <li>
96 Batch build all projects</li>
97 </ol>
98
99 <h2>
100 Configuration File</h2>
101 The default NTP configuration file path is %SystemRoot%<tt>\system32\drivers\etc\.
102 </tt>(%SystemRoot%
103 is an environmental variable that can be determined by typing "set" at
104 the "Command Prompt" or from the "System" icon in the "Control Panel").
105 <br>Refer to your system environment and <tt>c</tt>reate your<tt> ntp.conf</tt>
106 file in the directory corresponding to your system&nbsp; installation.
107 <br><tt>The older &lt;WINDIR>\ntp.conf </tt>is still supported but you
108 will get a log entry reporting that the first file wasn't found.
109 <h2>
110 Installation Instructions</h2>
111 The <tt>instsrv</tt> program in the instsrv subdirectory of the distribution
112 can be used to install 'ntpd' as a service and start automatically at boot
113 time. Instsrv is automatically compiled with the rest of the distribution
114 if you followed the steps above.
115 <ol>
116 <li>
117 Start a command prompt and enter "instsrv.exe &lt;pathname_for_ntpd.exe>"</li>
118
119 <li>
120 Clicking on the "Services" icon in the "Control Panel" will display the
121 list of currently installed services in a dialog box. The NetworkTimeProtocol
122 service should show up in this list. Select it in the list and hit the
123 "Start" button in the dialog box. The NTP service should start.</li>
124
125 <li>
126 View the event log by clicking on the "Event Viewer" icon in the "Administrative
127 Tools" group, there should be several successful startup messages from
128 NTP. NTP will keep running and restart automatically when the machine is
129 rebooted.</li>
130 </ol>
131 You can change the start mode (automatic/manual) and other startup parameters
132 correponding to the NTP service (eg. location of conf file) also in the
133 "Services" dialog box if you wish.
134 <h2>
135 Removing NTP</h2>
136 You can also use <tt>instsrv</tt> to delete the NTP service by entering:
137 "instsrv.exe remove"
138 <h2>
139 Command Line Parameters and Registry Entries</h2>
140 Unlike the Unix environment, there is no clean way to run 'ntpdate' and
141 reset the clock before starting 'ntpd' at boot time.
142 <br>NTP will step the clock up to 1000 seconds by default. While there
143 is no reason that the system clock should be that much off during bootup
144 if 'ntpd' was running before, you may wish to override this default and/or
145 pass other command line directives.
146 <p>Use the registry editor to edit the value for the ntpd executable under
147 LocalMachine\System\CurrentControlSet\Services\NetworkTimeProtocol.
148 <p>Add the -g option behind "%INSTALLDIR>\ntpd". This will force NTP to
149 accept large time errors (including 1.1.1980 00:00)
150 <h2>
151 Bug Reports</h2>
152 Send bug reports to <a href="news://comp.protocols.time.ntp">news://comp.protocols.time.ntp</a>
153 and Sven_Dietrich@Trimble.COM
154 <h2>
155 Change Log</h2>
156
157 <h3>
158 Last revision 15 November 1999&nbsp; Version 4.0.98f.</h3>
159 <b>by Sven Dietrich (sven_dietrich@trimble.com)</b>
160 <p><b>Significant Changes:</b>
161 <ul>
162 <li>
163 Fixed I/O problem delaying packet responses which resulted in no-replys
164 to NTPQ and others.</li>
165
166 <li>
167 The default configuration file path is <tt>&lt;WINDIR>\system32\drivers\etc\ntp.conf.
168 The old &lt;WINDIR>\ntp.conf </tt>is still supported but you will get a
169 log entry reporting that the first file wasn't found. The NTP 3.x legacy
170 <tt>ntp.ini</tt>
171 file is no longer supported.</li>
172 </ul>
173 <b>Known Problems / TODO:</b>
174 <ul>
175 <li>
176 MD5 and name resolution do not yet get along. If you define MD5, you cannot
177 use DNS names, only IP numbers.</li>
178 </ul>
179
180 <h3>
181 Last revision 27 July 1999&nbsp; Version 4.0.95.</h3>
182 This version compiles under WINNT with Visual C 6.0.
183 <p>Greg Brackley and Sven Dietrich
184 <p>Significant changes:
185 <br>-Visual Studio v6.0 support
186 <br>-Winsock 2.0 support
187 <br>-Use of I/O completion ports for sockets and comm port I/O
188 <br>-Removed the use of multimedia timers (from ntpd, others need removing)
189 <br>-Use of waitable timers (with user mode APC) and performance counters
190 to fake getting a better time
191 <br>-Trimble Palisade NTP Reference Clock support
192 <br>-General cleanup, prototyping of functions
193 <br>-Moved receiver buffer code to a separate module (removed unused members
194 from the recvbuff struct)
195 <br>-Moved io signal code to a separate module
196 <h3>
197 Last revision:&nbsp; 20-Oct-1996</h3>
198 This version corrects problems with building the XNTP
199 <br>version 3.5-86 distribution under Windows NT.
200 <p>The following files were modified:
201 <br>&nbsp;blddbg.bat
202 <br>&nbsp;bldrel.bat
203 <br>&nbsp;include\ntp_machine.h
204 <br>&nbsp;xntpd\ntp_unixclock.c
205 <br>&nbsp;xntpd\ntp_refclock.c
206 <br>&nbsp;scripts\wininstall\build.bat
207 <br>&nbsp;scripts\wininstall\setup.rul
208 <br>&nbsp;scripts\wininstall\readme.nt
209 <br>&nbsp;scripts\wininstall\distrib\ntpog.wri
210 <br>&nbsp;html\hints\winnt (this file)
211 <p>In order to build the entire Windows NT distribution you
212 <br>need to modify the file scripts\wininstall\build.bat
213 <br>with the installation directory of the InstallShield
214 <br>software.&nbsp; Then, simply type "bldrel" for non-debug
215 <br>or "blddbg" for debug executables.
216 <p>Greg Schueman
217 <br>&nbsp;&nbsp;&nbsp; &lt;schueman@acm.org>
218 <h3>
219 Last revision:&nbsp; 07-May-1996</h3>
220 This set of changes fixes all known bugs, and it includes
221 <br>several major enhancements.
222 <p>Many changes have been made both to the build environment as
223 <br>well as the code.&nbsp; There is no longer an ntp.mak file, instead
224 <br>there is a buildntall.bat file that will build the entire
225 <br>release in one shot.&nbsp; The batch file requires Perl.&nbsp; Perl
226 <br>is easily available from the NT Resource Kit or on the Net.
227 <p>The multiple interface support was adapted from Larry Kahn's
228 <br>work on the BIND NT port.&nbsp; I have not been able to test it
229 <br>adequately as I only have NT servers with one network
230 <br>interfaces on which to test.
231 <p>Enhancements:
232 <br>* Event Logging now works correctly.
233 <br>* Version numbers now work (requires Perl during build)
234 <br>* Support for multiple network interface cards (untested)
235 <br>* NTP.CONF now default, but supports ntp.ini if not found
236 <br>* Installation procedure automated.
237 <br>* All paths now allow environment variables such as %windir%
238 <p>Bug fixes:
239 <br>* INSTSRV replaced, works correctly
240 <br>* Cleaned up many warnings
241 <br>* Corrected use of an uninitialized variable in XNTPD
242 <br>* Fixed ntpdate -b option
243 <br>* Fixed ntpdate to accept names as well as IP addresses
244 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Winsock WSAStartup was
245 called after a gethostbyname())
246 <br>* Fixed problem with "longjmp" in xntpdc/ntpdc.c that
247 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caused a software exception
248 on doing a Control-C in xntpdc.
249 <br>&nbsp;A Cntrl-C now terminates the program.
250 <p>See below for more detail:
251 <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Note: SIGINT is not supported for any
252 Win32 application including
253 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Windows NT and Windows 95. When a CTRL+C
254 interrupt occurs, Win32
255 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; operating systems generate a new thread
256 to specifically handle that
257 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; interrupt. This can cause a single-thread
258 application such as UNIX,
259 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to become multithreaded, resulting in
260 unexpected behavior.
261 <br>&nbsp;
262 <p>Possible enhancements and things left to do:
263 <br>* Reference clock drivers for NT (at least Local Clock support)
264 <br>* Control Panel Applet
265 <br>* InstallShield based installation, like NT BIND has
266 <br>* Integration with NT Performance Monitor
267 <br>* SNMP integration
268 <br>* Fully test multiple interface support
269 <br>&nbsp;
270 <p>Known problems:
271 <br>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bug in ntptrace - if no Stratum
272 1 servers are available,
273 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
274 such as on an IntraNet, the application crashes.
275 <h3>
276 Last revision:&nbsp; 12-Apr-1995</h3>
277 This NTPv3 distribution includes a sample configuration file and the project
278 <br>makefiles for WindowsNT 3.5 platform using Microsoft Visual C++ 2.0
279 compiler.
280 <br>Also included is a small routine to install the NTP daemon as a "service"
281 <br>on a WindowsNT box. Besides xntpd, the utilities that have been ported
282 are
283 <br>ntpdate and xntpdc. The port to WindowsNT 3.5 has been tested using
284 a Bancomm
285 <br>TimeServe2000 GPS receiver clock that acts as a strata 1 NTP server
286 with no
287 <br>authentication (it has not been tested with any refclock drivers compiled
288 in).
289 <br>Following are the known flaws in this port:
290 <br>1) currently, I do not know of a way in NT to get information about
291 multiple
292 <br>&nbsp;&nbsp; network interface cards. The current port uses just one
293 socket bound to
294 <br>&nbsp;&nbsp; INADDR_ANY address. Therefore when dealing with a multihomed
295 NT time server,
296 <br>&nbsp;&nbsp; clients should point to the default address on the server
297 (otherwise the
298 <br>&nbsp;&nbsp; reply is not guaranteed to come from the same interface
299 to which the
300 <br>&nbsp;&nbsp; request was sent). Working with Microsoft to get this
301 resolved.
302 <br>2) There is some problem with "longjmp" in xntpdc/ntpdc.c that causes
303 a
304 <br>&nbsp;&nbsp; software exception on doing a Control-C in xntpdc. Be
305 patient!
306 <br>3) The error messages logged by xntpd currently contain only the numerical
307 <br>&nbsp;&nbsp; error code. Corresponding error message string has to
308 be looked up in
309 <br>&nbsp;&nbsp; "Books Online" on Visual C++ 2.0 under the topic "Numerical
310 List of Error
311 <br>&nbsp;&nbsp; Codes".
312 <p>Last HTML Update: November 17, 1999
313 <br><a href="mailto://sven_dietrich@trimble.com">Sven_Dietrich@Trimble.COM</a>
314 </body>
315 </html>