Configuration of NTP Server on Ubuntu Server
1. Install the NTP daemon
First, install the NTP daemon (ntpd):
# sudo aptitude install ntpd
2. Configure the daemon properly
The configuration file for ntpd is located at /etc/ntp.conf.
The first section you may want to modify is the list of servers to synchronize with. The default section probably looks as follows:
# vim /etc/ntp.conf
server ntp.ubuntu.com
server nist1-dc.WiTime.net iburst
server ntp0.mcs.anl.gov
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org
Also, add a few extra lines to the bottom of your servers list to provide your current local time as a default should you temporarly lose Internet connectivity:
server 127.127.1.0
fudge 127.127.1.0 stratum 10
# Allow LAN machines to synchronize with this ntp server
restrict 10.1.1.0 mask 255.0.0.0 nomodify notrap
Save and Exit
3. Make sure the configuration works
#/etc/init.d/ntp restart
If this message never comes, you have not yet properly synchronized with the NTP server network. Check the list of NTP peers you are communicating with using the following:
#ntpq -c lpeer
If the 'delay', 'offset', and 'jitter' fields are non-zero and you haven't synchronized, it probably means that you just need to wait a while. Check again that you've inserted the 'iburst' argument to your servers list! My peers, for reference, look something like the following:
Code:
remote refid st t when poll reach delay offset jitter
==============================================================================
*milo.mcs.anl.go 192.5.41.40 2 u 4 64 77 46.213 67.753 2.207
-europium.canoni 193.79.237.14 2 u 63 64 37 97.375 71.020 1.875
-dtype.org 69.25.96.13 2 u 2 64 77 86.956 69.178 1.804
+smtp130.junkema 216.218.254.202 2 u 2 64 77 87.266 67.677 0.916
+kechara.flame.o 216.218.254.202 2 u - 64 77 89.183 68.717 1.713
-host2.kingrst.c 99.150.184.201 2 u - 64 77 24.306 62.121 2.608
LOCAL(0) .LOCL. 10 l 59 64 37 0.000 0.000 0.002
Your NTPD server Successfully Configure.
UBUNTU Client Configuration.
First install ntp package on client side
#sudo apt-get install ntp
open /etc/ntp.conf
#vim /etc/ntp.conf
server 10.1.1.1
# Local users may interrogate the ntp server more closely.
restrick 10.1.1.1
restrick 127.0.0.1
Now you need to save and exit the file
Run ntpdate command against your server
sudo ntpdate 10.1.1.1
Windows Clients Configuration
Windows machines use a simplified version of NTP called Simple Network Time Protocol (SNTP), and can synchronize with NTP servers. In order to synchronize with your new server, double click on the time and go to the “Internet Time” tab. Put the IP address of your server in the “Server” field.
or
You can download Automachron from here and install in your windows xp/2000 machines
http://www.ubuntugeek.com/network-time-protocol-ntp-server-and-clients-setup-in-ubuntu.html
1. Install the NTP daemon
First, install the NTP daemon (ntpd):
# sudo aptitude install ntpd
2. Configure the daemon properly
The configuration file for ntpd is located at /etc/ntp.conf.
The first section you may want to modify is the list of servers to synchronize with. The default section probably looks as follows:
# vim /etc/ntp.conf
server ntp.ubuntu.com
server nist1-dc.WiTime.net iburst
server ntp0.mcs.anl.gov
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org
Also, add a few extra lines to the bottom of your servers list to provide your current local time as a default should you temporarly lose Internet connectivity:
server 127.127.1.0
fudge 127.127.1.0 stratum 10
# Allow LAN machines to synchronize with this ntp server
restrict 10.1.1.0 mask 255.0.0.0 nomodify notrap
Save and Exit
3. Make sure the configuration works
#/etc/init.d/ntp restart
If this message never comes, you have not yet properly synchronized with the NTP server network. Check the list of NTP peers you are communicating with using the following:
#ntpq -c lpeer
If the 'delay', 'offset', and 'jitter' fields are non-zero and you haven't synchronized, it probably means that you just need to wait a while. Check again that you've inserted the 'iburst' argument to your servers list! My peers, for reference, look something like the following:
Code:
remote refid st t when poll reach delay offset jitter
==============================================================================
*milo.mcs.anl.go 192.5.41.40 2 u 4 64 77 46.213 67.753 2.207
-europium.canoni 193.79.237.14 2 u 63 64 37 97.375 71.020 1.875
-dtype.org 69.25.96.13 2 u 2 64 77 86.956 69.178 1.804
+smtp130.junkema 216.218.254.202 2 u 2 64 77 87.266 67.677 0.916
+kechara.flame.o 216.218.254.202 2 u - 64 77 89.183 68.717 1.713
-host2.kingrst.c 99.150.184.201 2 u - 64 77 24.306 62.121 2.608
LOCAL(0) .LOCL. 10 l 59 64 37 0.000 0.000 0.002
Your NTPD server Successfully Configure.
UBUNTU Client Configuration.
First install ntp package on client side
#sudo apt-get install ntp
open /etc/ntp.conf
#vim /etc/ntp.conf
server 10.1.1.1
# Local users may interrogate the ntp server more closely.
restrick 10.1.1.1
restrick 127.0.0.1
Now you need to save and exit the file
Run ntpdate command against your server
sudo ntpdate 10.1.1.1
Windows Clients Configuration
Windows machines use a simplified version of NTP called Simple Network Time Protocol (SNTP), and can synchronize with NTP servers. In order to synchronize with your new server, double click on the time and go to the “Internet Time” tab. Put the IP address of your server in the “Server” field.
or
You can download Automachron from here and install in your windows xp/2000 machines
http://www.ubuntugeek.com/network-time-protocol-ntp-server-and-clients-setup-in-ubuntu.html

No comments:
Post a Comment