Open In App

How To Delete Configuration of a Cisco Router and Switches?

Last Updated : 23 Jun, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

In a Cisco network, it is important to periodically delete the configuration of routers and switches to ensure that the network is running smoothly and efficiently. In this article, we will explain how to delete the configuration of a Cisco router and switch using the command-line interface (CLI).

Before you begin, make sure you have the following:

  • Access to Cisco CLI. You can access CLI through the console port of the router or switch or via a Telnet or SSH connection.
  • The login credentials for the router or switch.

Set-Up

  • Connect to a Cisco router or switch using a console port, a Telnet, or SSH connection.
  • Log in to the router or switch using your login credentials.

Implementation

To delete the configuration of a Cisco router or switch, follow these steps:

Step 1: Login to the router by typing in the following command:

router> en

Step 2: Delete the configuration of the router or switch by typing the following command:

router# erase startup-config

This will delete the configuration stored in the startup-config file. The startup-config file is where the configuration of the router or switch is stored when the device is powered off.

Step 3: To delete the configuration of the running-config file, which is the current configuration of the router or switch, type the following command:

router# erase running-config

This will delete the current configuration of the router or switch and reset it to the default configuration.

Step 4: If you want to delete both the startup-config and running-config files, you can use the following command:

router# write erase

This will delete both the startup-config and running-config files and reset the router or switch to the default configuration.

Step 5: reboot, type in the following command:

route# reload

Key Terms

There are several subtopics related to deleting the configuration of a Cisco router or switch, including:

  1. Backup and restore: It is important to back up the configuration of the router or switch before deleting it. This can be done using the “copy” command. You can also restore a previously backed-up configuration using the “copy” command.
  2. Factory reset: You can reset a Cisco router or switch to its factory default configuration by using the “write erase” command followed by the “reload” command. This will delete the startup-config and running-config files and reset the device to its default configuration.
  3. Configuration files: The configuration of a Cisco router or switch is stored in two files: the startup-config file and the running-config file. The startup-config file is the configuration that is loaded when the device is powered on, while the running-config file is the current configuration of the device.

Conclusion

Deleting the configuration of a Cisco router or switch can be useful if you want to reset the device to its default configuration or troubleshoot problems in the network. By following the steps outlined in this article, you can easily delete the configuration of a Cisco router.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads