View Single Post

   
  #4 (permalink)  
Old 01-16-2008, 09:38 AM
John Howells
 
Posts: n/a
Default Re: Need help setting up NTP in simple network



ohaya wrote:
>
> Hi,
>
> I have a very small network consisting of 4 Solaris servers (Solaris1,
> ..., Solaris4) and want to configure NTP so that Solaris2, Solaris3, and
> Solaris4 synch their time to Solaris1.
>
> This is an isolated network (no outside connection available), so from
> what I've read, I think that Solaris1 should be synched to itself?
>
> We tried to set this up yesterday, and got the xnptd running on all 4
> machines, but when we tested, it didn't seem that anything was happening
> (we ran snoops on port 123 on several of the machines).
>
> We tested by first using ntpdate on Solaris2, 3, and 4 to get them
> synched to Solaris1, then starting the xnptd on those machines, then
> setting the system clock on Solaris1 back about 10 minutes, and then
> watching the snoop output for awhile.


You don't say which version of Solaris, but the config files should be the same.
However, NTP is *NOT* designed to be tested like that. It does *NOT* expect that
the clock will be pulled hither and thither, but only to follow small changes.
If you start jerking the clock about the results are at best unpredictable.

> Can someone provide what the basic ntp.conf file should look like for
> Solaris1 ..


server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /etc/inet/ntp.driftfile

> .. and for the other Solaris machines (Solaris2, 3, and 4)?


server Solaris1
driftfile /etc/inet/ntp.driftfile

If you want to add "restrict" statements you can do that later.

The startup (whether using /etc/init.d/xntpd on earlier versions or smf on 10)
should run ntpdate automatically, so you don't have to, and on the clients the
ntp daemon itself will not be started start until ntpdate completes, which
requires the server has locally synchronized so that ntpdate on the client can
get the time from it, which takes about 5 or 6 minutes. Use "ps -ef | grep ntp"
to check what is running on each system, and "ntpq -p" (see "man ntpq" under the
"peers" entry for the detail) to check things are working, and trust the output.

John Howells
Reply With Quote