Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.9 KiB

  1. .\" $OpenBSD: ntpd.conf.5,v 1.9 2004/11/08 19:09:19 otto Exp $
  2. .\"
  3. .\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
  4. .\"
  5. .\" Permission to use, copy, modify, and distribute this software for any
  6. .\" purpose with or without fee is hereby granted, provided that the above
  7. .\" copyright notice and this permission notice appear in all copies.
  8. .\"
  9. .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. .\" WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
  14. .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  15. .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. .\"
  17. .Dd June 17, 2004
  18. .Dt NTPD.CONF 5
  19. .Os
  20. .Sh NAME
  21. .Nm ntpd.conf
  22. .Nd Network Time Protocol daemon configuration file
  23. .Sh DESCRIPTION
  24. This manual page describes the format of the
  25. .Xr ntpd 8
  26. configuration file.
  27. It has the following format:
  28. .Pp
  29. Empty lines and lines beginning with the
  30. .Sq #
  31. character are ignored.
  32. .Pp
  33. Keywords may be specified multiple times within the configuration file.
  34. They are as follows:
  35. .Bl -tag -width Ds
  36. .It Ic listen on Ar address
  37. Specify a local IP address or a hostname the
  38. .Xr ntpd 8
  39. daemon should listen on.
  40. If it appears multiple times,
  41. .Xr ntpd 8
  42. will listen on each given address.
  43. If
  44. .Sq *
  45. is given as an address,
  46. .Xr ntpd 8
  47. will listen on all local addresses.
  48. .Xr ntpd 8
  49. does not listen on any address by default.
  50. For example:
  51. .Bd -literal -offset indent
  52. listen on *
  53. listen on 127.0.0.1
  54. listen on ::1
  55. .Ed
  56. .It Ic server Ar address
  57. Specify the IP address or the hostname of an NTP
  58. server to synchronize to.
  59. If it appears multiple times,
  60. .Xr ntpd 8
  61. will try to synchronize to all of the servers specified.
  62. If a hostname resolves to multiple IPv4 and/or IPv6 addresses,
  63. .Xr ntpd 8
  64. uses the first address.
  65. If it does not get a reply,
  66. .Xr ntpd 8
  67. retries with the next address and continues to do so until a working address
  68. is found.
  69. For example:
  70. .Bd -literal -offset indent
  71. server 10.0.0.2
  72. server ntp.example.org
  73. .Ed
  74. .Pp
  75. To provide redundancy, it is good practice to configure multiple servers.
  76. In general, best accuracy is obtained by using servers that have a low
  77. network latency.
  78. .It Ic servers Ar address
  79. As with
  80. .Cm server ,
  81. specify the IP address or hostname of an NTP server to synchronize to.
  82. If it appears multiple times,
  83. .Xr ntpd 8
  84. will try to synchronize to all of the servers specified.
  85. Should the hostname resolve to multiple IP addresses,
  86. .Xr ntpd 8
  87. will try to synchronize to all of them.
  88. For example:
  89. .Bd -literal -offset indent
  90. servers pool.ntp.org
  91. .Ed
  92. .El
  93. .Sh FILES
  94. .Bl -tag -width "/etc/ntpd.confXXX" -compact
  95. .It Pa /etc/ntpd.conf
  96. default
  97. .Xr ntpd 8
  98. configuration file
  99. .El
  100. .Sh SEE ALSO
  101. .Xr ntpd 8
  102. .Sh HISTORY
  103. The
  104. .Nm
  105. file format first appeared in
  106. .Ox 3.6 .