参考
設定
- 192.168.0.0/24 からの 時刻問い合わせに応答例。上から順に適用されるようなので、一番下に記述。
/etc/ntp.conf
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
#restrict 192.168.0.0 mask 255.255.255.0 noquery nomodify nopeer notrust notrap
+ restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
注意点
- ntpサーバー機の設定を変更した後、ntpクライアント機のntpを再起動する必要があった(?)。
-
restrict
は何もせずとも時刻問い合わせに応答するっぽい(?未確認)
ntpq -p の記号
- 参考: NTPサーバーによる時刻同期
* 参照同期中のサーバーを表している
+ クロック誤り検査に合格したサーバー
# 参照同期中ではあるが、距離が遠いサーバー
左に何も表示されない場合(空欄)、サーバーを参照していない
x クロック誤り検査に不合格となったサーバー
. 参照リストから除外されたサーバー
refid 上位NTPサーバーが参照しているホスト名 or IPアドレス
st 上位NTPサーバーの階層
t 階層のタイプ l:local、u:unicast、m:multicast、b:broadcast
when 最後のパケットを受け取ってからの時間(秒)
poll 問い合わせを行う間隔(秒)
reach 到達可能性に関するレジスタ・データ(8進数)
delay 推定遅延(ミリ秒)
offset 偏差補償(ミリ秒)
jitter RMS Jitterの平均値(ミリ秒)