Article 7145 of comp.protocols.time.ntp:
From: Daniel Wong <daniel.wong@lmco-NOSPAM.com>
Newsgroups: comp.protocols.time.ntp
Subject: Re: Using NTP on an isolated network which is shut down daily
Date: Tue, 15 Sep 1998 14:53:58 -0400
Organization: Lockheed Martin
Lines: 71
Distribution: inet
Message-ID: <35FEB7C5.4935C221@lmco-NOSPAM.com>
References: <01bde0b2$838b8000$8a0211ac@pblust.sensis.com>
NNTP-Posting-Host: e7p241.syr.lmco.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.05 [en] (WinNT; U)
To: Paul Blust <pblust@astro.sensis.com>
Path: news1.meer.net!nntp2.ba.best.com!news1.best.com!su-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!news.mathworks.com!uunet!uunet!in1.uu.net!newsfeed3.global.lmco.com!news.vf.lmco.com!usenet
Xref: news1.meer.net comp.protocols.time.ntp:7145



Paul Blust wrote:

> We've got two Sun Ultra workstations running Solaris 2.6 on an isolated
> hub.  One of the workstations (sun #1) is connected to a GPS receiver; that
> sun's clock is synced to GPS time.  We'd like to use NTP to synchronize the
> other sun (sun #2) to GPS.  The accuracy has to be within 1 millisecond.
>
> The two suns must be powered up and down on a daily basis; leaving them
> powered up is not an option.  We need to have sun #2 synchronized within 5
> minutes after it is powered up.
>
> I know that NTP can require "spin-up" time to achieve a certain accuracy,
> but we're only talking about two suns on an isolated subnet here; we can
> afford a fairly high amount of NTP message traffic.
>
> Can NTP be configured to meet these specs?

Yes it can.My experience is on HP/UX (server and clients) and VxWorks (clients)
which allow NTP clients to synchronize to sub-millisecond (verified by Irig-B)
over ATM to the NTP server.

To meet the fast settling requirement you need to make a few changes in the
include/ntp.h file.
Some have pointed out that this is "dangerous" but it has worked for us and the
NAVY.

NUWC and our own testing of NTP recommended the following changes:
 - change #define NTP_MINPOLL 4 to #define NTP_MINPOLL 1
(this allows polling every 2 seconds)

 - change #define CLOCK_MAX_FP 000020C5 to 00000290
 - change #define CLOCK_MAX_F 20C49BA6 to 02900000
  (NTP will step on startup at 10 ms error rather than the default 128 ms)

 - Change #define CLOCK_WAYTOOBIG 1000 to FFFFFFFF
  (tells NTP to proceed no matter how far off client is from server)

 - in /etc/ntp.conf define server with minpoll
 e.g., server 192.168.20.65 minpoll 1
you can also add a maxpoll to keep the polling period lower for faster
settling.
The default polling period is a minpoll of 6 which is 2^6 or 64 seconds

> If it can, are there
> complications from
> using NTP this way?  Should I break down and buy an IRIG card instead?
>

make sure that you define a drift file (written once per hour) in your ntp.conf
file so that upon reboot, ntp starts with a better estimate of the frequency
error.  What this means is that you have to let ntp run for a "long while" to
get a good drift value.  Once you have one, ntp will only take a minute or two
to get below 1 ms synchronization with the changes mentioned above.

> Thanks for any input,
> Paul Blust (Paul.Blust@sensis.com)



--
Daniel Wong Principal System Engineer
Lockheed Martin  Ocean Radar and Sensor Systems
Electronics Park EP7-333  Syracuse, NY 13090
(315)456-2162 [FAX (315)456-1430]
------------------------------------------------------------------------
          Blessed is the man who always fears the Lord,
but he who hardens his heart falls into trouble. -- Proverbs 28:14




