How to Erase Running Configuration in Cisco IOS-XE

ciscocisco-commandscisco-iosrouter

I am using ASR 9k series Routers, which runs IOS-XE advancedmetroipaccess License

I tried erasing NVRAM: and then tried to run copy start run
But it gives me error :

hostname#erase /all nvram:
hostname#copy startup-config running-config
Destination filename [running-config]? 
%% Non-volatile configuration memory invalid or not present

Is there a way to erase running-configuration in IOS-XE,

Reason to erase:

As I use huge number of VRF distinguishers, and when my network changes its Loopback0, I have to change the loopback0's in all the VRFs. For that, I have to first remove the each rd in every vrf which takes lot of time (more than 30 min).

The current method I employ is: first set config-register to 0x2142
then reload the router and again configure the router with new configuration, and set config-register to 0x2102.

Best Answer

If you have erased the startup configuration, then you just reload the router.

Even if you have a valid startup configuration, copying it to the running configuration would not disable any existing running configuration. For example, if your running configuration has something non-default enabled, and your startup configuration does not have that enabled, it would remain enabled when you merge the startup configuration with the running configuration.

The bottom line is that you can erase the startup configuration, then you need to reload the router to start over. It will ask if you want to save the running configuration, but you just choose No.

Related Topic