Ntp

Network Time Protocol (NTP) is used to synchronize the local time with other devices over the network, this usually happens in a client-server model.

Installation
You can install with the following command:

Configuration Files
The only configuration file is /etc/ntp.conf which is well explained with comments. Here are some of the more important festures.

server
Here you can specify with which servers you want to synchronize your local time.

Per default the gentoo servers are listed and enabled. A list of available servers can be found here:ntp.org You can also define a home or company server here, given that ntpd is running and the machine is allowed to.

Permissions
To control who is allowed to synchronize with this machine and change the configuration, you can change these options.


 * allow localhost synchronization with this machine and change its configuration.


 * allow time synchronization with this machine on the local network 192.168.0.0

Usage
Basic tools and common usage

Service
Add ntpd to the default runlevel to have the time synchronized automatically

ntpd
If ntpd is run as a service, the time will automatically synchronize as long as the difference between the local time and the time on the server is less than 1000s (~17min). So it is pretty common to adjust the time initially to whatever the server time is as a trusted source:

ntpdate
This used to be the client, which functionality is now moved into ntpd itself. It is purely to set the local time when started and then exits (not a service):

Links

 * ntp.org
 * Home Router Guide
 * en.gentoo-wiki.com