以下のコマンドでNTPサーバーの設定が可能です。また、設定したNTPや時刻関連の確認のコマンドも記載します。
≪NTP設定コマンド≫
Router> configure terminal
Router(config)# ntp server ntp.nict.jp (※”ntp.nict.jp”は、NTPサーバーです。IPアドレスでも設定可能です。)
Router(config)# write
≪NTPサーバー設定確認≫
Router(config)# show ntp server
NTP active : yes
NTP server : 192.168.1.254
Router(config)#
≪NTPからの時刻手動取得≫
Router(config)# ntp sync
※ 成功時は、何も表示されません。
Router(config)# ntp sync
※ エラー時は、以下が表示されます。
% Do NTP update has failed.
retval = -16013
ERROR: Do NTP update has failed.
≪時刻に関するステータス≫
Router(config)# show clock status
timezone: 09:00
daylight saving:
active : no
duration: Jan 1 Mon 12:00/Jan 1 Mon 12:00
offset : 1
≪時刻確認≫
Router(config)# show clock time
current time: 11:28:59 GMT+09:00
ZYX0180
