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
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.
Do I need to reload the router after copying from TFTP to start-up ?
I cannot believe cisco does not have the feature to override the running-config like Juniper.
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.
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.
IT IS NOT TRUE. It will not override the running-config. My option is to copy to startup & reload the router.
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.
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.