As we discussed about NTP in last post, here I want to show you NTP basic commands and configuration examples for Maipu routers.
Basic NTP Commands
Command | Description | Configuration Mode |
ntp master [stratum-number] | *To configure the NTP server and specify the stratum number | config |
ntp server [vrf vrf-name] ip-address | domain-name [version version][key key-number] [source interface-name] | *To configure the NTP client and specify the server address, version, key and source interface. | config |
ntp authenticate | *To authenticate the NTP clock source | config |
ntp authentication-key key-number md5 key | *To configure the NTP authentication key | config |
ntp trusted-key key-number | *To configure the trusted key of the NTP client | config |
ntp access-group peer access-list-number | To configure the NTP access control list | config |
ntp source interface-name | To specify the NTP source interface | config |
ntp enable | To enable the NTP function | config |
no ntp | To disable the NTP and clear the configuration | config |
Router-1 configuration:
Command | Description |
router(config)#ntp master | To enable the NTP server |
router(config)#ntp authentication-key 1 md5 maipu | To configure the authentication key as 1 and key content as maipu |
Router-2 configuration:
Command | Description |
router(config)#ntp authentication-key 1 md5 maipu | To configure the authentication key as 1 and key content as maipu |
router(config)#ntp trusted-key 1 | To configure the trusted key as 1 |
router(config)#ntp authenticate | To enable the NTP authentication function |
router(config)#ntp server | To configure the server address as |
This above example is with MD5 authentication. We can do simple configuration also with MD5. Just configure ntp master in server router and ntp server x.x.x.x (NTP server IP) in client Router.
Command | Description |
show ntp status | To display the current NTP status, including stratum and reference time |
show clock | To display the current system time and check whether the time is synchronized correctly |
Monitoring Command Example
show ntp status
Displayed Result | Description and Analysis |
Current NTP status information Clock is synchronized, stratum 3, reference is 128.255.40.145 reference time is BC | The clock is synchronized. The reference source address is 128.255.40.145. The time is 00:33: 18, Jan. 1, 2011. |
show clock
Displayed Result | Description and Analysis |
UTC SAT JAN 01 00:37:07 2011 | The system time is 00:37:07, Jan 1, 2011. |
Debugging Commands
Command | Description |
(no) debug ntp events | packet | To enable/disable the NTP event and packet debugging switch |
Hope this example will help you for NTP configuration reference.
For any feedback, Plz put comment with your mail id…