PageRenderTime 37ms CodeModel.GetById 24ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/ntp/html/build/hints/winnt.html

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