Difference between revisions of "Network Time Protocol"

From the Linux and Unix Users Group at Virginia Teck Wiki
Jump to: navigation, search
imported>Mutantmonkey
 
(5 intermediate revisions by 4 users not shown)
Line 2: Line 2:
 
Virginia Tech hosts four [[w: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.1.201)
+
* '''ntp-1.vt.edu''' (198.82.247.51) (2001:468:c80:2101:0:14b:a768:154f)
−
* '''ntp-2.vt.edu''' (198.82.1.202)
+
* '''ntp-2.vt.edu''' (198.82.247.71) (2001:468:c80:4101:0:1b6:a45f:ab40)
−
* '''ntp-3.vt.edu''' (198.82.1.203)
+
* '''ntp-3.vt.edu''' (198.82.247.108) (2001:468:c80:6101:0:111:7c3a:677)
−
* '''ntp-4.vt.edu''' (198.82.1.204)
+
* '''ntp-4.vt.edu''' (198.82.247.131) (2001:468:c80:8101:0:178:d2dd:db75)
  
−
ntp-1.vt.edu is also available over [[IPv6]] as '''ntp.vt.edu'''.
+
The current status of the NTP servers can be found at [https://ntpstats.cns.vt.edu/ cns.vt.edu].
  
 
=== Using Gnome ===
 
=== Using Gnome ===
Line 46: Line 46:
 
</pre>
 
</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:Howtos]]
 
[[Category:Campus computing resources]]
 
[[Category:Campus computing resources]]
−
[[Category:Round 2 migration]]
 

Latest revision as of 14:49, 25 September 2026

Syncing your clock to Virginia Tech's time servers

Virginia Tech hosts four 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 cns.vt.edu.

Using Gnome

  1. Right click on the clock in the top right hand corner of your desktop and select Adjust Date & Time.
  2. You may have to enter your password to continue.
  3. From the Configuration drop-down list, select Keep synchronized with Internet servers.
  4. You may need to click Install NTP support.
  5. Click Select Servers.
  6. Type ntp-1.vt.edu
  7. Click the Add button.
  8. Type ntp-2.vt.edu
  9. Click the Add button.
  10. Type ntp-3.vt.edu
  11. Click the Add button.
  12. Type ntp-4.vt.edu
  13. Click the Add button.
  14. Click the Close button.
  15. Click the Close button again.

Using ntpd

Backup your /etc/ntp.conf:

# cp /etc/ntp.conf /etc/ntp.conf.bak

Add the following lines to /etc/ntp.conf:

server ntp-1.vt.edu
server ntp-2.vt.edu
server ntp-3.vt.edu
server ntp-4.vt.edu

Using ntpdate

Change the contents of /etc/cron.daily/ntpdate to:

ntpdate ntp-1.vt.edu ntp-2.vt.edu ntp-3.vt.edu ntp-4.vt.edu

Using chrony

Backup your /etc/chrony/chrony.conf:

# cp /etc/chrony/chrony.conf /etc/chrony/chrony.conf.bak

Add the following lines to /etc/chrony/chrony.conf:

server ntp-1.vt.edu
server ntp-2.vt.edu
server ntp-3.vt.edu
server ntp-4.vt.edu

Using dnsmasq

This is will send the ntp addresses over dhcp. Add the following line to /etc/dnsmasq.conf:

dhcp-option=option:ntp-server,198.82.247.51,198.82.247.71,198.82.247.108,198.82.247.131