Showing results for 
Search instead for 
Did you mean: 
Level 7

Config Template - NTP

Hi Team,

I need to create a config change template to automatically add the correct NTP servers and remove the incorrect ones configured on the Cisco routers. I can create the script to add the new NTP servers but I am not able to remove the wrong ones.

For example : 

Problem :

Below are the NTP servers configured on two Cisco routers :

Router 1 :

ntp server

ntp server

ntp server

Router 2 :

ntp server

ntp server

ntp server

The correct ntp servers are and

Requirement :

I want to create a config change template in which I want to add the correct ntp servers ( and and remove all the others. I will run this template on all the Cisco routers so that after this all will now have same and only these 2 NTP servers.



0 Kudos
1 Reply
Level 17

Re: Config Template - NTP

Just issue a 'no ntp' before you add in the new ones. So your script will be

no ntp

ntp server

ntp server

That should do it.