NTP : クライアントの設定2025/12/15 |
|
NTP クライアントの設定です。 |
|
| [1] | NTP サーバーの設定と大差ありませんが、NTP クライアントの場合は、他ホストからの時刻同期リクエストを受け付ける必要はないため、[restrict ***] 行が不要になります。 |
|
root@node01:~ #
pkg install -y ntp
root@node01:~ #
vi /etc/ntp.conf # 32行目 : デフォルト設定はコメントにして自身のタイムゾーンの NTP サーバーを追記 #pool 0.freebsd.pool.ntp.org iburst #pool 2.freebsd.pool.ntp.org iburst pool dlp.srv.world iburst
root@node01:~ #
service ntpd enable ntpd enabled in /etc/rc.conf root@node01:~ # service ntpd start Security policy loaded: MAC/ntpd (mac_ntpd) Starting ntpd. # 動作確認 root@node01:~ # ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
dlp.srv.world .POOL. 16 p - 64 0 0.000 +0.000 0.000
*dlp.srv.world 133.243.238.243 2 u 1 64 1 0.307 -3.684 0.021
|
| [2] | NTPStat をインストールすることで、時刻同期の状況を分かりやすく表示できます。 |
|
root@node01:~ #
root@node01:~ # pkg install -y ntpstat ntpstat synchronised to NTP server (10.0.0.30) at stratum 3 time correct to within 74 ms polling server every 64 s |
| Sponsored Link |
|
|