excusememeister
Programmer
- Mar 6, 2008
- 4
I am trying to programmatically automate the reading/writing of the startup and running configurations of a Cisco PIX 501 using software version 6.3.
I have been able to successfully read/write the running configuration (using write net and configure net) but have not determined the best way to read/write the startup configuration.
At present, I'm thinking that the best techniques for working with the startup configuration are:
* Read it by running 'show startup-config' and capturing the output. I don't like this solution a lot because it feels like I could lose data doing this (although in practice it might be okay.)
* Write it by making changes to the running configuration and then making the changes permanent. But this isn't ideal in that if I want to preserve the running configuration, I need to make a backup of it first and then restore it after setting the startup configuration.
I've found that doing this is easier on other Cisco devices (just copy tftp://[ipaddr]/startup-config startup-config and vice versa), but the copy command works differently on at least this version of the PIX.
Any suggestions for how I can read/write the startup configuration would be appreciated.
I have been able to successfully read/write the running configuration (using write net and configure net) but have not determined the best way to read/write the startup configuration.
At present, I'm thinking that the best techniques for working with the startup configuration are:
* Read it by running 'show startup-config' and capturing the output. I don't like this solution a lot because it feels like I could lose data doing this (although in practice it might be okay.)
* Write it by making changes to the running configuration and then making the changes permanent. But this isn't ideal in that if I want to preserve the running configuration, I need to make a backup of it first and then restore it after setting the startup configuration.
I've found that doing this is easier on other Cisco devices (just copy tftp://[ipaddr]/startup-config startup-config and vice versa), but the copy command works differently on at least this version of the PIX.
Any suggestions for how I can read/write the startup configuration would be appreciated.