
Solaris NTP is used to allow for Time sycnhronisation on a network between 2 or more hosts either Solaris, Windows or Linux. Solaris NTP uses a software called xntpd sets and maintains the system time-of-day in synchronism with Internet standard time servers. NTP in Solaris enables you to configure one Solaris machine as a NTP server and other Solaris machines to be NTP clients.
NTP Server Configuration
1. Create the NTP configuration file.
cp /etc/inet/ntp.server /etc/inet/ntp.conf
2. Edit /etc/inet/ntp.conf. Change the following lines in order to enable the NTP service:
server 127.127.XType.0 prefer fudge 127.127.XType.0 stratum 0
into:
server 127.127.1.0 prefer # fudge 127.127.XType.0 stratum 0
3. Create an empty /var/ntp/ntp.drift file and verify the created file.
# touch /var/ntp/ntp.drift # ls –al /var/ntp/ntp.drift
4. Start the NTP daemon.
# /etc/init.d/xntpd start
For Solaris 10, use:
# svcadm enable ntp
5. Verify the NTP is running.
# ps -ef | grep xntp 1234 /usr/lib/inet/xntpd
6. Verify the NTP multicast messages are advertised.
# snoop | grep –i ntp
7. Determine NTP Peers.
# ntpq ntpq> peers remote refid st t when poll reach delay offset disp ========================================================= *LOCAL(x) LOCAL(x) x x xx xx xxx x.xx x.xxx xx.xx xxx.x.x.x x.x.x.x xx - - xx x x.xx x.xxx xxxxx.x
NTP Client Configuration
1. Create the NTP configuration file.
cp /etc/inet/ntp.client /etc/inet/ntp.conf
2. Edit /etc/inet/ntp.conf and change the following lines in order to enable the NTP service:
multicastclient 224.0.1.1
into:
server
3. Start the NTP daemon.
/etc/init.d/xntpd start For Solaris 10 use: [c] svcadm enable ntp
4. Verify that NTP is running.
ps -ef|grep xntp 1234 /sbin/sh /etc/init.d/xntpd start 5678 /usr/sbin/ntpdate -s -w -m 224.0.1.1
5. Verify that NTP multicast messages are advertised.
snoop | grep –i ntp
6. Determine NTP Peers.
ntpq ntpq> peers remote refid st t when poll reach delay offset disp ========================================================= *xx.x.x.x LCL. x u xx xxx xx x.xx -x.xxx x.xx
Additional note:
• Strata – A level of clock accuracy. Stratum 1 – is an atomic clock server which is the most accurate level, Stratum 2 – less accurate, Stratum 4 – accurate level of a local clock, Stratum 5 – the least accuracy level.
• XType – XType represent the device type that should be putten in the ntp.conf file when configuring NTP server.
# XType Device RefID Description
# ——————————————————-
# 1 local LCL Undisciplined Local Clock
# 2 trak GPS TRAK 8820 GPS Receiver
# 3 pst WWV PSTI/Traconex WWV/WWVH Receiver
# 4 wwvb WWVB Spectracom WWVB Receiver
# 5 true TRUE TrueTime GPS/GOES Receivers
# 6 irig IRIG IRIG Audio Decoder
# 7 chu CHU Scratchbuilt CHU Receiver
# 8 parse —- Generic Reference Clock Driver
# 9 mx4200 GPS Magnavox MX4200 GPS Receiver
# 10 as2201 GPS Austron 2201A GPS Receiver
# 11 arbiter GPS Arbiter 1088A/B GPS Receiver
# 12 tpro IRIG KSI/Odetics TPRO/S IRIG Interface
# 13 leitch ATOM Leitch CSD 5300 Master Clock Controller
# 15 * * TrueTime GPS/TM-TMD Receiver
# 17 datum DATM Datum Precision Time System
# 18 acts ACTS NIST Automated Computer Time Service
# 19 heath WWV Heath WWV/WWVH Receiver
# 20 nmea GPS Generic NMEA GPS Receiver
# 22 atom PPS PPS Clock Discipline
# 23 ptb TPTB PTB Automated Computer Time Service
# 24 usno USNO USNO Modem Time Service
# 25 * * TrueTime generic receivers
# 26 hpgps GPS Hewlett Packard 58503A GPS Receiver
# 27 arc MSFa Arcron MSF Receiver
When using a local clock you should replace XType with 1. Otherwise – use this table in order to replace XType with the relevant number as indicated in this table.
• Drift – the frequency offset of the local clock from the NTP preferred clock.
