How can you delete configuration of a Cisco Router and Switc..

How can you delete configuration of a Cisco Router and Switch | Blog | Adroit Information Technology Academy (AITA)

How can you delete configuration of a Cisco Router and Switch

After a certain time your network devices should be upgraded or changed, then you have to sell or donate it. But before selling or donating you need to delete all the configuration of those devices. Because your network information should be kept secret.

Cisco Router and Switch are among those network devices which upgraded or changed frequently. In a Router/ Switch the IOS is stored in Flash Memory and configurations in store in NVRAM.

Clear the configuration of your Router

To clear your Cisco router, you have two options, network administrators are familiar with both methods..

The first method involves setting the configuration register to 0x2142. Most admins use this method to recover a password, but you can recover a password and wipe the configuration at the same time.

Follow these steps:

  1. Log on to the router, and enter the privileged EXEC mode by entering enable and then entering the enable password command.
  2. Enter configure terminal to go to Global Configuration Mode.
  3. Enter config-register 0x2142. (This causes the router to ignore the startup configuration on the next reload.)
  4. Enter end, and reload the router by entering reload  at the Router# prompt.
  5. The system will ask whether you want to save the configuration. Enter no, and confirm the reload at the next prompt.
  6. After the router has reloaded, the system will ask whether you want to enter the initial configuration dialog. Enter no.
  7. Change the configuration register setting to 0x2102 by entering enable and configure terminal to go back to Global Configuration Mode and then entering config-register 0x2102.
  8. Enter end, and then enter write memory to overwrite the existing startup configuration with the current blank running configuration.
  9. Enter reload to reload the router and complete the wiping operation.

However, if you already know the password to the router, you can use the second method. Follow these steps:

  1. Log on to your router, and enter the privileged EXEC mode by entering enable and then entering the enable password command.
  2. Enter configure terminal to go to Global Configuration Mode.
  3. Enter config-register 0x2102.
  4. Enter end, and then enter the write erase command to delete the current startup configuration on the router.
  5. Enter reload to reload the router. When the system asks whether you want to save the configuration, enter no.

When the router reloads, it will reset back to the original factory defaults.

Clear the configuration of your Switch

If your Cisco switch runs the CatOS, the procedure to wipe the configuration is relatively quick. Follow these steps:

  1. Log on to your switch, and enter the privileged EXEC mode by entering enable and then entering the enable password command.
  2. Enter clear config all to reset the entire system. You don't need to reload the switch because processing the command wipes the switch. If you've set a boot option, you need to change that option using the set boot command.

If your switch runs Cisco IOS, it maintains a running configuration file and a startup configuration file, both of which you need to clear. Follow these steps:

  1. Log on to your switch, and enter the privileged EXEC mode by entering enable and then entering the enable password command.
  2. Enter write erase, which erases the NVRAM file system and removes all files.
  3. At the prompt, confirm that you want to erase all files.
  4. Enter reload, and enter no when prompted whether to save the configuration. (Otherwise, the switch will reload the current running configuration.)
  5. Confirm that you want to reload the switch, and your switch configuration is almost clean.

It's almost clean, but people forget to clear any VLAN information they've created for their switches. Depending on the hardware version of your switch and the software version of your OS, the command for this varies. It will be discussed in another blog.

Share:

Tags: CatOS VLAN NVRAM Cisco Router Cisco Catalyst Switch 0x2102 0x2142 Flash Memory IOS Cisco CCNA Router# config-register