Front | Info | Lists | Newsfeeds | Study Guide | What is BSD?
Advertisement: The OpenBSD PF Packet Filter Book: PF for NetBSD, FreeBSD, DragonFly and OpenBSD

BSD Links
·New Links
·User Groups

This is the BSDA Study Guide Book written via a wiki collaboration. This is a work in progress. You may contribute to or discuss this specific page at

Configure a system to use NTP


Be familiar with the concepts in RFC 868, the importance of synchronizing time on server systems and which services in particular are time sensitive. Be able to configure NTP and manually synchronize with a time server as required.


TODO: following are some contributed notes. Some can be removed as refer to too advanced. Also may be FreeBSD-specific.

ntpd: Network time protocol (NTP) daemon

ntp.conf: NTP daemon configuration file (/etc/ntp.conf)

ntpdc: special NTP query program

ntpq: standard NTP query program

ntpdate: set the date and time via NTP


/etc/ntp.conf default name of the configuration file

/etc/ntp.drift default name of the drift file

/etc/ntp.keys default name of the key file

/usr/local/etc/ntp.keys private md5 keys

/ntpkey RSA private key

/ntpkey_host RSA public key

ntp_dh Diffie-Hellman agreement parameters

which services are time sensitive:

configuring NTP:


server iburst prefer
server iburst
server iburst

(TODO: use generic example host names or use pool.)

driftfile /var/db/ntp.drift
restrict mask nomodify notrap

To start ntpd the first time without rebooting:

ntpd -p /var/run/

After already started:

/etc/rc.d/ntpd [start | stop | restart | etc...]

Manually synchronize NTP:

ntpd -q

TODO: be sure to document for different implementations


Practice Exercises

More information

ntpd(8), ntp.conf(5) or ntpd.conf(5), rc.conf(5), rdate(8)

Front | Information | Lists | Newsfeeds