cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
868
Views
6
Helpful
17
Replies

EEM Script to fix Cisco router NTP server drift

s.maxina1
Level 1
Level 1

Hi All.

for some reason i need to configure cisco router as a ntp server( ntp master command).  But per 24 hours, it will be drifted about 25 seconds which i need to fix it. i want to execute an eem script so that at clock 00:00:00, add 25 seconds to router clock. 
Any idea?

note: at this time, i dont wnat to use external NTP Server.

thanks.

17 Replies 17

Leo Laohoo
Hall of Fame
Hall of Fame

A Cisco device, regardless if it is a router, switch, FW, WLC, etc, is not suitable to be an "NTP master" because it does not know how to keep time and does not have a facility how to keep time "accurately".  It will drift.  Guaranteed. 

The best way is to synchronize the router's NTP process with a reputable NTP source, preferably Stratum 1 or 2.  

There are two ways around this: 

1.  Reach out to the internet and find several Stratum 1 or Stratum 2 and synchronize with them.  

2.  Build a Stratum-1, GPS-based NTP server using a humble Raspberry Pi.  

pieterh
VIP
VIP

i agree with the last post from @Leo Laohoo ,
But I can agree with arguments, NOT to use servers on the internet
if you also don't want to use a Raspberry Pi, and stick with Cisco equipment ,
you may consider a Cisco mobile router and sync with the mobile network?

For less than US$250 GPS-based Raspberry Pi solution is the cheapest of options.

Still, the best (platinum-plated) solution is to get a dedicated GPS-based NTP server. 

Forcing a Cisco router to do GPS-based NTP with EEM/TCL is not an ideal because the script can/will get "stuck" due to bugs in the firmware.