Scott Granneman

Contact | Site Map | Search
HomeWritingPresentationsTeachingWeb DevTech InfoUseful LinksPersonal
Home > Tech Info > Linux > Networks > Time Server on a LAN

Set Up a Time Server for LAN Clients

For the servers that sync with the outside, put these two lines in your /etc/ntp.conf (the other lines in the file are probably correct and should be left alone):

server ntp-0.cso.uiuc.edu
server ntp-1.mcs.anl.gov

You can get a list of public NTP (stratum 2 or 3) servers at http://www.eecis.udel.edu/~mills/ntp/clock2.htm. People report excellent results with tick.usno.navy.mil and tock.usno.navy.mil, but you really shouldn't use those, since they're stratum 1 servers.

When you're done, the server has this in its /etc/ntp.conf:

server ntp2.cs.wisc.edu
server ntp-1.cso.uiuc.edu
driftfile /etc/ntp/drift

Before we start the NTP daemon, run ntpdate from the command line to set the initial date and time, otherwise it will take forever for the daemon to get the clock set to the correct time. Of course, if you have something time-sensitive running on your computer, be careful.

Then just start NTP:

/etc/init.d/ntp restart

On the clients, change the server lines in /etc/ntp.conf to point to your new (level 3) servers and start NTP on them.

The ntpdc utility will come in handy to make sure that the daemon is communicating with your upstream time servers. Within ntpdc, the monlist command will give a list of hosts and stats.

For any other questions, head over to the main source of NTP info at http://www.ntp.org/ or check out http://www.eecis.udel.edu/~ntp/documentation.html.