Difference between revisions of "NTPD"
Line 52: | Line 52: | ||
File content: | File content: | ||
restrict default | restrict default | ||
− | + | #restrict source | |
+ | #interface listen wildcar | ||
+ | |||
# create a local NTP server | # create a local NTP server | ||
server 127.127.1.0 | server 127.127.1.0 |
Revision as of 10:19, 1 August 2019
This page is being temporarily revised with the newest updates.
Contents
NTPD (Network Time Protokol Daemon)
Description
The NTPD program is an operating-system daemon that sets and maintains a computer system's system time in synchronization with Internet-standard time servers. It is a complete implementation of the Network Time Protocol (NTP) version 4, but retains compatibility with versions 1, 2, and 3 as defined by RFC 1059, RFC 1119, and RFC 1305, respectively. ntpd performs most computations in 64-bit floating point arithmetic and uses 64-bit fixed point operations only when necessary to preserve the ultimate precision, about 232 picoseconds. While ordinary workstations and networks cannot achieve the ultimate precision as of 2015, future processors and networks may require it.
NTPD Installation
To install NTPD package simply use the following commands:
1. Update List of Available Packages
root@iplog:~# opkg update
Example of update process:
Downloading http://www.iplog.eu/opkg/base/Packages.gz. Updated source 'base'. Downloading http://www.iplog.eu/opkg/firmware/Packages.gz. Updated source 'firmware'.
2. Upgrade Installed Packages
root@iplog:~# opkg upgrade
3. Install NTPD Package
root@iplog:~# opkg install ntpd
Example of package installing:
Installing ntpd (4.2.8p9-9671.212083251) on root. Downloading http://www.iplog.eu/opkg/base/ntpd_4.2.8p9-9671.212083251_all.ipk. Configuring ntpd.
Configuration Examples
This section provides several examples of the /etc/ntpd.conf configuration file.
1. Standalone NTP server
The following configuration has the following features:
- - Local NTP server with specified stratum 10
- - No synchronization to internet NTP servers
Editing configuration file command:
root@iplog:~# vi /etc/ntpd.conf
File content:
restrict default #restrict source #interface listen wildcar # create a local NTP server server 127.127.1.0 fudge 127.127.1.0 stratum 10 driftfile /tmp/ntp.drift
2. With Connetion to Remote NTP Servers
Example shows the optimal configuration for the Czech Republic.
This configuration has the following features:
- - Local NTP server with specified stratum 10
- - Synchronization to two internet NTP servers
Editing configuration file command:
root@iplog:~# vi /etc/ntpd.conf
File content:
restrict default #restrict source #interface listen wildcard server tik.cesnet.cz server tak.cesnet.cz server 127.127.1.0 fudge 127.127.1.0 stratum 10 refid ILOG driftfile /tmp/ntp.drift #end-of-file