Showing posts with label Ntp. Show all posts
Showing posts with label Ntp. Show all posts

Wednesday, July 28, 2010

NTP


Solaris

"central ntp server", ie, main machine that sync to outside time server 
of (startus 1 or 2), and in turn act like main time server for local office.
At TiLeg, this was blazer, 10.215.20.8
cp /etc/inet/ntp.server /etc/inet/ntp.conf
change:
server 204.87.183.6 prefer
fudge  204.87.183.6 1 stratum 4
broadcast 10.215.20.255 ttl 4           # port 123
# 204.87.183.6 is reloj.kjsl.com in Salinas, CA, USA.
# there are other public clock server.
Then, on each subnete, wants to have a broadcast server that send out
NTP info, so any clients on that network can listen to it and sync its clock.
server 10.215.20.8 prefer  # blazer, which is "master NTP server"
broadcast 10.215.11.255 ttl 4           # port 123

Solaris client config

On each client, setup to listen to NTP.
cp /etc/inet/ntp.client /etc/inet/ntp.conf
Really just need one line in it, indicating it listen to broadcast NTP packets:
broadcastclient
Alternatively, it can listen to a specific server via:
server 10.215.20.8 prefer

Linux, as client

cp -pa /etc/rc3.d/K74ntpd /etc/rc3.d/S74ntpd
cp -pa /etc/rc5.d/K74ntpd /etc/rc5.d/S74ntpd
/etc/rc3.d/S74ntpd start
There is already a file /etc/ntp.conf with lot of comments, need to update it
as:
A simple client config that listen to broadcast clock:
/etc/ntp.conf ::
broadcastclient
A client that listen to specific server:
server cookoo.unixville.com
server ticktick.unixville.com
A more involved linux config (details TBA):
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10
server  cookoo.unixville.com
driftfile /var/lib/ntp/drift
broadcastdelay  0.008
authenticate yes
keys            /etc/ntp/keys  # need to actually setup own key

AIX

AIX, as client that listen to broadcast clock:
/etc/ntp.conf ::
broadcastclient
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
startsrc -s xntpd
init script to uncomment /etc/rc.tcpip

HPUX

/etc/ntp.conf
broadcastclient
driftfile /var/ntp/ntp.drift
statsdir  /var/ntp/ntpstats
/etc/rc.config.d/netdaemon, change:
export NTPDATE_SERVER=10.215.22.5       #bigsur
export XNTPD=1    # def=0, so it won't start
export XNTPD_ARGS=
/sbin/rc2.d/S660xntpd start

NTP-like for windows

An article covering time sync optioins for windows:
http://geodsoft.com/howto/timesync/wininstall.htm
Precompiled SNTP client for windows NT system, refered from above.
http://sourceforge.net/projects/nettime/
Install it as adminstrator, say yes to setup as service.
Do configuration, use 10.215.20.8 (blazer) as server.
It request for 5 machines, but right now we don't have that many NTP server.
Could use the server in the various vlan, which really sync to blazer.