cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3765
Views
0
Helpful
2
Replies

difference between RELOAD and CONFIGURE REPLACE

Hi,

I am trying to understand the difference between both commands and I just can't get it.

When you type  RELOAD  the router is restarted, loading the IOS according to the location specified by the startup-config with the command boot system and in turn loading the startup-config from the nvram.

On the other hand, when you type CONFIGURE REPLACE nvram:startup-config   you are loading the startup-config without reloading the IOS.

My questions about this are the following:

1. The second option seems much faster than the first one. Are you getting the same results with both options?

2. In order to start afresh regarding the startup-config, you could either type:  "erase startup-config  --> reload"  or "write erase --> configure replace nvram:startup-config".  Are you also getting the same results?

3. Could I store any other file in the nvram (apart from startup-config) and use configure replace to load that file when needed?

Kind Regards,

2 Replies 2

Peter Paluch
Cisco Employee
Cisco Employee

Hi Pedro,

1. The second option seems much faster than the first one. Are you getting the same results with both options?

Theoretically, you should. However, there are some commands whose effect is visible only after restart, such as setting the allowed range of dynamically assigned MPLS labels. Also, to be completely frank, sometimes the configure replace is unable to modify the running-config so that it is identical to the file specified in the configure replace command, as the IOS may have problem un-setting a feature that has been set beforehand. So in cases, a device reload is the only reliable way to reset the configuration to its planned state.

2. In order to start afresh regarding the startup-config, you could  either type:  "erase startup-config  --> reload"  or "write erase  --> configure replace nvram:startup-config".  Are you also getting  the same results?

Absolutely not, these two approaches are strongly different. The first sequence, i.e. erase startup-config followed by reload will result in the router booting into a clean factory configuration. However, note that a clean factory configuration is not an empty configuration. When you do show running-config, you see a set of commands being present in the running-config - they have been added there by IOS itself once it booted up and found out that the startup-config is empty.

The write erase command in your second sequence is the same as erase startup-config - it is just an older version of the same command. However, the configure replace nvram:startup-config command after the write erase will wreak havoc with your configuration: because the startup-config is empty, the configure replace will try to make the running-config empty as well. As I explained above, the factory default configuration is not an empty configuration. Running the configure replace in this case will result in seriously breaking the running-config, deactivating things you did not even know they exist or which are active.

The configure replace should be always run only with a file that holds a complete save of the running-config, even if the running-config was a factory-default. Running configure replace with a file that holds only a partial configuration should never be performed, as it will seriously break the resulting configuration.

3. Could I store any other file in the nvram (apart from startup-config)  and use configure replace to load that file when needed?

Yes, this is possible, as long as that file is again a complete save of a running-config.

Please feel welcome to ask further!

Best regards,

Peter

Hi Peter,

Thanks for your early reply.

As per your answer, I understand that it is more convenient to use "reload" than "configure replace".

As a follow up, I would like to reload a given configuration (not the factory default). So I have the following questions:

4. How can I get that a router starts up with a given configuration file (let's name it "myconfig")? I mean, after performing a "reload", the router should load "myconfig" instead of loading the "startup-config"?

5. And to make it more difficult I would like the router to load from "myconfig" in a periodic basis, for example ,everyday at 8:00am thus getting the same configure file at the beginning of every day, but reloading from the startup-config between the interval limits (in this case, being able to modify the running-config and save those changes for the day, and reloading the router with those changes), but at the end of the time interval, automatically reloading the router and loading "myconfig" file.

6. Do you know what the command is to load a specific configuration file? I guess it must be similar to the command boot system to load the IOS you want from the location you want, but I don't know.

7. I guess the solution for this would be an eem script schedule, something like the following. What do you think?

event manager applet Test-24

event timer cron name Test cron-entry "0 8 * * *"

action 1.0 syslog msg "Start afresh!!!"

action 1.1 reload in 24:00

action 1.2 cli command "enable"

action 1.3 cli command "conf t"

action 1.4 cli boot ............ flash:myconfig

8. This is written as an eem applet. But I think the applets are saved in the configuration files, so if I erase the startup-config, the applet will be deleted, so it would not take effect when the time interval ends. So I guess the solution for this would be to save as a script in the flash memory. What do you think?

9. And last one, do you know if it is possible to run an eem script from a different location than the flash? I tell you this as I am not sure if you can save and run an eem script  from a tftp server?

Thanks in advance for your help, and I hope not to bother you too much

Kind Regards,

Review Cisco Networking products for a $25 gift card