12-23-2012 10:20 AM - edited 03-07-2019 10:45 AM
Hi,
I was thinking of scheduling an eem script to reload a fixed config file every 2 hours. This way, you could experiment with commands and come back to the config file you wish after the research is done. The thing is that you might want to save your research, so this fixed config file should be different than the nvram:startupconfig, thus being another file stored on the nvram, or any other place, like flash or tftp.
This way, during the 2-hour interval, you will be able to start from your startup-config, but when the interval is over, a reload will be performed and the fixed config file will be loaded, thus leaving the running-config the same way it was before the research.
I think the solution for this would be the implementation of an eem script scheduler, but I do not know how to do it.
I guess I must use some of this commands, but I don't know how to set ip up.
event manager applet Schedule-2h
event timer cron name Test cron-entry "0 0-23/2 * * *"
action 1.0 syslog priority warnings msg "EEM runs every 2h"
action 1.1 cli command "enable"
action 1.2 cli command "configure replace flash:myconfig force"
Any help would be appreciated.
Kind Regards,
12-24-2012 10:03 AM
Hi Pedro,
I've built a simple lab with GNS3 and I think I achieved what you were trying to do. In a lab I set up timer on every 5 min and it worked for me. Perhaps it could work with any timer you set.
Here is simple config:
event manager applet Schedule-2h
event timer cron cron-entry "* */2 * * *"
action 1 syslog priority warnings msg "EEM runs every 2h"
action 2 cli command "enable"
action 3 cli command "configure replace flash:myconfig force" pattern "Enter Y if you"
action 4 cli command "Y"
Try and let me know if you have any issues.
Note. My configuration was very simple like changed IP addresses and hostname. I didn't try with complex changes.
Hope it will help.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide