Downloading config file from TFTP does not erase previous config

Unanswered Question

Hi,

When I download file from TFTP to runn-conf, it does not overwrite the previous running-config. I have a expect script do the doing following step:

1. UPload two different X1 & X2 config file

2. Downloading X1 config from TFTP to running-conf

3. wait 5 minutes, then download X2 config from TFTP (It does not erase the X1 config)

4. GO to Step 1


I am trying to run this script on C2621XM, 7204, & 3745 routers

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Richard Burts Wed, 03/07/2007 - 11:48
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Atul


It is the design of IOS that when you copy into running config that it is an additative process (the new overlays the old but does not erase the old) rather than a complete replacement process. When you copy to startup config that is an erase the old/copy in the new. But running config does not do that.


The IOS will behave this way on any platform on which you run it.


HTH


Rick

steve.busby Wed, 03/07/2007 - 12:12
User Badges:
  • Silver, 250 points or more

I believe you could do a "copy startup-config running-config" to make the necessary changes.


HTH

Steve

Richard Burts Wed, 03/07/2007 - 13:29
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Atul


I do not understand your comment about not being able to override the running-config. You certainly can override the running config if your script copies changes to the running config. If an interface has an IP address and you want it to not have an IP address, you can put no ip address into your script and the interface will not have an IP address. If there is an access list X and you want the access list to not exist in the config then you can put no access-list X into your script and it will remove the access list.


Perhaps if we understood more about what you are trying to accomplish we could make suggestions about how to do it.


HTH


Rick

Amit Singh Wed, 03/07/2007 - 21:12
User Badges:
  • Cisco Employee,

Atul,


No matter how many time you copy the new config to the router's running config, it will always override the changes that you have done. It will show you the changes when your do " show run". It will not save the changes to startup-config untill you save it using " wr mem" or "copy start run ".If you reload the router without saving the changes as mentioned above it will always boot with the old config saved in the NVRAM.


-amit singh


Hi Rick,

I am changing a configuration from non-vpn to VPN & I need to change CE's, PE's, & P's routers configuration. On PE & CE routers, I add logical interface for VRF. I use telnet to change the configuration on router & i will loose telnet connection, if I use "no router ospf..." or "no address-family...". See PE configuration attachments.

1. I start with normal network (it has 6 routers)

2. After 5 minutes, I change nomal network to VPN.

2a. I telnet to ce, PE, & P router & download vpn configuration from TFTP server.(as you said in previous email that it will not override the running-config, & it is behaving that way)

3 After 10 minutes, change back to normal network.




Attachment: 
mheusinger Thu, 03/08/2007 - 08:25
User Badges:
  • Green, 3000 points or more

Hi,


if you copy a new config to startup-config (NVRAM) there is no change applied to the running-config and vice versa.

If you copy to running-config (either from startup or from TFTP), then there will be a MERGE, i.e. the same behaviour as typing one command after the other. If you remove your "telnet IP" during this process, the config changes will only be applied up to this point.

So you need to think ahead about those changes and make sure this does not happen. This is somewhat tricky at times, but can be done.


Regards, Martin

Actions

This Discussion