01-10-2011 11:22 PM - edited 03-04-2019 11:01 AM
Hi All,
I have a requirement. One of my customer wants to keep two configuration file in the router and whenever he wants he may switch the configuration file.
Is it possible?. If so kindly let me know the details.
Thanks & Regards
R.MADHANKUMAR
Hyderabad.
Solved! Go to Solution.
01-10-2011 11:54 PM
Hi,
you can either
a) copy a file to your startup config and reload the router
b) use the configure replace command, see
http://www.cisco.com/en/US/docs/ios/12_3t/12_3t7/feature/guide/gtrollbk.html
for details. Just be careful when replacing the running config, you might lose routing to the URL you are copying from, so IMHO the safest way is to keep the source file on your router flash memory (or to copy it there from your FTP/TFTP server before starting the replacement).
HTH,
Milan
01-10-2011 11:27 PM
Hi Madhan,
Usually I save multiple config files in the flash disk of my router.
Whenever I need to change the config I will do a write erase and reload
the router without literally empty configs. Then copy from flash to
running config. I hope you know this. If the requirement is not to
reload the router but to switch configs on fly I am not sure. May be
others in this forum might know.
Thanks,
Madhu
01-10-2011 11:54 PM
Hi,
you can either
a) copy a file to your startup config and reload the router
b) use the configure replace command, see
http://www.cisco.com/en/US/docs/ios/12_3t/12_3t7/feature/guide/gtrollbk.html
for details. Just be careful when replacing the running config, you might lose routing to the URL you are copying from, so IMHO the safest way is to keep the source file on your router flash memory (or to copy it there from your FTP/TFTP server before starting the replacement).
HTH,
Milan
01-11-2011 01:20 AM
Thanks for both of you giving me valuable information.
Thanks & Regards
R.MADHANKUMAR
01-12-2011 01:19 AM
Hi
I saw Milan has pointed out an excellent example. Here is how I did this for a customer.
host#dir
Directory of disk2:/
1 -rw- 24366316 Jan 11 2000 03:26:52 +01:00 c7200-is-mz.124-12.bin
2 -rw- 3908 Apr 3 2008 14:06:52 +02:00 32out-confg
3 -rw- 3882 Apr 3 2008 14:08:12 +02:00 16out-confg
host#more disk2:32out-confg
!
< removed>
!
username abc privilege 15 nopassword
username abc autocommand menu abc
!
< removed>
!
menu abc title ^CC
32M is running now
^C
menu abc prompt ^C
make a choice
^C
menu abc text 1 16M
menu abc command 1 conf replace disk2:16out-confg
menu abc text 2 32M
menu abc command 2 conf replace disk2:32out-confg
menu abc text 3 show policy
menu abc command 3 show policy-map int g0/1.541
menu abc text 4 exit
menu abc command 4 exit
menu abc command 5 menu abc1
menu abc command 76 menu-exit
menu abc command 6 exit
menu abc command 7 exit
menu abc command 8 exit
menu abc command 10 exit
menu abc command 0 exit
menu abc default 5
menu abc line-mode
menu abc single-space
!
menu abc1 text 1 choose an alternativ between 1 and 4
menu abc1 command 1 menu-exit
menu abc1 command 2 menu-exit
menu abc1 command 3 menu-exit
menu abc1 command 4 menu-exit
menu abc1 default 1
!
/Mikael
Don't forget to have an valid config in startup-config otherwise router will not get online after a powerfailure.
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