Wednesday, 28 December 2011

NTP server Overview

Overview

NTP (Network Time Protocol) provides accurate and syncronised time across the Internet. This introductory article will try to show you how to use NTP to control and synchronize your system clock.



Sample ntp.conf configuration file

     server 134.214.100.6

     server swisstime.ee.ethz.ch



     peer 192.168.100.125

     peer 192.168.100.126

     peer 192.168.100.127



     driftfile /etc/ntp/drift

     #multicastclient  # listen on default 224.0.1.1

     #broadcastdelay  0.008



     authenticate no



     #keys           /etc/ntp/keys

     #trustedkey     65535

     #requestkey     65535

     #controlkey     65535



     # by default ignore all ntp packets

     restrict 0.0.0.0 mask 0.0.0.0 ignore



     # allow localhost

     restrict 127.0.0.1 mask 255.255.255.255



     # accept packets from...

     restrict 192.168.100.125 mask 255.255.255.255

     restrict 192.168.100.126 mask 255.255.255.255

     restrict 192.168.100.127 mask 255.255.255.255





Configuration on Unix









Troubleshooting

One of the quickest commands to verify that ntpd is still up and running as desired is ntpq -p. That command will show all peers used and configured together with their corner performance data.

# ntpq -p







No comments:

Post a Comment