NTP Setup and Boot time configuration

Network Time Protocol can be setup very easily on linux. Just use below command.

The IPs / Domains that we will give are the IP of the NTP servers from which we want to synchronize the time. 

ntpdate -q 10.199.123.152  ( We are querying if the NTP server is accessible)

ntpdate 10.199.123.152  ( Doing actual sync )


or 

ntpdate mysite.domain.com

Many times, in better infrastructure, you may have more than one NTP server. In that case, you have to give all address simultaneously.

ntpdate 10.199.123.152 10.199.123.154 10.199.123.157



However, in most of the cases, this is not enough. You will find that whenever you reboot the sever, the time is getting unsynchronized. To fix that, you have to edit file /etc/ntp.conf and put below entries:

server 10.199.123.152 iburst
server 10.199.123.154 iburst
server 10.199.123.157 iburst

The 'iburst' is optional and is a directive to speed up the synchronization.

Comments