[ntp:questions] Question about the use of broadcast
Yann I.
yann.frm at gmail.com
Tue Apr 19 09:46:51 UTC 2011
Hi,
I have several questions about the configuration of NTP. First, here
is my configuration :
Here is the schema of my platform :
( SRV NTP 01a) <-----> ( SRV NTP 02a) ----> ( SRV NTP 03 )
( SRV NTP 01b) <-----> ( SRV NTP 02b) ----> ( SRV NTP 03 )
The needs :
- The "SRV NTP 02{a,b}" needs to be synchronized from the server "SRV
NTP 01{a,b}"
- The server "SRV NTP 03" needs to be synchronized from the servers
"SRV NTP 02a" and(/or if "and" is not possible ?) "SRV NTP 02b"
For information :
- The servers "SRV NTP 01a" and "SRV NTP 01b" can't communicate. Idem
for the servers "SRV NTP 02a" and "SRV NTP 02b",
- The link between "SRV NTP 01" and "SRV NTP 02" is a bidirectionnal
link,
- The link between "SRV NTP 02" and "SRV NTP 01" is an
unidirectionnal link and only UDP datagrams can be used (TCP is not
allowed).
I have created these configurations :
SRV NTP 01{a,b} : @IP : 10.0.0.{a,b}
server 127.127.1.0
fudge 127.127.1.0 stratum 5
driftfile /var/lib/ntp/drift
logfile /tmp/ntp.log/
statsdir /tmp/ntp.stat/
statistics loopstats peerstats clockstats sysstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
filegen sysstats file sysstats type day enable
SRV NTP 02{a,b} : @IP : 10.1.0.{a,b}
# 10.0.0.b for the configuration file of the server SRV NTP 02b :
server 10.0.0.a prefer
server 127.127.1.0
fudge 127.127.1.0 stratum 7
driftfile /var/lib/ntp/drift
broadcast 10.2.0.1
logfile /tmp/ntp.log/
statsdir /tmp/ntp.stat/
statistics loopstats peerstats clockstats sysstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
filegen sysstats file sysstats type day enable
SRV NTP 03 : @IP : 10.2.0.1
server 127.127.1.0
fudge 127.127.1.0 stratum 11
driftfile /var/lib/ntp/drift
broadcastclient novolley
disable auth
logfile /tmp/ntp.log/
statsdir /tmp/ntp.stat/
statistics loopstats peerstats clockstats sysstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
filegen sysstats file sysstats type day enable
The outputs of "ntpq -p" applied to the servers are :
SRV NTP 01{a,b} :
remote refid st t when poll reach delay
offset jitter
==============================================================================
*LOCAL(0) .LOCL. 5 l 31 64 377 0.000
0.000 0.001
SRV NTP 02{a,b} :
10.0.0.a LOCAL(0) 6 u 875 1024 377 2.227
-15.288 10.336
*LOCAL(0) .LOCL. 7 l 51 64 377 0.000
0.000 0.001
10.2.0.1 .BCST. 16 u - 64 0 0.000
0.000 0.001
SRV NTP 03 :
*LOCAL(0) .LOCL. 11 l 42 64 377 0.000
0.000 0.001
10.0.0.a LOCAL(0) 8 u 38 64 376 0.001
3074418 8.213
For the test, I have only started the NTP server of the server "SRV
NTP 02a" (the other one is down).
My questions are :
- Why is the server which have the lowest stratum is not the
reference ? As you can see, this is always the "LOCAL(0)" which is the
reference.
- When I start the server "SRV NTP 02b", the server "SRV NTP 03" saw
them as untrusted (marked with a 'x'). What's wrong ? Should I use a
key or something like that ?
Thanks for you help.
Regards,
Yann I.
ps : I'm using CentOS 5.5 and the ntp version is :
# ntpd --version
ntpd: ntpd 4.2.2p1 at 1.1570-o Sat Dec 19 00:56:13 UTC 2009 (1)
ps2 : when I start the server "SRV NTP 02b", the ntp server of "SRV
NTP 03" can "see" the two sources but after 10 minutes, the ntpd
daemon (of "SRV NTP 03") crashes... Maybe should I update the server
ntpd ?
More information about the questions
mailing list