BSD Newsletter.com
   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
·Advocacy
·Drivers
·Events
·Flavours
·FAQs
·Guides
·Programming
·Security
·Software
·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 http://bsdwiki.reedmedia.net/wiki/Configure_a_system_to_use_NTP.html.

Configure a system to use NTP

Concept

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.

Introduction

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

files:

/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:

/etc/ntp.conf:

server ntp-1.cso.uiuc.edu iburst prefer
server ntp1.cs.wisc.edu iburst
server neptune.sg.depaul.edu iburst

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

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

To start ntpd the first time without rebooting:

ntpd -p /var/run/ntpd.pid

After already started:

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

Manually synchronize NTP:

ntpd -q

TODO: be sure to document for different implementations

Examples

Practice Exercises

More information

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



Front | Information | Lists | Newsfeeds