{"id":87,"date":"2010-06-25T12:07:00","date_gmt":"2010-06-25T05:07:00","guid":{"rendered":"http:\/\/blog.trichev.com\/2010\/06\/25\/ntp-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80-%d0%bd%d0%b0-freebsd\/"},"modified":"2017-08-11T03:12:28","modified_gmt":"2017-08-10T20:12:28","slug":"ntp-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80-%d0%bd%d0%b0-freebsd","status":"publish","type":"post","link":"https:\/\/trichev.com\/blog\/2010\/06\/25\/ntp-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80-%d0%bd%d0%b0-freebsd\/","title":{"rendered":"NTP \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 FreeBSD"},"content":{"rendered":"<p>\u0422\u0430\u043a \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044f \u0430\u0434\u043c\u0438\u043d\u044e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0430\u043a\u0438 \u0432 \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438, \u043d\u043e \u0438 32 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0440\u0430\u0439\u043e\u043d\u043e\u0432 \u043f\u043e \u0432\u0441\u0435\u0439 \u041e\u043c\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0441\u043b\u0435\u0442\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0430\u043a\u0430\u0445, \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043f\u043e\u0434\u043d\u044f\u0442\u044c NTP \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u0438. \u0412\u0435\u0437\u0434\u0435 \u0441\u0442\u043e\u0438\u0442 FreeBSD 6.2. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e!<br \/>\u0427\u0442\u043e \u0438\u043c\u0435\u0435\u043c:<br \/>\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 NTP \u0441\u0435\u0440\u0432\u0435\u0440: 192.168.0.1<br \/>32 \u0441\u0435\u0440\u0432\u0430\u043a\u0430 \u0432 \u0440\u0430\u0439\u043e\u043d\u0430\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 192.168.100.5)<br \/>\u0417\u0430\u0434\u0430\u0447\u0430:<br \/>\u043f\u043e\u0434\u043d\u044f\u0442\u044c NTP \u0441\u0435\u0440\u0432\u0430\u043a\u0438 \u0432 \u0440\u0430\u0439\u043e\u043d\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e (192.168.0.1)<br \/>\u041f\u043e\u0435\u0445\u0430\u043b\u0438&hellip;<\/p>\n<p>rc.conf:<\/p>\n<p>ntpdate_enable=&rdquo;YES&rdquo;<br \/>ntpdate_program=&rdquo;\/usr\/sbin\/ntpdate&rdquo;<br \/>ntpdate_flags=&rdquo;-u 192.168.0.1&Prime;<\/p>\n<p>ntpd_enable=&rdquo;YES&rdquo;<br \/>ntpd_program=&rdquo;\/usr\/sbin\/ntpd&rdquo;<br \/>ntpd_flags=&rdquo;-p \/var\/run\/ntpd.pid&rdquo;<\/p>\n<p>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0434\u0435\u043b\u0430\u0435\u0442 \u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0425\u0430\u0440\u0430\u0442\u044c\u044f\u043d (ntpdate)? \u041f\u0440\u043e\u0441\u0442\u043e \u044f \u0434\u043b\u044f \u043a\u0443\u0447\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 ntpdate, \u0442.\u0435. \u0442\u0443\u043f\u043e \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 (3 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0434\u043e).<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \/etc\/ntp.conf (touch \/etc\/ntp.conf ):<\/p>\n<p>server 192.168.0.1 iburst prefer minpoll 8 maxpoll 16<\/p>\n<p>driftfile \/var\/db\/ntp.drift #\u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \/var\/db\/ntp.drift<br \/>logfile \/var\/log\/ntp.log<\/p>\n<p>restrict default ignore<br \/>restrict 127.0.0.1<br \/>restrict localhost<br \/>restrict 192.168.0.1 (\u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0430\u043a \u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0444\u0438\u0441\u0435)<br \/>restrict 192.168.100.0 mask 255.255.255.0 nomodify notrap #(\u043f\u043e\u0434\u0441\u0435\u0442\u043a\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f)<\/p>\n<p>\u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430:<br \/>ntpq -p<br \/>ntpdate -q localhost<br \/>ntpdate -q 192.168.0.1<br \/>sockstat | grep 123<br \/>ntpdc -c peer<\/p>\n<p>\u041d\u0430 Unix-\u043a\u043b\u0438\u0435\u043d\u0442\u0430\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c:<br \/>ee \/etc\/ntp.conf<br \/>server 192.168.0.1 iburst<br \/>driftfile \/var\/db\/ntp.drift<br \/>logfile \/var\/log\/ntp.log<br \/>restrict default ignore<br \/>restrict 192.168.0.1<\/p>\n<p>P.S. IP\u0448\u043d\u0438\u043a\u0438 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u0435, \u043d\u043e \u044f \u0434\u0443\u043c\u0430\u044e \u0432\u0435\u0437\u0434\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u043b&hellip;<br \/><strong>UPD<\/strong> \u0441\u0441\u044b\u043b\u043a\u0438:&nbsp;<br \/>http:\/\/www.freebsd.org\/doc\/ru\/books\/handbook\/network-ntp.html<br \/>http:\/\/www.opennet.ru\/openforum\/vsluhforumID1\/78985.html<br \/>http:\/\/www.lissyara.su\/articles\/freebsd\/tuning\/ntp_settings\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0422\u0430\u043a \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044f \u0430\u0434\u043c\u0438\u043d\u044e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0430\u043a\u0438 \u0432 \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438, \u043d\u043e \u0438 32 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u0440\u0430\u0439\u043e\u043d\u043e\u0432 \u043f\u043e \u0432\u0441\u0435\u0439 \u041e\u043c\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0441\u043b\u0435\u0442\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0430\u043a\u0430\u0445, \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043f\u043e\u0434\u043d\u044f\u0442\u044c NTP \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u0438. \u0412\u0435\u0437\u0434\u0435 \u0441\u0442\u043e\u0438\u0442 FreeBSD 6.2. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e!\u0427\u0442\u043e \u0438\u043c\u0435\u0435\u043c:\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 NTP \u0441\u0435\u0440\u0432\u0435\u0440: 192.168.0.132 \u0441\u0435\u0440\u0432\u0430\u043a\u0430 \u0432 \u0440\u0430\u0439\u043e\u043d\u0430\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 192.168.100.5)\u0417\u0430\u0434\u0430\u0447\u0430:\u043f\u043e\u0434\u043d\u044f\u0442\u044c NTP [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[231],"tags":[90,91,92,28,14,11],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/87"}],"collection":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/comments?post=87"}],"version-history":[{"count":1,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/87\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/87\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/media?parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/categories?post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/tags?post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}