This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

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 1.1.1.1

ntp server 3.3.3.3

ntp server 4.4.4.4

Router 2 :

ntp server 1.1.1.1

ntp server 3.3.3.3

ntp server 5.5.5.5

The correct ntp servers are 1.1.1.1 and 2.2.2.2.

Requirement :

I want to create a config change template in which I want to add the correct ntp servers ( 1.1.1.1 and 2.2.2.2) 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.

Thanks

-AM