* [Comm] Настройка relay ntpd @ 2005-03-30 11:51 Slava Dubrovskiy 2005-03-30 15:33 ` Dmitry Lebkov 0 siblings, 1 reply; 10+ messages in thread From: Slava Dubrovskiy @ 2005-03-30 11:51 UTC (permalink / raw) To: Community Здравствуйте. Хочу настроить ntpd как релей для внутренней сети. Сеть 192.168.1.0 Вот конфиг на сервере: server ntp.lucky.net minpoll 10 maxpoll 14 fudge 127.127.1.0 stratum 10 driftfile /etc/ntp/drift broadcastdelay 0.008 restrict 192.168.1.0 mask 255.255.255.0 nomodify restrict 127.0.0.1 restrict ntp.lucky.net authenticate no Сервер нормально синхронизирует время, но отдавать клиентам не хочет. Вот конфиг клиента: server ntp.server.com.ua fudge 127.127.1.0 stratum 10 driftfile /etc/ntp/drift broadcastdelay 0.008 restrict default ignore notrust nomodify restrict 127.0.0.1 restrict ntp.server.com.ua authenticate no Клиент с внешнего сервера также нормально синхронизируется. Подскажите, в чем ошибка? -- С уважением, Дубровский Вячеслав. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Comm] Настройка relay ntpd 2005-03-30 11:51 [Comm] Настройка relay ntpd Slava Dubrovskiy @ 2005-03-30 15:33 ` Dmitry Lebkov 2005-03-30 12:38 ` Slava Dubrovskiy 0 siblings, 1 reply; 10+ messages in thread From: Dmitry Lebkov @ 2005-03-30 15:33 UTC (permalink / raw) To: community Slava Dubrovskiy wrote: > Здравствуйте. > Хочу настроить ntpd как релей для внутренней сети. Сеть 192.168.1.0 > Вот конфиг на сервере: > server ntp.lucky.net minpoll 10 maxpoll 14 > fudge 127.127.1.0 stratum 10 > driftfile /etc/ntp/drift > broadcastdelay 0.008 > restrict 192.168.1.0 mask 255.255.255.0 nomodify > restrict 127.0.0.1 > restrict ntp.lucky.net > authenticate no > > Сервер нормально синхронизирует время, но отдавать клиентам не хочет. > > Вот конфиг клиента: > server ntp.server.com.ua > fudge 127.127.1.0 stratum 10 > driftfile /etc/ntp/drift > broadcastdelay 0.008 > restrict default ignore notrust nomodify > restrict 127.0.0.1 > restrict ntp.server.com.ua > authenticate no > > Клиент с внешнего сервера также нормально синхронизируется. Подскажите, > в чем ошибка? Какое кол-во времени прошло между синхронизацией ntp.server.com.ua с ntp.lucky.net и попыткой получения времени клиентом от ntp.server.com.ua? Сервер будет готов отдавать время клиентом черз N-е кол-вол успешных синхронизаций со своим uplink'ом. А вот minpoll/maxpoll использовать не рекомендуется ... Подробности - в документации к ntpd. -- WBR, Dmitry Lebkov ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Comm] Настройка relay ntpd 2005-03-30 15:33 ` Dmitry Lebkov @ 2005-03-30 12:38 ` Slava Dubrovskiy 2005-03-31 3:21 ` Mike Lykov 2005-03-31 12:42 ` Маркелов Александр 0 siblings, 2 replies; 10+ messages in thread From: Slava Dubrovskiy @ 2005-03-30 12:38 UTC (permalink / raw) To: community Dmitry Lebkov пишет: > Какое кол-во времени прошло между синхронизацией ntp.server.com.ua с > ntp.lucky.net > и попыткой получения времени клиентом от ntp.server.com.ua? > Мало. Сразу проверял. Оставлю на ночь, утром проверю. > Сервер будет готов отдавать время клиентом черз N-е кол-вол успешных > синхронизаций > со своим uplink'ом. А вот minpoll/maxpoll использовать не > рекомендуется ... > Уберу. Просто по умолчанию стояло в конфиге. В debug режиме сервер вот что пишет в ответ на запрос ntpdate receive: at 83 192.168.1.1<-192.168.1.5 mode 3 code 2 transmit: at 83 192.168.1.1->192.168.1.5 mode 4 receive: at 83 192.168.1.1<-192.168.1.5 mode 3 code 2 transmit: at 83 192.168.1.1->192.168.1.5 mode 4 receive: at 83 192.168.1.1<-192.168.1.5 mode 3 code 2 transmit: at 83 192.168.1.1->192.168.1.5 mode 4 receive: at 83 192.168.1.1<-192.168.1.5 mode 3 code 2 transmit: at 83 192.168.1.1->192.168.1.5 mode 4 И после этого ntpdate отваливается: # ntpdate -d ntp.server.com.ua 30 Mar 15:31:29 ntpdate[9746]: ntpdate 4.1.2@1.892 Tue Apr 20 03:31:20 MSD 2004 (1) 30 Mar 15:31:29 ntpdate[9746]: running as uid(102)/gid(110) euid(102)/egid(110) with cap_sys_time chrooted to/var/empty transmit(192.168.1.1) receive(192.168.1.1) transmit(192.168.1.1) receive(192.168.1.1) transmit(192.168.1.1) receive(192.168.1.1) transmit(192.168.1.1) receive(192.168.1.1) transmit(192.168.1.1) 192.168.1.1: Server dropped: strata too high server 192.168.1.1, port 123 stratum 16, precision -17, leap 11, trust 000 refid [0.0.0.0], delay 0.02576, dispersion 0.00000 transmitted 4, in filter 4 reference time: 00000000.00000000 Thu, Feb 7 2036 8:28:16.000 originate timestamp: c5f544d1.76b11c6d Wed, Mar 30 2005 18:31:29.463 transmit timestamp: c5f51aa1.412f9010 Wed, Mar 30 2005 15:31:29.254 filter delay: 0.02583 0.02583 0.02576 0.02576 0.00000 0.00000 0.00000 0.00000 filter offset: 10800.20 10800.20 10800.20 10800.20 0.000000 0.000000 0.000000 0.000000 delay 0.02576, dispersion 0.00000 offset 10800.208920 30 Mar 15:31:29 ntpdate[9746]: no server suitable for synchronization found -- С уважением, Дубровский Вячеслав. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Comm] Настройка relay ntpd 2005-03-30 12:38 ` Slava Dubrovskiy @ 2005-03-31 3:21 ` Mike Lykov 2005-03-31 12:42 ` Маркелов Александр 1 sibling, 0 replies; 10+ messages in thread From: Mike Lykov @ 2005-03-31 3:21 UTC (permalink / raw) To: community В сообщении от Среда 30 Март 2005 17:38 Slava Dubrovskiy написал: > 30 Mar 15:31:29 ntpdate[9746]: no server suitable for synchronization found проверь: $ ntpq -c peers remote refid st t when poll reach delay offset jitter ============================================================================== LOCAL(0) LOCAL(0) 10 l 24 64 377 0.000 0.000 0.008 *ntp0.zenon.net .GPS. 1 u 975 1024 377 45.062 0.353 1.875 +ntp1.zenon.net ntp0.zenon.net 2 u 943 1024 377 54.442 7.164 5.802 Должны быть установившиеся значения st, например. ну и почитать http://www.opennet.ru/base/net/ntp_timesync.txt.html -- Mike Lykov Samara, "Vesna" parfum company, System administrator ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Comm] Настройка relay ntpd 2005-03-30 12:38 ` Slava Dubrovskiy 2005-03-31 3:21 ` Mike Lykov @ 2005-03-31 12:42 ` Маркелов Александр 2005-03-31 12:54 ` Dmitry Lebkov 1 sibling, 1 reply; 10+ messages in thread From: Маркелов Александр @ 2005-03-31 12:42 UTC (permalink / raw) To: community Slava Dubrovskiy пишет: > Dmitry Lebkov пишет: > > >>Какое кол-во времени прошло между синхронизацией ntp.server.com.ua с >>ntp.lucky.net >>и попыткой получения времени клиентом от ntp.server.com.ua? >> > > Мало. Сразу проверял. > Оставлю на ночь, утром проверю. > > >>Сервер будет готов отдавать время клиентом черз N-е кол-вол успешных >>синхронизаций >>со своим uplink'ом. А вот minpoll/maxpoll использовать не >>рекомендуется ... >> > > Уберу. Просто по умолчанию стояло в конфиге. > > В debug режиме сервер вот что пишет в ответ на запрос ntpdate > receive: at 83 192.168.1.1<-192.168.1.5 mode 3 code 2 > transmit: at 83 192.168.1.1->192.168.1.5 mode 4 > receive: at 83 192.168.1.1<-192.168.1.5 mode 3 code 2 > transmit: at 83 192.168.1.1->192.168.1.5 mode 4 > receive: at 83 192.168.1.1<-192.168.1.5 mode 3 code 2 > transmit: at 83 192.168.1.1->192.168.1.5 mode 4 > receive: at 83 192.168.1.1<-192.168.1.5 mode 3 code 2 > transmit: at 83 192.168.1.1->192.168.1.5 mode 4 > > И после этого ntpdate отваливается: > # ntpdate -d ntp.server.com.ua > 30 Mar 15:31:29 ntpdate[9746]: ntpdate 4.1.2@1.892 Tue Apr 20 03:31:20 > MSD 2004 (1) > 30 Mar 15:31:29 ntpdate[9746]: running as uid(102)/gid(110) > euid(102)/egid(110) with cap_sys_time chrooted to/var/empty > transmit(192.168.1.1) > receive(192.168.1.1) > transmit(192.168.1.1) > receive(192.168.1.1) > transmit(192.168.1.1) > receive(192.168.1.1) > transmit(192.168.1.1) > receive(192.168.1.1) > transmit(192.168.1.1) > 192.168.1.1: Server dropped: strata too high > server 192.168.1.1, port 123 > stratum 16, precision -17, leap 11, trust 000 > refid [0.0.0.0], delay 0.02576, dispersion 0.00000 > transmitted 4, in filter 4 > reference time: 00000000.00000000 Thu, Feb 7 2036 8:28:16.000 > originate timestamp: c5f544d1.76b11c6d Wed, Mar 30 2005 18:31:29.463 > transmit timestamp: c5f51aa1.412f9010 Wed, Mar 30 2005 15:31:29.254 > filter delay: 0.02583 0.02583 0.02576 0.02576 > 0.00000 0.00000 0.00000 0.00000 > filter offset: 10800.20 10800.20 10800.20 10800.20 > 0.000000 0.000000 0.000000 0.000000 > delay 0.02576, dispersion 0.00000 > offset 10800.208920 > > 30 Mar 15:31:29 ntpdate[9746]: no server suitable for synchronization found > Если я не ошибаюсь, ntp сервер говорит: 192.168.1.1: Server dropped: strata too high server 192.168.1.1, port 123 stratum 16, precision -17, leap 11, trust 000 Что на русский звучит приблизительно так(перевод вольный): "я с сервера запросил время, он мне ответил, но он говорит что он 16го уровня(strarum), слишком низкий уровень, не хочу с таким синхронизироваться(он мол сам еще не синхронизирован)" Вообщем дело в том, что 16 уровень это самый низкий(высокий, смотря от куда смотреть :) ), сервер еще не успел подвести свои часы достаточно точно, что бы выйти на нужный уровень, что бы его(сервер) считали синхронизированым, и что он дает точное время. Вроде это уровень не выше 3го. На сколько я помню: 1й уровень, это те кто подключены напрямую к точным часам(атомным или как их правильно зовут) 2й уровень это те кто синхронизуются напрямую с 1м уровнем. 16й уровень это самый низкий. Клиенты с сервером 16го уровня не синхронизируются. Надо подождать пока демон ntpd поднастроит часы сервера до приемлимого уровня, что бы клиенты могли синхронизироваться с сервером. Обычно это где то сутки(в моем случаи это было около того). Не стоит запускать ntpdate, так как, прочитал где то такое образное описание: "ntpd точно по долям секунд пытается синхронизовать время, а вы тут ему кувалдой в виде ntpdate все сбиваете" В краце, сервер еще сам не синхронизирован, и поэтому точное время клиентам отдавать не может. Надеюсь, что не очень сумбурно описал. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Comm] Настройка relay ntpd 2005-03-31 12:42 ` Маркелов Александр @ 2005-03-31 12:54 ` Dmitry Lebkov 2005-03-31 14:37 ` "А.Китайкин" 2005-04-01 5:23 ` Mike Lykov 0 siblings, 2 replies; 10+ messages in thread From: Dmitry Lebkov @ 2005-03-31 12:54 UTC (permalink / raw) To: community Маркелов Александр wrote: > Slava Dubrovskiy пишет: > >> Dmitry Lebkov пишет: >> >> >>> Какое кол-во времени прошло между синхронизацией ntp.server.com.ua с >>> ntp.lucky.net >>> и попыткой получения времени клиентом от ntp.server.com.ua? >> >> Мало. Сразу проверял. >> Оставлю на ночь, утром проверю. >> >>> Сервер будет готов отдавать время клиентом черз N-е кол-вол успешных >>> синхронизаций >>> со своим uplink'ом. А вот minpoll/maxpoll использовать не >>> рекомендуется ... [подробности поскипаны] > Не стоит запускать ntpdate, так как, прочитал где то такое образное > описание: > "ntpd точно по долям секунд пытается синхронизовать время, а вы тут ему > кувалдой в виде ntpdate все сбиваете" ntpdate используется для первичной (грубой) синхронизации времени ДО запуска ntpd. При выполняющемся ntpd, система просто не позволит ntpdate "играться" с часами. > В краце, сервер еще сам не синхронизирован, и поэтому точное время > клиентам отдавать не может. Это и утверждалось с самого начала ... ;) -- WBR, Dmitry Lebkov ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Comm] Настройка relay ntpd 2005-03-31 12:54 ` Dmitry Lebkov @ 2005-03-31 14:37 ` "А.Китайкин" 2005-04-01 8:42 ` Slava Dubrovskiy 2005-04-01 5:23 ` Mike Lykov 1 sibling, 1 reply; 10+ messages in thread From: "А.Китайкин" @ 2005-03-31 14:37 UTC (permalink / raw) To: community Dmitry Lebkov пишет: >> Не стоит запускать ntpdate, так как, прочитал где то такое образное >> описание: >> "ntpd точно по долям секунд пытается синхронизовать время, а вы тут >> ему кувалдой в виде ntpdate все сбиваете" > > > ntpdate используется для первичной (грубой) синхронизации времени ДО > запуска > ntpd. При выполняющемся ntpd, система просто не позволит ntpdate > "играться" > с часами. > Если время на сервере и локальное время отличаются на 20 и более минут, ntpd не будет синхронизироваться с сервером. В таких случаях, или для того чтобы их избежать, ntpdate просто необходим. >> В краце, сервер еще сам не синхронизирован, и поэтому точное время >> клиентам отдавать не может. > > > Это и утверждалось с самого начала ... ;) > Пары часов для синхронизации более чем достаточно. Если не срослось - ищем причину. С уважением, Китайкин Анатолий. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Comm] Настройка relay ntpd 2005-03-31 14:37 ` "А.Китайкин" @ 2005-04-01 8:42 ` Slava Dubrovskiy 2005-04-01 10:12 ` "А.Китайкин" 0 siblings, 1 reply; 10+ messages in thread From: Slava Dubrovskiy @ 2005-04-01 8:42 UTC (permalink / raw) To: community А.Китайкин пишет: >>> В краце, сервер еще сам не синхронизирован, и поэтому точное время >>> клиентам отдавать не может. >> >> Это и утверждалось с самого начала ... ;) > > Пары часов для синхронизации более чем достаточно. Если не срослось - > ищем причину. Все срослось :-) . Спасибо всем. Действительно утром пришел и все заработало. Единственный вопрос остался - разобраться с restrict Сейчас на сервере вот такой работающий конфиг: ...skip... restrict default nomodify restrict 192.168.1.0 mask 255.255.255.0 nomodify restrict 127.0.0.1 restrict ntp0.zenon.net restrict ntp1.zenon.net restrict ntp.lucky.net ...skip... Но если я вставляю, как в конфиге по умолчанию, строчку restrict default ignore notrust nomodify, то ntpd не может подключиться ни к одному серверу. Отсюда вопрос: Почему явное указание restrict ntp.lucky.net не перекрывает restrict default? -- С уважением, Дубровский Вячеслав. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Comm] Настройка relay ntpd 2005-04-01 8:42 ` Slava Dubrovskiy @ 2005-04-01 10:12 ` "А.Китайкин" 0 siblings, 0 replies; 10+ messages in thread From: "А.Китайкин" @ 2005-04-01 10:12 UTC (permalink / raw) To: community Slava Dubrovskiy пишет: >Единственный вопрос остался - разобраться с restrict >Сейчас на сервере вот такой работающий конфиг: >...skip... >restrict default nomodify >restrict 192.168.1.0 mask 255.255.255.0 nomodify >restrict 127.0.0.1 >restrict ntp0.zenon.net >restrict ntp1.zenon.net >restrict ntp.lucky.net >...skip... > >Но если я вставляю, как в конфиге по умолчанию, строчку >restrict default ignore notrust nomodify, то ntpd не может подключиться >ни к одному серверу. >Отсюда вопрос: Почему явное указание restrict ntp.lucky.net не >перекрывает restrict default? > > > Замени в restrict символьные имена на голые ip: #restrict ntp0.zenon.net restrict 195.2.64.5 #restrict ntp1.zenon.net restrict 195.2.64.6 #restrict news-zero.demos.su restrict 194.87.0.27 ... C уважением, А. Китайкин ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Comm] Настройка relay ntpd 2005-03-31 12:54 ` Dmitry Lebkov 2005-03-31 14:37 ` "А.Китайкин" @ 2005-04-01 5:23 ` Mike Lykov 1 sibling, 0 replies; 10+ messages in thread From: Mike Lykov @ 2005-04-01 5:23 UTC (permalink / raw) To: community В сообщении от Четверг 31 Март 2005 17:54 Dmitry Lebkov написал: > ntpdate используется для первичной (грубой) синхронизации времени ДО > запуска ntpd. При выполняющемся ntpd, система просто не позволит ntpdate > "играться" с часами. да, скажет port already binded или что-то такое ;) -- Mike Lykov Samara, "Vesna" parfum company, System administrator ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-04-01 10:12 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-03-30 11:51 [Comm] Настройка relay ntpd Slava Dubrovskiy 2005-03-30 15:33 ` Dmitry Lebkov 2005-03-30 12:38 ` Slava Dubrovskiy 2005-03-31 3:21 ` Mike Lykov 2005-03-31 12:42 ` Маркелов Александр 2005-03-31 12:54 ` Dmitry Lebkov 2005-03-31 14:37 ` "А.Китайкин" 2005-04-01 8:42 ` Slava Dubrovskiy 2005-04-01 10:12 ` "А.Китайкин" 2005-04-01 5:23 ` Mike Lykov
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git