Annotation of embedaddon/ntp/html/hints/winnt.html, revision 1.1.1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>