Friday, April 25, 2014

NTP Server and CLient set up

Network Time Protocol (NTP)

NTP is used to synchronize the time of a remote computer system over the network. It oprates on port 123.


1. Configure NTP server
a. Edit /etc/ntp.conf file and specify the ntp server which you want to sync your system with remote system.
Note: Normally we sync the time with local time clock or University time clock.

# vi /etc/ntp.conf

uncomment the server section, in my case, I am using the time server from Reston, va

# Time server from, Reston VA
# nist1.aol-va.symmetricom.com Reston, Virginia
server  64.236.96.53


b. save the file and restart the ntpd service

# service ntpd status
ntpd is stopped

# service ntpd start
Starting ntpd:                                             [  OK  ]

c. Make sure to start the ntpd service on every reboot.

# chkconfig --list ntpd
ntpd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
# chkconfig ntpd on
# chkconfig --list ntpd
ntpd            0:off   1:off   2:on    3:on    4:on    5:on    6:off



# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 nist01.ntp.aol. .INIT.          16 u    -   64    0    0.000    0.000   0.000

---------------------------------------------------------------------------------

Note: If you see ST value more than 5, your NTP is not syncing with the server. Please check and verify that server is operational.
Note: The Output jitter value of 000 or less than 1 is consider successfull

To check the NTP status,
# ntpstat -p

synchronised
  time server re-starting
   polling server every 64 s

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Setting up NTP Client

To setup NTP client, you just use the /etc/ntp.conf file and specify the NTP server name that you just created.

# vi /etc/ntp.confComment that all begins with server and add your NTP server info.

server    192.168.10.120

# service ntpd start
# chkconf ntpd on

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To update or sync your client system with NTP server,

# ntpdate -u 192.168.10.120       

No comments:

Post a Comment