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.

86 lines
3.5 KiB

  1. # Configuring NTPD with UCI
  2. ## Precedent
  3. Sysntpd is the lightweight implementation of the NTP protocol under
  4. Busybox. It supports many (but not all) of the same parameters.
  5. It is configured as a `config timeserver ntp` section in `/etc/config/system`,
  6. below.
  7. ## Configuration
  8. A sample configuration looks like:
  9. **/etc/config/system**:
  10. ```
  11. config timeserver ntp
  12. option enabled 1
  13. option enable_server 1
  14. list server tick.udel.edu
  15. list server tock.udel.edu
  16. list interface eth0
  17. list interface eth1
  18. list interface eth2
  19. ```
  20. If you want to temporarily disable the service without deleting all of the
  21. configuration state, this is done by clearing the `enabled` parameter. If
  22. this parameter is `1` (the default), the service is enabled.
  23. The service can run as a stand-alone client (`enable_server 0`, the default)
  24. or it can also operate as a server in turn to local clients, by setting this
  25. parameter to `1`.
  26. The parameter(s) `server` enumerate a list of servers to be used for
  27. reference NTP servers by the local daemon. At least one is required,
  28. and two or more are recommended (unless you have an extremely available
  29. local server). They should be picked to be geographically divergent,
  30. and preferrably reachable via different network carriers to protect
  31. against network partitions, etc. They should also be high-quality
  32. time providers (i.e. having stable, accurate clock sources).
  33. The `interface` parameter enumerates the list of interfaces on which
  34. the server is reachable (see `enable_server 1` above), and may be a
  35. subset of all of the interfaces present on the system. For security
  36. reasons, you may elect to only offer the service on internal networks.
  37. If omitted, it defaults to _all_ interfaces.
  38. ## Differences with `sysntpd`
  39. Busybox `sysntpd` supports configuring servers based on DHCP
  40. provisioning (option 6, per the [DHCP and BOOTP
  41. Parameter](https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml)
  42. list from IANA). This functionality is enabled (in Busybox) with the
  43. `use_dhcp` boolean parameter (default `1`), and the `dhcp_interface`
  44. list parameter, which enumerates the interfaces whose provisioning
  45. is to be utilized.
  46. ### Considerations for DHCP-provisioned NTP servers
  47. Most terrestrial and satellite ISPs have access to very high-quality
  48. clock sources (these are required to maintain synchronization on T3,
  49. OC3, etc trunks or earth terminals) but seldom offer access to those
  50. time sources via NTP in turn to their clients, mostly from a misplaced
  51. fear that their time source might come under attack (a slave closely
  52. tied to the master could also provide extremely high-quality time
  53. without the risk of network desynchronization should it come under
  54. sophisticated attack).
  55. As a result, the NTP servers that your ISP may point you at are
  56. often of unknown/unverified quality, and you use them at your own
  57. risk.
  58. Early millenial versions of Windows (2000, XP, etc) used NTP only
  59. to _initially set_ the clock to approximately 100ms accuracy (and
  60. not maintain sychronization), so the bar wasn't set very high.
  61. Since then, requirements for higher-qualty timekeeping have
  62. arisen (e.g. multi-master SQL database replication), but most ISPs
  63. have not kept up with the needs of their users.
  64. Current releases of Windows use Domain Controllers for time
  65. acquisition via the [NT5DS protocol](https://blogs.msdn.microsoft.com/w32time/2007/07/07/what-is-windows-time-service/)
  66. when domain joined.
  67. Because of the unreliable quality of NTP servers DHCP-provisioned by
  68. ISPs, support for this functionality was deemed unnecessary.