Reset Router to Factory Defaults
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
Contents
Introduction
This document describes how to restore a Cisco® router to its original factory default settings .
Prerequisites
Requirements
In order to perform the procedures described in this document, you must have enable (also known as privileged EXEC) access on the router.
Components Used
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Conventions
For more information on document conventions, refer to theCisco Technical Tips Conventions.
Instructions to Reset a Cisco Router Back to Factory Defaults
There are two main methods to return a Cisco router to its original factory defaults. These two methods are described next.
Note: To view any information on the commands in this article refer to the Cisco IOS Configuration Fundamentals Command Reference.
Method 1
This method uses theconfig-register 0x2102 command in global configuration mode.
- Issue the show version command to check the configuration register on the router.
The configuration register setting is displayed in the last line of the show version command output and must be set to 0x2102.
If this is not the case, enter the config-register 0x2102 command once in global configuration mode.
If the show version command is issued again, the same line in the command output can have (0x2102 at next reload) appended to the current register setting.
2. Erase the current start-up configuration on the router with thewrite erase c ommand.
3. Reload the router with the reload command. When prompted to save the configuration, DO NOT save .
Once the router reloads, the System Configuration Dialog appears.
The router is now reset to the original factory defaults.
Method 2
This method uses the config-register 0x2142 command in global configuration mode.
Enter the config-register 0x2142 command in global configuration mode.
This causes the router to ignore the start-up configuration on the next reload. If you run a show version again, it has (0x2142 at next reload) appended to the current configuration register setting .
After the router has reloaded, the System Configuration Dialog appears.
Enter noto the question: Would you like to enter initial configuration dialog?
Change the configuration register setting to 0x2102 with the config-register 0x2102 command, entered once in global configuration mode.
Issue the write memory command in enable mode to overwrite the current start-up configuration with the configuration that currently runs.
Reload the router with the reload command in enable mode.
Once the router reloads, the System configuration Dialog appears.
Note: The next configurations are stored in ROMMON and the write erase and/orconfig-register 0x2142 commands cannot reset them to the factory default settings .
memory-size iomem <not default>
Verification
This section provides information you can use to verify that your router has been returned to the factory defaults.
Note: Internal and bug information is only accessible to registered Cisco clients.
show running-config — Use this command to verify that the previous configuration that the router ran has been erased. The output must result in a skeleton configuration. For example, there must be no IP addresses or descriptions configured under any interface on the router, no hostname or settings particular to your environment.
show version — Use this command to verify that the configuration register is set to the default value of 0x2102.
How to Reset a Cisco Router or Switch to Factory Default
What if we forget the login credentials of our Cisco routers or switches and we are not able to log in to make changes in configuration? To reset the Cisco router or switch is one of the quickest ways to resolve the issue. It will make a new and blank startup configuration file, and it will show you the setup wizard for a quick configuration of the router.
But what if we want to retain the existing configuration on the router? Another solution is to perform a password recovery on the router. We will discuss how to restore our Cisco routers and switches to the factory defaults and also how to implement password recovery on them.
Factory Reset on Cisco Router or Switch IOS
The following procedure is the steps when we are going to factory reset a Cisco router.
1. In the global configuration mode, create a hostname first on the router as we will use it for verification if the router is already reset into the factory settings.
2. Verify the configuration by using one of the following commands.
3. Save the configuration using the ‘copy running-config startup-config’ command.
4. Resetting the Cisco router to factory default involves erasing the NVRAM.
5. Reload the Cisco router to complete resetting to the factory defaults, and the startup wizard or initial system configuration dialog will appear.
6. Verify if the Cisco router is reset to factory default by checking if “hostname Router 1” is disappeared and changed to default.
Password Recovery on Cisco IOS
Before we proceed with password recovery, we will take a look first at the configuration register. We can use the ‘show version’ command to check the configuration register setting on our device. Configuration Register is a special 16 bits value that can be configured in Cisco routers. It is mainly used to determine how the router boots, to determine boot options, and to set console speed. The following are the most commonly used configuration register settings:
- config-register 0x2102 – boot normally (default configuration register setting)
- config-register 0x2120 – boot into ROM Monitor (ROMMON)
- config-register 0x2142 – ignore contents of NVRAM (startup-configuration)
The following procedure is the steps when we are going to recover the forgotten enable password or enable secret command configured in our Cisco router or switch.
1. Power ON the router.
2. Press the break sequence (ctrl-Break) while the router is initializing to break into ROMMON prompt.
3. Follow this command, confreg 0x2142, to ignore the startup-configuration and reset or reload the router.
4. After reboot, it will not ask you the secret password and will proceed to the setup wizard or initial system configuration dialog, as it booted up with a blank configuration.
5. The startup-configuration is still there with the full configuration, including the unknown enable secret, but the router does not use it when it boots. Enter a new enable secret in global configuration mode to overwrite the old one. This will go into the running-config.
6. In the global configuration mode, configure the configuration register back to default by entering the ‘config-register 0x2102’ router command, so the router will boot normally on the next restart.
7. Save the configuration. This will merge the new enable password into the existing startup-configuration.
8. Reboot the router using the ‘reload’ command and see that the secret password is changed to the one we configured earlier.
Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.
We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training:
Сброс Cisco
Для того, чтобы сбросить конфигурацию роутера или коммутатора Cisco, достаточно в консоли набрать команду:
И затем перезагрузить устройство.
Но задача в разы усложняется, если Вы, например, забыли пароль и зайти на роутер Cisco или коммутатор Cisco не получается.
В этом случае, сброс конфигурации Cisco делается из режима ROMMON:
1. Подключаемся консольным кабелем к устройству.
2. Перезагружаем устройство.
3. Ждем после загрузки где-то 30-40 секунд и нажимаем клавишу Break или комбинацию Ctrl + Break .
Если вдруг не срабатывает — возможно проблема в программе-клиенте. Например, в minicom — вместо break используется комбинация Ctrl + a f , в Teraterm — комбинация Alt + b.
4. Итак, мы попали в Rommon. Набираем команду confreg 0x2142:
Регистр 0x2142 указывает маршрутизатору, что необходимо производить загрузку IOS без загрузки конфигурационного файла, где храниться пароль.
Теперь перезагружаем устройство командой reset
Все, после перезагрузки устройство запуститься с чистым конфигурационным файлом.
Для коммутаторов Cisco серии 2900XL/3500XL, 2940, 2950/2955, 2960, 2970, 3550, 3560 и 3750 процедура сброса конфигурации несколько иная:
1. Подключаемся консольным кабелем к коммутатору Cisco.
2. Перезагружаем коммутатор и ждём.
Когда начнется загрузка, зажимаем кнопку MODE на передней панели устройства. Смотрим, на индикатор SYST — он перестаёт мигать и начинает просто светится. Опускаем кнопку MODE — индикатор SYST начнет снова мигать. Смотрим в консоль — там должно быть вот такое приглашение:
Вводим по-очереди команды:
В команде dir flash: не забудьте в конце поставить «:» — этой командой выводим содержимое flahs-памяти.
Там мы должны увидеть config.text — это файл конфигурации коммутатора Cisco. Теперь надо его переименовать:
rename flash:config.text flash:config.old
Теперь даем команду к дальнейшей загрузке устройства:
Начнётся загрузка коммутатора Cisco. Ждем. Когда появиться запрос на автоконфигурацию коммутатора — нажимаем N и ждём приглашение коммутатора.
Все, коммутатор с чистым конфигом — можно настраивать.
Как сбросить настройки роутера Cisco
И восстановить пароль и настройки по умолчанию
Если ваш роутер Cisco работает плохо или вы забыли свой пароль, вы можете произвести сброс, чтобы вернуть его к значениям по умолчанию.
Существует два довольно простых способа сделать это:
- Вариант 1: сброс настроек через интерфейс администратора
- Вариант 2: нажатие кнопки сброса
После сброса роутера Cisco все текущие настройки также будут потеряны. Учитывайте это перед выполнением сброса.
Вариант 1: сброс настроек через интерфейс администратора
Если ваша конфигурация роутера Cisco продолжает работать, и вам известен пароль администратора, вы можете воспользоваться этим вариантом.
- У вас есть доступ к сети Cisco (по WiFi или кабелю).
- Вы знаете IP-адрес роутера IP-адреса по умолчанию для роутера Cisco
- Вы знаете пароль к роутеру Пароли по умолчанию для роутера Cisco
Когда у вас будет все необходимое из контрольного списка, можно продолжать выполнять сброс вашего роутера Cisco.
- Откройте предпочитаемый веб-браузер (Firefox, Chrome, Safari, Internet Explorer, . ).
- Перейдите по адресу http://192.168.1.1 .
Частые IP-адреса для роутеров Cisco:- 192.168.1.1
- 192.168.0.1
- 192.168.100.1
- Используя имя пользователя и пароль, войдите в устройство. Наиболее частой комбинацией для роутеров Cisco является cisco / cisco .
- В зависимости от модели вашего роутера Cisco страница сброса может выглядеть немного по-другому. Найдите следующее:
- Administration > Reboot > Reboot To Factory Default
- Нажмите на опцию сброс/восстановление до заводских настроек (factory reset / restore) и подтвердите, если это необходимо.
- Подождите некоторое время, пока роутер перезагрузится.
Вариант 2: нажатие кнопки сброса
Если вы не помните пароль к своему роутеру Cisco или он не работает, этот вариант решения проблемы должен сработать.
- Физический доступ к роутеру/модему Cisco.
- Скрепка или аналогичный острый предмет.
(требуется не всегда, в зависимости от имеющейся модели Cisco)
Шаг 1: Найдите кнопку сброса
Кнопка сброса обычно спрятана внутри небольшого отверстия, но иногда она также торчит наружу как обычная кнопка.