OpenNTPD
   HOME

TheInfoList



OR:

OpenNTPD (also known as OpenBSD NTP Daemon) is a
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
daemon Daimon or Daemon (Ancient Greek: , "god", "godlike", "power", "fate") originally referred to a lesser deity or guiding spirit such as the daimons of ancient Greek religion and mythology and of later Hellenistic religion and philosophy. The word ...
implementing the
Network Time Protocol The Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable- latency data networks. In operation since before 1985, NTP is one of the oldest Internet protocols in c ...
to synchronize the local clock of a computer system with remote NTP servers. It is also able to act as an NTP server to NTP-compatible clients. OpenBSD NTP Daemon was initially developed by Alexander Guy and Henning Brauer as part of the
OpenBSD OpenBSD is a security-focused, free and open-source, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by forking NetBSD 1.0. According to the website, the OpenBSD project em ...
project, with further help by many authors. Its design goals include being secure ( non-exploitable), easy to configure, and accurate enough for most purposes. Its
portable Portable may refer to: General * Portable building, a manufactured structure that is built off site and moved in upon completion of site and utility work * Portable classroom, a temporary building installed on the grounds of a school to provide a ...
version, like that of
OpenSSH OpenSSH (also known as OpenBSD Secure Shell) is a suite of secure networking utilities based on the Secure Shell (SSH) protocol, which provides a secure channel over an unsecured network in a client–server architecture. Network Working Gr ...
, is developed as a child project which adds the portability code to the OpenBSD version and releases it separately. The portable version is developed by Brent Cook. The project developers receive some funding from the
OpenBSD Foundation OpenBSD is a security-focused, free and open-source, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by forking NetBSD 1.0. According to the website, the OpenBSD project em ...
.


History

The development of OpenNTPD was motivated by a combination of issues with current NTP daemons: difficult configuration, complicated and difficult to audit code, and unsuitable licensing. OpenNTPD was designed to solve these problems and make time synchronization accessible to a wider userbase. After a period of development, OpenNTPD first appeared in OpenBSD 3.6. Its first release was announced on 2 November 2004.


Goals

OpenNTPD is an attempt by the OpenBSD team to produce an NTP daemon implementation that is secure, simple to
audit An audit is an "independent examination of financial information of any entity, whether profit oriented or not, irrespective of its size or legal form when such an examination is conducted with a view to express an opinion thereon.” Auditing ...
, trivial to set up and administer, reasonably accurate, and light on system resources. As such, the design goals for OpenNTPD are: security, ease of use, and performance. Security in OpenNTPD is achieved by robust validity check in the network input path, use of bounded buffer operations via
strlcpy The C programming language has a set of functions implementing operations on strings (character strings and byte strings) in its standard library. Various operations, such as copying, concatenation, tokenization and searching are supported. F ...
, and
privilege separation In computer programming and computer security, privilege separation is one software-based technique for implementing the principle of least privilege. With privilege separation, a program is divided into parts which are limited to the specific pri ...
to mitigate the effects of possible security bugs exploiting the daemon through
privilege escalation Privilege escalation is the act of exploiting a bug, a design flaw, or a configuration oversight in an operating system or software application to gain elevated access to resources that are normally protected from an application or user. The res ...
. In order to simplify the use of NTP, OpenNTPD implements a smaller set of functionalities than those available in other NTP daemons, such as that provided by the Network Time Protocol Project. The objective is to provide enough features to satisfy typical usage at the risk of unsuitability for esoteric or niche requirements. OpenNTPD is configured through the configuration file, ''ntpd.conf''. A minimal number of options are offered: IP address or hostname on which OpenNTPD should listen, a timedelta sensor device to be used, and the set of servers from which the time will be synchronized. The accuracy of OpenNTPD is best-effort; the daemon attempts to be as accurate as possible but no specific accuracy is guaranteed.


Example

OpenNTPD gradually adjusts the system clock, as seen here in the output of OpenNTPD running on a
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
system:
$ grep ntpd /var/log/daemon.log ,  grep adjusting
Aug  4 03:32:20 nikolai ntpd
784 __NOTOC__ Year 784 ( DCCLXXXIV) was a leap year starting on Thursday of the Julian calendar. The denomination 784 for this year has been used since the early medieval period, when the Anno Domini calendar era became the prevalent method in Eur ...
adjusting local clock by -1.162333s Aug 4 03:36:08 nikolai ntpd
784 __NOTOC__ Year 784 ( DCCLXXXIV) was a leap year starting on Thursday of the Julian calendar. The denomination 784 for this year has been used since the early medieval period, when the Anno Domini calendar era became the prevalent method in Eur ...
adjusting local clock by -1.023899s Aug 4 03:40:02 nikolai ntpd
784 __NOTOC__ Year 784 ( DCCLXXXIV) was a leap year starting on Thursday of the Julian calendar. The denomination 784 for this year has been used since the early medieval period, when the Anno Domini calendar era became the prevalent method in Eur ...
adjusting local clock by -0.902637s Aug 4 03:43:43 nikolai ntpd
784 __NOTOC__ Year 784 ( DCCLXXXIV) was a leap year starting on Thursday of the Julian calendar. The denomination 784 for this year has been used since the early medieval period, when the Anno Domini calendar era became the prevalent method in Eur ...
adjusting local clock by -0.789431s Aug 4 03:47:35 nikolai ntpd
784 __NOTOC__ Year 784 ( DCCLXXXIV) was a leap year starting on Thursday of the Julian calendar. The denomination 784 for this year has been used since the early medieval period, when the Anno Domini calendar era became the prevalent method in Eur ...
adjusting local clock by -0.679320s Aug 4 03:50:45 nikolai ntpd
784 __NOTOC__ Year 784 ( DCCLXXXIV) was a leap year starting on Thursday of the Julian calendar. The denomination 784 for this year has been used since the early medieval period, when the Anno Domini calendar era became the prevalent method in Eur ...
adjusting local clock by -0.605858s Aug 4 03:53:31 nikolai ntpd
784 __NOTOC__ Year 784 ( DCCLXXXIV) was a leap year starting on Thursday of the Julian calendar. The denomination 784 for this year has been used since the early medieval period, when the Anno Domini calendar era became the prevalent method in Eur ...
adjusting local clock by -0.529821s


Criticism

OpenNTPD has been criticized as being less accurate than the NTP daemon produced by the NTP Project (ntp.org). Internally, OpenNTPD does not maintain millisecond accuracy and can vary 50-200ms from "real" time because it omits a variety of
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
s that increase accuracy in favour of code simplicity. The OpenNTPD project acknowledged the criticism, but stated that the lack of microsecond precision was a design tradeoff that benefited simplicity and security. The OpenNTPD design goals state the project's intent is to " ach a reasonable accuracy" without sacrificing "secure design for getting that last nanosecond or obscure edge case." In September 2004, shortly after the release of OpenNTPD 3.6, ntp.org contributor Brad Knowles published an article entitled ''OpenNTPd Considered Harmful'' criticizing various aspects of OpenNTPD's implementation of the NTP protocol, as well as the split development model that the project employs, which is also used in the development of
OpenSSH OpenSSH (also known as OpenBSD Secure Shell) is a suite of secure networking utilities based on the Secure Shell (SSH) protocol, which provides a secure channel over an unsecured network in a client–server architecture. Network Working Gr ...
and
OpenBGPD OpenBGPD, also known as OpenBSD Border Gateway Protocol Daemon, is a server software program that allows general purpose computers to be used as routers. It is a Unix system daemon that provides a free, open-source implementation of the Border G ...
. In December 2004, Darren Tucker, the principal developer on the portable branch of OpenNTPD, wrote a detailed response to Knowles, acknowledging some issues as valid, rejecting several others as unwarranted, and considering yet others as misleading. Among the more serious issues raised by Knowles was that OpenNTPD servers claimed to be stratum 1 servers. The issue had however already been fixed by the time of Tucker's response. In March 2005, Knowles acknowledged Tucker's response, and stated that he was "going to do everything
e could E, or e, is the fifth letter and the second vowel letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''e'' (pronounced ); plura ...
to work with
ucker The Uecker () or Ucker is a river in the northeastern German states of Brandenburg, where it is known as the ''Ucker'', and of Mecklenburg-Vorpommern. Its source lies in the Uckermark district, one kilometer north of Ringenwalde. It flows no ...
to get any remaining issues resolved". Additionally, the OpenBSD networking FAQ was expanded with a response to Knowles' initial criticism. The current OpenNTPD accuracy claim is, from the 2004 21C3 presentation, "typically 50 ms".


Leap Seconds

OpenNTPD (and the
OpenBSD OpenBSD is a security-focused, free and open-source, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by forking NetBSD 1.0. According to the website, the OpenBSD project em ...
kernel) ignore
leap seconds A leap second is a one-second adjustment that is occasionally applied to Coordinated Universal Time (UTC), to accommodate the difference between precise time (International Atomic Time (TAI), as measured by atomic clocks) and imprecise observe ...
. Care should be taken when using OpenNTPD as a higher-stratum source for other ntpd servers, or with high-resolution time requirements that reference
Coordinated Universal Time Coordinated Universal Time or UTC is the primary time standard by which the world regulates clocks and time. It is within about one second of mean solar time (such as UT1) at 0° longitude (at the IERS Reference Meridian as the currently used ...
. Leap seconds are used in Coordinated Universal Time, but not
International Atomic Time International Atomic Time (abbreviated TAI, from its French name ) is a high-precision atomic coordinate time standard based on the notional passage of proper time on Earth's geoid. TAI is a weighted average of the time kept by over 450 atomic ...
or
Global Positioning System The Global Positioning System (GPS), originally Navstar GPS, is a satellite-based radionavigation system owned by the United States government and operated by the United States Space Force. It is one of the global navigation satellite sy ...
time signals. The 50-ms accuracy is also not typical of a high-stratum source. The
United States Naval Observatory United States Naval Observatory (USNO) is a scientific and military facility that produces geopositioning, navigation and timekeeping data for the United States Navy and the United States Department of Defense. Established in 1830 as the Depo ...
and the
Bureau International des Poids et Mesures The International Bureau of Weights and Measures (french: Bureau international des poids et mesures, BIPM) is an intergovernmental organisation, through which its 59 member-states act together on measurement standards in four areas: chemistry ...
recommends that systems not implementing leap seconds be referenced to International Atomic Time, or directly to GPS time signals. However, no current version of NTP () supports non-UTC time scales.


References


External links

*
A paper explaining OpenNTPD by Henning Brauer


{{OpenBSD Network time-related software BSD software
NTPD The Network Time Protocol daemon (ntpd) is an operating system program that maintains the system time in synchronization with time servers using the Network Time Protocol (NTP). Description The ntpd program is an operating-system daemon that se ...
OpenBSD software using the ISC license