[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
talk:howtos:network_services:ntp [2012/09/25 03:12 (UTC)] – moved the page from the general howtos namespace mfillpot | talk:howtos:network_services:ntp [2014/08/28 20:26 (UTC)] – streamthreader | ||
---|---|---|---|
Line 19: | Line 19: | ||
Thanks, Niki, I learned something today! | Thanks, Niki, I learned something today! | ||
+ | |||
+ | ---- | ||
+ | \\ | ||
+ | Deordiev Oleg notes about article:\\ | ||
+ | For understand NTP engine and program, i read special book, and write article on [[http:// | ||
+ | Some recommendation (used around Internet) about ntpd - is wrong (for new versions of ntpd).\\ | ||
+ | For example:\\ | ||
+ | 1)\\ | ||
+ | Directive " | ||
+ | Directive " | ||
+ | As a result, in ntp world have 2x types of server - this is s " | ||
+ | |||
+ | 2)\\ | ||
+ | Method - Undisciplined Local Clock driver is old:\\ | ||
+ | | ||
+ | fudge 127.127.1.0 stratum 10\\ | ||
+ | For short it use only for local net without access to Internet. | ||
+ | And very important if you have Internet in mode local clock, you need set PREFER argument for external source of time, because only this argument can override FUDGE modifier. If not use Prefer arg. NTP automatically set local time as only one right source of time, even if exist connection with external source (NTP even not check connection with it, and permanent set itself as valid source).\\ | ||
+ | This driver is old, and not provide redundant.\\ | ||
+ | |||
+ | For new version NTP (newer then 4.2.2 (2006-06-08)) need use Orphan-Mode Driver.\\ | ||
+ | Delete directives: | ||
+ | | ||
+ | fudge 127.127.1.0 stratum 10\\ | ||
+ | And use:\\ | ||
+ | tos orphan 5\\ | ||
+ | For set itself Stratum 5 if external sources is not reachable, after 60 sec (can ovveride this by set: tos orphanwait 60). | ||
+ | This option set in some servers in local net (for examples 2 server with NTP) and enumerate one itself other " | ||
+ | |||
+ | Config for example:\\ | ||
+ | |||
+ | |||
+ | **Server-1 (192.168.68.1)**\\ | ||
+ | |||
+ | server 192.168.68.2 burst iburst\\ | ||
+ | server 62.149.0.30\\ | ||
+ | pool 0.ua.pool.ntp.org\\ | ||
+ | pool 1.ua.pool.ntp.org\\ | ||
+ | pool 2.ua.pool.ntp.org\\ | ||
+ | pool 3.ua.pool.ntp.org\\ | ||
+ | |||
+ | tos orphan 10\\ | ||
+ | tinker panic 0\\ | ||
+ | |||
+ | keys / | ||
+ | driftfile / | ||
+ | logfile / | ||
+ | pidfile / | ||
+ | |||
+ | restrict default ignore\\ | ||
+ | restrict 127.0.0.1\\ | ||
+ | restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap\\ | ||
+ | |||
+ | restrict 192.168.68.2 notrap noquery nomodify\\ | ||
+ | restrict 62.149.0.30 notrap noquery nomodify\\ | ||
+ | restrict 0.ua.pool.ntp.org noquery notrap\\ | ||
+ | restrict 1.ua.pool.ntp.org noquery notrap\\ | ||
+ | restrict 2.ua.pool.ntp.org noquery notrap\\ | ||
+ | restrict 3.ua.pool.ntp.org noquery notrap\\ | ||
+ | |||
+ | |||
+ | **Server-2 (192.168.68.2)** | ||
+ | |||
+ | server 192.168.68.1 burst iburst\\ | ||
+ | server 62.149.0.30\\ | ||
+ | pool 0.ua.pool.ntp.org\\ | ||
+ | pool 1.ua.pool.ntp.org\\ | ||
+ | pool 2.ua.pool.ntp.org\\ | ||
+ | pool 3.ua.pool.ntp.org\\ | ||
+ | |||
+ | tos orphan 10\\ | ||
+ | tinker panic 0\\ | ||
+ | |||
+ | keys / | ||
+ | driftfile / | ||
+ | logfile / | ||
+ | pidfile / | ||
+ | |||
+ | restrict default ignore\\ | ||
+ | restrict 127.0.0.1\\ | ||
+ | restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap\\ | ||
+ | |||
+ | restrict 192.168.68.1 notrap noquery nomodify\\ | ||
+ | restrict 62.149.0.30 notrap noquery nomodify\\ | ||
+ | restrict 0.ua.pool.ntp.org noquery notrap\\ | ||
+ | restrict 1.ua.pool.ntp.org noquery notrap\\ | ||
+ | restrict 2.ua.pool.ntp.org noquery notrap\\ | ||
+ | restrict 3.ua.pool.ntp.org noquery notrap\\ | ||
+ | |||
+ | |||
+ | **Client (192.168.68.100)** | ||
+ | |||
+ | server 192.168.68.1 iburst burst\\ | ||
+ | server 192.168.68.2 iburst burst\\ | ||
+ | |||
+ | tinker panic 0\\ | ||
+ | |||
+ | driftfile / | ||
+ | logfile / | ||
+ | pidfile / | ||
+ | |||
+ | restrict default ignore\\ | ||
+ | |||
+ | restrict 192.168.68.1 noquery notrap\\ | ||
+ | restrict 192.168.68.2 noquery notrap\\ | ||
+ | restrict 127.0.0.1\\ | ||
+ | |||
+ | |||
+ | |||
+ | Server NTP with Orphan mode can by even One. But for all right - need some servers. | ||
+ | |||
+ | For very detail info read book [[http:// | ||
+ | |||
+ | |||
+ |