Erasing Configs On Cisco Routers And Switches:
A CCNA / CCNP Exam Tutorial
By Chris Bryant, CCIE #12933
The best way to prepare for CCNA and CCNP exam success is to work with your own home lab, especially when you're configuring them from the very beginning - when the routers and switches have no preexisting configuration.
But even if you already have your own lab or aren't planning on one right now, there are some things about erasing configs that you better know before stepping into the exam room!
It's easy enough to type "write erase" and "reload", but there are a few details you have to watch if you want your home lab or rack rental devices to act as though they just came out of the box.
The first step is indeed to run the command write erase, and then reload the router. You're going to be prompted with a question before the reload starts, though, and you have to give the right answer .... or your configuration will still be there when you reload!
First, you will be prompted to confirm the erase. Press to accept the default answer of "confirm".
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
Erase of nvram: complete
With the startup configuration erased, it's time to reload the router. This is where the second prompt comes in:
System configuration has been modified. Save? [yes/no]: no
When a Cisco router prompts you with two answers to a question, you've got to type the answer in (or at least the first letter of it). Answer NO to this question and press when prompted to confirm the reload.
The router will then start the reload process. Since there is no startup configuration in NVRAM, the router will prompt you to enter setup mode. You should only answer yes if you have a lot of time on your hands, just want to see what setup mode is like, or practice CTRL-C to get out it! Otherwise, answer NO.
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: n
Would you like to terminate autoinstall? [yes]:y
You'll see quite a few messages after this relating to interface states, and finally you're back at the user exec prompt.
Now you're working with a router that's just like it was when it came out of the box!
For switches such as the 2950, the process is much the same, but you should delete the VLAN.DAT file before reloading the router. This file contains VLAN information and is kept in flash, so it will still be present after a reload.
Erasing the nvram filesystem will remove all files! Continue? [confirm]
Erase of nvram: complete
Delete filename [vlan.dat]?
Delete flash:vlan.dat? [confirm]
Make sure to hit for the two questions regarding the deletion - if you answer "y" instead, the switch thinks you're trying to erase a file named "y"!
After the reload is complete, you'll be prompted to enter setup mode. As you did with the router, enter "N" and begin to configure the router from user exec mode. There's nothing like working with real equipment to prepare for your CCNA and CCNP success, and there's no better practice than configuring routers and switches from the very beginning!
More CCNA, CCNP, and other Cisco Tutorials!
For A Limited Time, Get A FREE CCNA Security Study Package With Any CCNA Or CCNP Study Package or Our Exclusive CCNA On-Demand Boot Camp!
To your success,