×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Administration

How do you configure NTP? by Michael42
Posted: 20 Apr 04

Configuring NTP on Sun Solaris

*** Important Note ***
According to Sun, NTP can only sync time if it is off by no more than 17 minutes.  Furthermore, adjusting time being off by seconds will take several minutes because NTP is architected to slowly adjust to the NTP master's time.  It may also be adviseable to to use rdate daily\weekly to account for systems that, for whatever reason, have their clocks off by more than 17 minutes.


NTP Master
1. Create the file /etc/inet/ntp.conf with the following    
   entries:
   server 127.127.1.0
   driftfile /etc/ntp.drift

2. Create the file /etc/ntp.drift with the following entry:
   0.0

3. Bounce NTP service.
   #> /etc/rc2.d/S74xntd stop
   #> /etc/rc2.d/S74xntd start

4. Check Status
   #> ntpq
   ntpq> peers

NTP Clients
1. Create the file /etc/inet/ntp.conf with the following entries:
   server <NTP Master IP [do not use hostname]>
   driftfile /etc/ntp.drift

2. Create the file /etc/ntp.drift with the following entry:
   0.0

3. Bounce NTP service.
   #> /etc/rc2.d/S74xntd stop
   #> /etc/rc2.d/S74xntd start

4. Check Status
   #> ntpq
   ntpq> peers


Notes
Network Time Protocol (NTP):
- When setting up an NTP config file it is important to reference these machines by
  their aliases and not their canonical names.  This allows you to transparently move
  the NTP servers to other machines in the future.
- The public domain xntp daemon (which uses NTP) is used to sync computer clocks.
- The xtnp daemon reads the file /etc/inet/ntp.conf at startup.
  It can be run periodically as a cron job.
- date and rdate can be used on systems that do not use NTP.
- Config NTP Server:
  1. Copy /etc/inet/ntp.server to /etc/inet/ntp.conf
  2. Edit the file /etc/inet/ntp.conf to point to an ntp server.
  3. Change to the /etc/inet.d dir and start the xntd daemon
- Config Client (same):
  1. Copy /etc/inet/ntp.server to /etc/inet/ntp.conf
  2. Edit the file /etc/inet/ntp.conf to point to an ntp server.
  3. Change to the /etc/inet.d dir and start the xntd daemon
- To sync the date and time with another system use:
  rdate <remote host>
- ntpq can be used to show the status of ntp.

Back to Sun: Solaris FAQ Index
Back to Sun: Solaris Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close