Network Time Protocol: Difference between revisions

imported>Cov
Import from old wiki
 
No edit summary
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
== Syncing your clock to Virginia Tech's time servers ==
== Syncing your clock to Virginia Tech's time servers ==
Virginia Tech hosts four [http://en.wikipedia.org/wiki/Network_Time_Protocol  Network Time Protocol] (NTP) servers:
Virginia Tech hosts four [[w:Network Time Protocol|Network Time Protocol]] (NTP) servers:
 
* '''ntp-1.vt.edu''' (198.82.247.51) (2001:468:c80:2101:0:14b:a768:154f)
* '''ntp-2.vt.edu''' (198.82.247.71) (2001:468:c80:4101:0:1b6:a45f:ab40)
* '''ntp-3.vt.edu''' (198.82.247.108) (2001:468:c80:6101:0:111:7c3a:677)
* '''ntp-4.vt.edu''' (198.82.247.131) (2001:468:c80:8101:0:178:d2dd:db75)
 
The current status of the NTP servers can be found at [https://ntpstats.cns.vt.edu/ cns.vt.edu].
 
=== Using Gnome ===
# Right click on the clock in the top right hand corner of your desktop and select '''Adjust Date & Time'''.
# You may have to enter your password to continue.
# From the '''Configuration''' drop-down list, select '''Keep synchronized with Internet servers'''.
# You may need to click '''Install NTP support'''.
# Click '''Select Servers'''.
# Type <code>ntp-1.vt.edu</code>
# Click the '''Add''' button.
# Type <code>ntp-2.vt.edu</code>
# Click the '''Add''' button.
# Type <code>ntp-3.vt.edu</code>
# Click the '''Add''' button.
# Type <code>ntp-4.vt.edu</code>
# Click the '''Add''' button.
# Click the '''Close''' button.
# Click the '''Close''' button again.


<ul><li> '''ntp-1.vt.edu''' (198.82.1.201)
</li><li> '''ntp-2.vt.edu''' (198.82.1.202)
</li><li> '''ntp-3.vt.edu''' (198.82.1.203)
</li><li> '''ntp-4.vt.edu''' (198.82.1.204)
</li></ul>
=== Using GNOME ===
<ol><li> Right click on the clock in the top right hand corner of your desktop and select '''Adjust Date &amp; Time'''.
</li><li> You may have to enter your password to continue.
</li><li> From the '''Configuration''' drop-down list, select '''Keep synchronized with Internet servers'''.
</li><li> You may need to click '''Install NTP support'''.
</li><li> Click '''Select Servers'''.
</li><li> Type <code>ntp-1.vt.edu</code>
</li><li> Click the '''Add''' button.
</li><li> Type <code>ntp-2.vt.edu</code>
</li><li> Click the '''Add''' button.
</li><li> Type <code>ntp-3.vt.edu</code>
</li><li> Click the '''Add''' button.
</li><li> Type <code>ntp-4.vt.edu</code>
</li><li> Click the '''Add''' button.
</li><li> Click the '''Close''' button.
</li><li> Click the '''Close''' button again.
</li></ol>
=== Using ntpd ===
=== Using ntpd ===
<ol><li> Backup your ntp.conf <code></code><pre>cp /etc/ntp.conf /etc/ntp.conf.bak</pre>
Backup your <code>/etc/ntp.conf</code>:
</li><li> Add the following lines to <code>/etc/ntp.conf</code>:  
<pre>
</li></ol>
# cp /etc/ntp.conf /etc/ntp.conf.bak
<code></code><pre>server ntp-1.vt.edu
</pre>
 
Add the following lines to <code>/etc/ntp.conf</code>:  
<pre>
server ntp-1.vt.edu
server ntp-2.vt.edu
server ntp-2.vt.edu
server ntp-3.vt.edu
server ntp-3.vt.edu
server ntp-4.vt.edu</pre>
server ntp-4.vt.edu
</pre>
 
=== Using ntpdate ===
=== Using ntpdate ===
<ol><li> Change the contents of /etc/cron.daily/ntpdate to: <code></code><pre>ntpdate ntp-1.vt.edu ntp-2.vt.edu ntp-3.vt.edu ntp-4.vt.edu</pre>
Change the contents of <code>/etc/cron.daily/ntpdate</code> to:
</li></ol>
<pre>
ntpdate ntp-1.vt.edu ntp-2.vt.edu ntp-3.vt.edu ntp-4.vt.edu
</pre>
 
=== Using chrony ===
Backup your <code>/etc/chrony/chrony.conf</code>:
<pre>
# cp /etc/chrony/chrony.conf /etc/chrony/chrony.conf.bak
</pre>
 
Add the following lines to <code>/etc/chrony/chrony.conf</code>:
<pre>
server ntp-1.vt.edu
server ntp-2.vt.edu
server ntp-3.vt.edu
server ntp-4.vt.edu
</pre>
 
=== Using dnsmasq ===
This is will send the ntp addresses over dhcp.
Add the following line to <code>/etc/dnsmasq.conf</code>:
<pre>
dhcp-option=option:ntp-server,198.82.247.51,198.82.247.71,198.82.247.108,198.82.247.131
</pre>
[[Category:Howtos]]
[[Category:Campus computing resources]]