1821051 Members
2488 Online
109631 Solutions
New Discussion юеВ

ntp setup / simple case

 
SOLVED
Go to solution
Fred Martin_1
Valued Contributor

ntp setup / simple case

I'm considering setting up ntp on an HP-UX 10.20 server. It's my only unix box, and I have about 80 Windows clients.

I have been reading posts here, and also looking in the "Administering Internet Services" manual. But, a few things are still unclear.

Here's want I'd like to do.

About once a week, my unix server (via a cron entry) will correct it's own time, using /usr/sbin/ntpdate and a server someplace on the internet.

Each time a PC boots, I'd like it to query my unix server for the time, to set it's own clock.

I have found a few freeware Windows clients for NTP. Should be all set there.

What I -don't- want is a lot of network traffic. I don't want the server broadcasting every few seconds, or anything like that. I only want it to respond to a query for the time.

The manual mentions "broadcast" mode, which scared me a bit as regards to network traffic.

So: How should I configure xntpd? What would my /etc/npd.conf file look like?

Thanks,
Fred
fmartin@applicatorssales.com
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: ntp setup / simple case

Hi Fred:

The network overhead associated with NTP is quite low; don't be afraid to use it as it was intended. The thing that you don't want to do is some goofy scheme that tries to sync the time once a week (or once a day) via ntpdate. That will induce 'stepping' behaviour (i.e. abrupt changes) and you want 'skewing' behaviour. In skewing behavior, in essence, your clocks tick a little fast or a little slow to correct the time. This is very important especially in applications like databases. If you step adjust the time, it is possible for transaction 100 to occur before transaction 99. You definitely don't want that.

You can use SAM to setup your NTP server on your 10.20; simply use one of the Internet time sources (e.g. U. S. Naval Observatory) as stratum 1 servers and let your PC clients use your 10.20 box as your local NTP server. The idea is that your UNIX box syncs to USNO and your PC's sync to your UNIX box.

Again, the network overhead is quite low and pulling 80 NTP clients is nothing.
If it ain't broke, I can fix that.
Sachin Patel
Honored Contributor

Re: ntp setup / simple case

ntp.conf file should looks like this for your setup.
server 192.5.41.40 #tick.usno.navy.mil

You can use multiple server.

If you decide to use secondary server then add.
peer IP_of_secondary

Clay is right at point. Don't worry about load.

Sachin
Is photography a hobby or another way to spend $
John Payne_2
Honored Contributor

Re: ntp setup / simple case

broadcast is turned off by default. Don't worry about that. You can edit ntp.conf to add the file, or use SAM, but either way, just let your UNIX box continually run xntpd...

Overhead on network traffic is very, very low. There is not a problem with 80, 100, 200, 1000 clients that you want to sync, and they will not all sync at once...

John
Spoon!!!!
Fred Martin_1
Valued Contributor

Re: ntp setup / simple case

Thanks folks, setup in SAM was a snap. Here's the messages from xntpd:

xntpd version=3.5f
....etc...
drift value ^H invalid
synchronized to 192.6.38.127, stratum=1
time reset (step) -130.653176 s
synchronisation lost
synchronized to 192.6.38.127, stratum=1
synchronisation lost
synchronized to 192.6.38.127, stratum=1

Should I be concerned about any of the above? The xntpd daemon has been running now for several hours, all those messages appeared right at the startup.
fmartin@applicatorssales.com
John Payne_2
Honored Contributor

Re: ntp setup / simple case

The step entry was simply your machine syncing to wherever you pointed ntp. You had a larger gap to fill, the other entries is ntp 'slewing' the time to get you synronized...

John
Spoon!!!!
Jeff Schussele
Honored Contributor

Re: ntp setup / simple case

Fred,

You want to make sure you designate a drift file - usually its

/var/adm/ntp.drift

It's used to control polling interval by comparing drift since last update & over time.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Fred Martin_1
Valued Contributor

Re: ntp setup / simple case

I'm not sure where that error message about drift came from. I did have a line in the ntp.conf file:

driftfile /etc/ntp.drift

I pre-created the file with "root:sys" as owner and permissions 644. When NTP was started up, an entry was placed in the drift file.

All else seems to be working OK. My PCs have a client running so that when they boot, the clock is updated once. That's enough accuracy for my PCs. The PC client (Automachron) can be configured to poll on a schedule or listen for broadcasts, so I can change it in the future, if I need to.
fmartin@applicatorssales.com
Jeff Schussele
Honored Contributor

Re: ntp setup / simple case

Fred,

Sounds like you're all set.
You'll like having the windoze systems kept time-acccurate. I know mine will drift quickly towards slow depending on workload if not kept synched.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!