Configuring an NTP client in Solaris 11

Create the file:
================
root@solaris11:/etc/inet# cp /etc/inet/ntp.client /etc/inet/ntp.conf

Add the time servers:
===============
root@solaris11:/etc/inet# echo “server 0.pool.ntp.org” >> /etc/inet/ntp.conf
root@solaris11:/etc/inet# echo “server 1.pool.ntp.org” >> /etc/inet/ntp.conf
root@solaris11:/etc/inet# echo “server 2.pool.ntp.org” >> /etc/inet/ntp.conf
root@solaris11:/etc/inet# echo “server 3.pool.ntp.org” >> /etc/inet/ntp.conf

Now we add some additional configuration information
=======================================
root@solaris11:/etc/inet# echo “driftfile /var/ntp/ntp.drift” >> /etc/inet/ntp.conf
root@solaris11:/etc/inet# echo “filegen peerstats file peerstats type day enable” >>/etc/inet/ntp.conf
root@solaris11:/etc/inet# echo “filegen loopstats file loopstats type day enable” >> /etc/inet/ntp.conf
root@solaris11:/etc/inet# echo “statsdir /var/ntp/ntpstats/” >> /etc/inet/ntp.conf

force a time sync:
=============
root@solaris11:/etc/inet# ntpdate 0.pool.ntp.org
13 Mar 09:17:14 ntpdate[4435]: step time server 24.56.178.140 offset 75669.075952 sec

enable ntp via SMF:
===================
root@solaris11:/etc/inet# svcadm enable ntp

Check it:
=========
root@solaris11:/etc/inet# ntpq -p
remote refid st t when poll reach delay offset jitter
+time.devry.net 10.152.2.2 2 u 19 64 1 33.211 2.980 0.000
*199.102.46.74 ( .GPS. 1 u 19 64 1 41.078 2.592 0.000
+clock.xmission. .GPS. 1 u 20 64 1 77.231 -11.637 0.000
utcnist2.colora .ACTS. 1 u 13 64 1 60.653 -1.643 0.000
root@solaris11:/etc/inet#

Leave a Reply

Your email address will not be published. Required fields are marked *