How to Configure NTP Server and NTP Client on Solaris 10

The Network Time Protocol (NTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. NTP uses UDP on port 123 as its transport layer. See more on Wikipedia pages.

How to Configure NTP Server on Solaris 10:

[Check NTP services:
bash-3.00# svcs ntp
STATE          STIME    FMRI
disabled       21:14:03 svc:/network/ntp:default
bash-3.00#

NTP services still ‘disabled’, OK leave it disabled state, before enable NTP services, we need to create / edit ntp.conf.

bash-3.00# cp /etc/inet/ntp.server /etc/inet/ntp.conf
bash-3.00# vi /etc/inet/ntp.conf

[Find two lines:
server 127.127.XType.0
fudge 127.127.XType.0 stratum 0

Replace “XType” with your External Clock Device.the complete list are on ntp.conf file.

—————–

# This is the external clock device.  The following devices are
# recognized by xntpd 3-5.93e:
#
# 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
#etc…..

—————-

Usually we use XType number 1, “Undisciplined Local Clock”. So the configuration become like this:

server 127.127.1.0
fudge 127.127.1.0 stratum 0

You can also syncing to an external NTP server:
Go to http://www.pool.ntp.org/ for a list of public time servers:
change `server 127.127.XType.0`
to `server time_server`

[Exp for Indonesia pool zone:
server 0.id.pool.ntp.org
server 0.asia.pool.ntp.org
server 2.asia.pool.ntp.org

[then ENABLE the NTP services:
bash-3.00# svcadm enable ntp
bash-3.00# svcs ntp
STATE          STIME    FMRI
online         21:38:44 svc:/network/ntp:default

Now, your NTP server will broadcast its packet using UDP port 123 on Multicast network 224.0.0.1

How to Configure NTP Client on Solaris 10:

On client side, check ntp services, leave it in disabled state, we’ll re-enable again later:

[Copy ntp.client become ntp.conf file:
bash-3.00# cp /etc/inet/ntp.client /etc/inet/ntp.conf

The default config is “multicastclient 224.0.1.1”  It mean your client passively waits for a ntp server to provide NTP packet to multicast network 224.0.1.1. If you want to sync your clock to a particular server, even though the clock is coming from the Internet or from the server’s hardware clock then specify it as:

server <NTP_server_ip_address>

Donf forget to remove/comment the line “multicastclient 224.0.1.1”

[ENABLE the NTP services:
bash-3.00# svcadm enable ntp
bash-3.00# svcs ntp
STATE          STIME    FMRI
online         22:30:15 svc:/network/ntp:default

Run “ntpq -p” to check which NTP server you are using right now.

[Read more:
# man xntpd

[Additional references:
Using NTP to Control and Synchronize System Clocks – Part I: Introduction to NTP
http://www.sun.com/blueprints/0701/NTP.pdf

Using NTP to Control and Synchronize System Clocks – Part II: Basic NTP Administration and Architecture
http://www.sun.com/blueprints/0801/NTPpt2.pdf

Using NTP to Control and Synchronize System Clocks – Part III: NTP Monitoring and Troubleshooting
http://www.sun.com/blueprints/0901/NTPpt3.pdf

4 responses to “How to Configure NTP Server and NTP Client on Solaris 10

  1. Hi i have configured this but the client is unable to sync its time with the server. ntp service is online on both server and client.
    I m using the local machine as an ntp server.

  2. Hello admin, i see that saifulaziz.com needs fresh posts. Daily updates will rank your website in google higher, content is king nowadays. If you are to lazy to write unique posts everyday you should search in google for:
    Ightsero’s Essential Tool

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s