Things look quiet here. But I've been doing a lot of blogging at
dan.langille.org because I prefer WordPress now.
Not all my posts there are FreeBSD related.
I am in the midst of migrating The FreeBSD Diary over to WordPress
(and you can read about that here).
Once the migration is completed, I'll move the FreeBSD posts into the
new FreeBSD Diary website.
Late last night I was reading up on Apache, the
http server. It seems a good idea to install a time synchronization daemon because
parts of http are expressed as the time of day. So I started looking up some
information. xntpd is a Network Time Protocol daemon. I decided to
go with that. It comes with FreeBSD; very little effort is required to get it
NOTE: under later versions of FreeBSD, notably 4.*, the xntpd binary
has been replaced with ntpd. However, the following options will work as
1. Create /etc/ntp.conf:
server <address of time server>
Note: Under 5.*, you do not have to include the driftfile line.
2. Enable xntpd by adding the following entries to /etc/rc.conf.
See /etc/defaults/rc.conf for the values you need. They
should look something like this:
xntpd_flags="-c /etc/ntp.conf -p /var/run/xntpd.pid"
Under 4.*, you should use this
xntpd_flags="-c /etc/ntp.conf -p /var/run/ntpd.pid"
Under 5.*, you should use this
3. On the next reboot you'll be syncing clocks automatically.
but under 4.*,
/usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid
and under 5.*,
/usr/sbin/ntpd -p /var/run/ntpd.pid -f /var/db/ntpd.drift
For more information on xntpd, try man xntpd or
the online manual.
I use my ISP as a time server. You might want to ask your ISP if they provide
such a service. If they do, use them. If they don't, try the one resources
listed at the end of this article. It's also been pointed out to me that it might
pay to use more than one timer server.
Here is the contents of my xntpd configuration file. You can use it as
an example, but you should not use the servers listed below. They will not be
appropriate for you as they are too far away. I suggest you use your ISP as a time
server. That's what I'm doing.
Use your FreeBSD box as a time server for your subnet
If you are running several machines at home, one of them should act as a server for
the others. There is no reason for each of the machines to individually access a
time server. In fact, it's an ineffecient use of resources which increases traffic.
you go through the above installation process, your FreeBSD box can act as both a client
and a server. Thus, it can act as a server for the rest of your subnet. I run
several NT boxes on my subnet. I installed a time client on those machines and they
now synchronize with the FreeBSD box. In this solution, the gateway machine talks to
the external time servers and my local subnet coordinates their time with the gateway.
A side-benefit of this approach is that should anything go wrong with the time on your
network, you only need to change your gateway time and all other machines will pick up the
xntpd as both client and server
Note that xntpd can act as both a server and as a client at the same time.
One box is designated as your local server and all of your other boxes should point
to it. The server will point to your ISP. Here are some sample configuration
files to do this:
/etc/ntp.conf on the server
/etc/ntp.conf on the clients
You should change your.isp.com to the host name of your ISPs time
server. Contact your ISP for details. You should also change your.local.server
to the IP address or the host name of the box on your subnet which will service your other
The following is a list of Windows applications which will work with xntpd.
If your favorite isn't listed below, please add yours via a comment.
- I use this but it may be too much for you. It has lots of features, such as finger,
traceroute, whois, etc., which are not time related. Recently, I've found
it difficult to find a download location. Here's a few I've found to work (as of 6 August 2001)
for version 1.4 (the latest). A quick search for "Alexander Danileiko" or NetLab should help. (freeware)