How to configure NTP in Solaris/Windows/Linux environment...???

Hi,

Can someone let me know the detail procedure for configuring NTP in Solaris/Windows/Linux environment....???

I would like to use any NTP Server on Windows Server & rest of the systems running with Solaris 10/9 & Linux be as NTP Client. All NTP Client should take the time from NTP Server running on Windows.

Thanks & Regards,
jumadhiya.

For solaris client

cp /etc/inet/ntp.client /etc/inet/ntp.conf

vi /etc/inet/ntp.conf and replace
multicastclient 224.0.1.1
with
server ip-of-your-winntp-server

Then restart ntp
Solaris9
/etc/init.d/xntpd stop
/etc/init.d/xntpd start

Solaris10
scvadm disable ntp
scvadm enable ntp

##Do not try this on a cluster. You need to shutdown the cluster when changing the cluster nodes time.

Thanks Tornado. Can you suggest me any freeware NTP Server package for Windows 2000/2003 which is more reliable to use in my production environment. I am using different models of systems running with different OS versions & also running with veritas cluster. Let me give you a brief idea of my setup;

  1. Windows 2000/2003 server --- Want to use as NTP Server
  2. 2 x Solaris 10 Systems (ppip1n & ppip2n) running with VCS 4.1. These 2 Servers are pointing to SMC Server running on Solaris 9 to take the date & time.
    Note : I want SMC server to point the Windows NTP server to sync the date & time. pp1n & pp2n will sync the date & time from SMC server.

Please find the ntp.conf configuration from ppip1n, ppip2n & SMC systems;

ntp.conf of ppip1n
***************
ppip1n) inet > more ntp.conf
# NTP client
server 192.168.0.1
#server IP-address-of-secondary-ntp-server
server 127.127.1.0
fudge 127.127.1.0 stratum 9
enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable

(ppip1n) inet > ntpq -pn
remote refid st t when poll reach delay offset disp

*192.168.0.1 127.127.1.0 10 u 17 64 0 0.43 0.011 16000.0
127.127.1.0 127.127.1.0 9 l 22 64 377 0.00 0.000 10.01

ntp.conf on ppip2n
***************
(ppip2n) inet > more ntp.conf
# NTP client
server 192.168.0.1
#server IP-address-of-secondary-ntp-server
server 127.127.1.0
fudge 127.127.1.0 stratum 9
enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable

(ppip2n) inet > ntpq -pn
remote refid st t when poll reach delay offset disp

*192.168.0.1 127.127.1.0 10 u 51 64 0 0.29 -1.265 16000.0
127.127.1.0 127.127.1.0 9 l 37 64 377 0.00 0.000 10.01

ntp.conf of smc01
**************
(smc01)# more ntp.conf
# NTP Primary server
server 10.100.102.254
#server IP-address-of-secondary-ntp-server
server 127.127.1.0
fudge 127.127.1.0 stratum 9
enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable

(smc01)# ntpq -pn
remote refid st t when poll reach delay offset disp

10.100.102.254 0.0.0.0 15 u 43 64 377 0.52 -301931 0.05
*127.127.1.0 127.127.1.0 9 l 42 64 377 0.00 0.000 10.01

Note : 10.100.102.254 ---- Windows System IP (NTP Server)

Can you tell me the configuration is proper on ppip1n, ppip2n & SMC systems...???

What exactly is the stratum value & how it affects your configuration...???

Thanks & Regards,
jumadhiya

Why use windows as your networks ntp server ?
Why not setup you Solaris system(smc01) as the ntp server and sync all your servers off it ?

Not sure about Veritas Cluster, But with Sun Cluster, there is ntp.cluster template file you use for ntp and we use ntp.conf.cluster , not ntp.conf

In the ntp.conf.cluster you setup your nodes as peers to sync off each other using the private interconnects and set the ntp server to your time server on your network.

This is what we use on our Sun Cluster:

server my.ntp.server
#
# One of the "peers" should be "preferred" over the others.
#
peer clusternode1-priv prefer
peer clusternode2-priv

#
# Drift file (optional)
#
driftfile /var/ntp/ntp.drift

#
# Stats (optional)
#
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable
# ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
*my.ntp.server yarrina.connect  3 u   74 1024  377     1.13   -0.392    1.94
 clusternode1-pr 0.0.0.0         16 -    - 1024    0     0.00    0.000 16000.0
+clusternode2-pr my.ntp.server  4 u  298 1024  376     0.43   -0.270   16.14
#

my.ntp.server is a Stratum 3 server, it syncs its time from our Internet providers Stratum 2 servers. Its ntp.conf looks like this:

server ntp.mel.connect.com.au
server ntp.syd.connect.com.au

broadcast 224.0.1.1 ttl 4
broadcastdelay  0.5

driftfile /etc/inet/ntp.drift
# ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 NTP.MCAST.NET   0.0.0.0         16 -    -   64    0     0.00    0.000 16000.0
*yarrina.connect ntp.sydney.nmi.  2 u   49  128  377     3.02    0.429    0.44
+warrane.connect ntp.melbourne.n  2 u   68  128  377    19.01    0.851    0.66
#

Strata NTP servers are arranged in a hierarchy of levels, called strata. A stratum-1 server is more accurate than a stratum-2 server. There are 15 strata, but only first three are usually used.

Stratum 1 is the highest hierarchical level and those servers are directly attached to highly accurate reference sources such as atomic clocks. This is backbone of NTP and regular servers should not interface with backbone directly, but using NTP servers on lower stratums.

Stratum 2 servers tend to operate out of academic institutions and large corporations. Those can be used by "regular" Internet-connected servers but any sizable organization usually has its own "local" NTP server(s) that interfaces with Stratum 2 servers.

Below Stratum 2 you will find local NTP server that most organizations on the Internet now have. Most organization use free xntp daemon, but some prefer using appliances. Appliances often provide alternative synchronization case of lost internet connectivity using GPS.

Note of caution:

This depends on whether you are using internal syncing in the cluster or not. To keep nodes in sync with each other without using an external clock, or in addition to an external this is the way to configure. NB. All nodes should be clients of the same external server(s), you should not sync one node externally and others internally.

If using only an external ntp source all node still are configured as individual ntp clients, and would be configured towards the same ntp server(s), so ntp.conf can be used in this case. I strongly reccommend againt this, as internal custer time is much more important than "real" time, it is better to sync only internally than only externally.

Also it should be noted that you should not use two ntp servers. If using more than 1 server you should not use two, use a minimum of 3 https://www.ntp.org/ntpfaq/

VCS does not provide this facility, and either an external ntp server is used.

Using the private interconnects and an external time server is recommended and supported by Sun. That is how our Sun Cluster nodes are configured, as is shown in the output in my previous post.

For details have a look at Sun Document 74616

Sorry Tornado, had a total intelligence blackout when I posted that. I will update with what I should have said.

The only issue I see is the use of two reference ntp servers, which is a bad idea.

PS. Can't remember my sunsolve password either, so can't read the doc but know without doing so it will be as you say.

Thanks Tornado & Reborg. I have gone through the website The NTP FAQ and HOWTO & found that it is not possible to configure NTP server on Windows....is it practically true....??? If possible, do I need to use any additional NTP server software to configure it on Windows 2000/2003....??? Do you have any idea about freeware NTP server for Windows 2000/2003....???

If I go ahead with SMC as my central single NTP Server for the entire production setup, the configuration files ntp.conf on ppip1n & ppip2n are correct as NTP clients....??? In case of SMC system I need to remove the 10.100.102.254 entry which is pointing to Windows NTP Server....right...???

ntp.conf of smc01
(smc01)# more ntp.conf
# NTP Primary server
server 10.100.102.254 ------------------------- Remove this line
#server IP-address-of-secondary-ntp-server
server 127.127.1.0
fudge 127.127.1.0 stratum 9
enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable

Can you tell me what stratum value should I use on all the NTP client systems & on central NTP system (SMC)....???

Thanks & Regards,
jumadhiya

hello,

for a small windows NTP server - you can use a freeware such as tftpd32 by ph. jounin.

cheers...