Network Time Protocol also know as NTP is very essential component on networking devices. When devices are growing on the data center, it is not possible to set time manually on each devices. NTP protocol play major role here while setting the time automatically. There are few benefits of having same time on each devices. It is helpful to troubleshoot device issues such as hardware failures, devices up / down and also identifying the application levels issues by reading the logs file. Here I’m going to show you how to configure time of Cisco router using NTP protocol but remember if you have different Cisco devices running IOS , then the process is same as below. So let’s go through configuring NTP on Cisco .
1) Peering with NTP server
1 |
TestRouter(config)#ntp server 129.6.15.28 prefer |
2) Set NTP to update / sync hardware clock
1 |
TestRouter(config)#ntp update-calendar |
3) Cisco Set the time zone
1 2 3 |
clock timzone <timezone name> <UTC diffrent to your time zone> ex:- TestRouter(config)#clock timezone LK 5 30 |
That’s all , so how to verify whether NTP is working properly.
i) Check ntp status
This will show local clock is synced with the remote NTP server.
1 2 3 4 5 6 7 8 9 |
TestRouter#show ntp status Clock is synchronized, stratum 2, reference is 129.6.15.28 nominal freq is 250.0000 Hz, actual freq is 249.9930 Hz, precision is 2**32 reference time is DA6839AB.FA87B537 (16:29:55.978 LK Fri Feb 12 2016) clock offset is 0.0007 msec, root delay is 0.37 msec root dispersion is 0.11 msec, peer dispersion is 0.06 msec loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000027750 s/s system poll interval is 128, last update was 351 sec ago. TestRouter# |
ii) Check ntp associations
if the the sync is successful, there will be “*” symbol infornt of address entry like below.
1 2 3 4 5 |
TestRouter#show ntp associations address ref clock st when poll reach delay offset disp *~129.6.15.28 .ACTS. 1 99 128 47 0.000 0.713 197.48 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured |
iii) NTP associations in detail
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
TestRouter#show ntp associations detail 129.6.15.28 configured, our_master, sane, valid, stratum 1 ref ID .ACTS., time DA6839A7.30B89877 (16:29:51.190 LK Fri Feb 12 2016) our mode client, peer mode server, our poll intvl 128, peer poll intvl 128 root delay 0.00 msec, root disp 0.00, reach 344, sync dist 0.30 delay 0.00 msec, offset 0.7138 msec, dispersion 66.13 precision 2**29, version 4 org time DA6839AB.CA955500 (16:29:55.791 LK Fri Feb 12 2016) rec time DA6839AB.FA87B537 (16:29:55.978 LK Fri Feb 12 2016) xmt time DA683AAD.9C1DEAFC (16:34:13.609 LK Fri Feb 12 2016) filtdelay = 0.37 0.00 0.44 0.39 0.44 0.41 0.50 0.48 filtoffset = 0.00 0.00 0.03 0.01 0.04 0.01 0.07 0.04 filterror = 0.00 16.00 0.00 0.00 0.00 0.00 0.00 0.01 minpoll = 6, maxpoll = 10 TestRouter# |
iv) Check the time
1 2 3 |
TestRouter#show clock 16:43:15.088 LK Fri Feb 12 2016 TestRouter# |
Troubleshooting the Cisco NTP.
Read official Cisco documention for NTP troubleshooting here
1 comment
ABDALLAH
June 21, 2016 at 8:40 am (UTC 5.5) Link to this comment
SALUT TOUS JE SUIS ENTRAIN DE TRAVAILLER SUR MON MÉMOIRE COMME THÈME
COMMUNICATION UNIFIER DANS UN MILIEU HÉTÉROGÈNE EN UTILISANT ASTERSIK COMME UN SERVEUR SRST. QUELQU’UN PEU M’AIDER A AVOIR CISCO CALLMANAGER POUR VMWARE SUR VOUS PLAIT ? ET AUSSI A TERMINER LE MEMOIRE JE SERAIS RECONNAISSANT POUR L’ETERNITER. MERCI