Inleiding
Dit document beschrijft het proces voor het herstellen van wachtwoorden in Cisco IOS® en Cisco IOS® XE Routers.
Voorwaarden
Vereisten
- Dit document is van toepassing op Cisco-routers uit de ISRG2-, ISR4000-, ASR1000- en ISR1000-familie.
Het proces kan worden gewijzigd voor routers met verschillende Cisco IOS- en Cisco IOS XE-families.
- Als u een wachtwoordherstel wilt uitvoeren, moet u een verbinding met de apparaatconsole hebben.
Opmerking: de externe verbinding met het apparaat (SSH of Telnet) kan niet worden gebruikt om het wachtwoordherstelproces uit te voeren. Als de terminalserver wordt gebruikt voor de consoleverbinding, kan het proces niet werken. Directe consoleverbinding wordt aanbevolen.
- U moet toegang tot of beschikbaarheid van een fysiek apparaat hebben om de stroombron van het betreffende apparaat op afstand te beheren.
- U moet een Terminal Emulator gebruiken om een break-sequentie te verzenden.
Opmerking: Sommige pc-toetsenborden hebben de onderbrekingssleutel, deze kan worden gebruikt om het signaal te verzenden.
Gebruikte componenten
De informatie in dit document is gebaseerd op de volgende software- en hardware-versies:
- Router ISR4331 met Cisco IOS XE 16.12.4
- Putty terminal sessie release 0.71
De informatie in dit document is gebaseerd op de apparaten in een specifieke laboratoriumomgeving. Alle apparaten die in dit document worden beschreven, hadden een opgeschoonde (standaard)configuratie. Als uw netwerk live is, moet u zorgen dat u de potentiële impact van elke opdracht begrijpt.
Achtergrondinformatie
Deze stappen kunnen worden gebruikt om gebruikersnaam- en wachtwoordreferenties te herstellen en wachtwoord in te schakelen.
In de basis van de huidige apparaatconfiguratie kan het wachtwoord worden uitgepakt of gewoon worden vervangen door een nieuw wachtwoord.
Cisco IOS en Cisco IOS XE Routers slaan de configuratie op in startup-config en running-config.
De opstartconfiguratiebestanden worden standaard opgeslagen in het NVRAM en de actieve configuratie (werkelijke apparaatconfiguratie) wordt opgeslagen in het DRAM.
Het hoofddoel van het wachtwoordherstelproces is om het apparaat op te starten met een standaardconfiguratie en zodra er toegang is tot het apparaat, de huidige configuratie laden en de referenties wijzigen.
Opmerking: Als de router is geconfigureerd zonder service-wachtwoordherstelfunctie, kan het wachtwoordherstel niet worden uitgevoerd. Deze configuratie kan worden geïdentificeerd terwijl het apparaat wordt opgestart. U kunt dit document bekijken om meer informatie te krijgen over de functie Geen servicewachtwoord herstellen.
Wachtwoordherstel in Cisco IOS- en Cisco IOS XE-routers
Stap 1. Start het apparaat opnieuw op. U moet het toestel opnieuw opstarten vanaf de stroombron/switch omdat u geen toegang hebt tot het toestel via de opdrachtregel.
Stap 2. Terwijl het apparaat opstart, moet u de onderbrekingsreeks uitgeven.
In het geval van Putty, navigeert u naar Special Command > Break optie, zoals weergegeven in de afbeelding.

- Je moet meerdere break-signalen verzenden. Het onderbrekingssignaal wordt herkend nadat de POST is gepasseerd en vlak voordat het Cisco IOS klaar is om op te starten:
Initializing Hardware ...
Checking for PCIe device presence...done
System integrity status: 0x610
Rom image verified correctly
System Bootstrap, Version 16.12(2r), RELEASE SOFTWARE
Copyright (c) 1994-2019 by cisco Systems, Inc.
Current image running: Boot ROM1
Last reset cause: LocalSoft
ISR4331/K9 platform with 4194304 Kbytes of main memory
........
Located isr4300-universalk9.16.12.04.SPA.bin
################################################################################
Failed to boot file bootflash:isr4300-universalk9.16.12.04.SPA.bin
.......
rommon 1 >
Stap 3. Log in op het apparaat. In de modus Rommon moet u het configuratieregister configureren op 0x2142 om op te starten bij de volgende herlading met de standaardconfiguratie.
U kunt opnieuw laden met de opdracht Reset. Je moet het apparaat laarzen zoals gewoonlijk.
rommon 1 > confreg 0x2142
You must reset or power cycle for new config to take effect
rommon 2 > reset
Resetting .......
Initializing Hardware ...
Checking for PCIe device presence...done
System integrity status: 0x610
Rom image verified correctly
System Bootstrap, Version 16.12(2r), RELEASE SOFTWARE
Copyright (c) 1994-2019 by cisco Systems, Inc.
Current image running: Boot ROM1
Last reset cause: LocalSoft
ISR4331/K9 platform with 4194304 Kbytes of main memory
........
Located isr4300-universalk9.16.12.04.SPA.bin
################################################################################
Package header rev 3 structure detected
IsoSize = 609173504
Calculating SHA-1 hash...Validate package: SHA-1 hash:
calculated 9E1353EB:8A02B6C4:C7B841DC:7A78BA24:5D48AA9B
expected 9E1353EB:8A02B6C4:C7B841DC:7A78BA24:5D48AA9B
RSA Signed RELEASE Image Signature Verification Successful.
Image validated
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco IOS Software [Gibraltar], ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.12.4, RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2020 by Cisco Systems, Inc.
Compiled Thu 09-Jul-20 21:44 by mcpre
This software version supports only Smart Licensing as the software licensing mechanism.
PLEASE READ THE FOLLOWING TERMS CAREFULLY. INSTALLING THE LICENSE OR
LICENSE KEY PROVIDED FOR ANY CISCO SOFTWARE PRODUCT, PRODUCT FEATURE,
AND/OR SUBSEQUENTLY PROVIDED SOFTWARE FEATURES (COLLECTIVELY, THE
"SOFTWARE"), AND/OR USING SUCH SOFTWARE CONSTITUTES YOUR FULL
ACCEPTANCE OF THE FOLLOWING TERMS. YOU MUST NOT PROCEED FURTHER IF YOU
ARE NOT WILLING TO BE BOUND BY ALL THE TERMS SET FORTH HEREIN.
Your use of the Software is subject to the Cisco End User License Agreement
(EULA) and any relevant supplemental terms (SEULA) found at
http://www.cisco.com/c/en/us/about/legal/cloud-and-software/software-terms.html.
You hereby acknowledge and agree that certain Software and/or features are
licensed for a particular term, that the license to such Software and/or
features is valid only for the applicable term and that such Software and/or
features may be shut down or otherwise terminated by Cisco after expiration
of the applicable license term (for example, 90-day trial period). Cisco reserves
the right to terminate any such Software feature electronically or by any
other means available. While Cisco may provide alerts, it is your sole
responsibility to monitor your usage of any such term Software feature to
ensure that your systems and networks are prepared for a shutdown of the
Software feature.
All TCP AO KDF Tests Pass
cisco ISR4331/K9 (1RU) processor with 1694893K/3071K bytes of memory.
Processor board ID FLM1922W1BZ
3 Gigabit Ethernet interfaces
32768K bytes of non-volatile configuration memory.
4194304K bytes of physical memory.
3223551K bytes of flash memory at bootflash:.
0K bytes of WebUI ODM Files at webui:.
Press RETURN to get started!
Stap 4. De router heeft op dit moment de standaardconfiguratie. U moet een back-up maken van de configuratie in de actieve configuratie, u moet de configuratie gebruiken die is opgeslagen in het opstartconfiguratiebestand of een ander bestand. Als u het opstartconfiguratiebestand wilt gebruiken, moet u het bestand kopiëren naar de actieve configuratie in de globale modus.
1. Zodra er een back-up van is gemaakt, kunt u naar de configuratiemodus gaan en de referenties wijzigen/bekijken.
2. Het configuratieregister moet worden gewijzigd in 0x2102. Hierna kunt u de wijzigingen opslaan en het apparaat opnieuw opstarten.
Router#copy startup-config running-config
Destination filename [running-config]?
% Please write mem and reload
% The config will take effect on next reboot
2793 bytes copied in 0.363 secs (7694 bytes/sec)
Router#show running-config | sec password
enable password cisco
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#enable password cisco123
Router(config)#config-register 0x2102
Router(config)#exit
Router#show running-config | sec password
enable password cisco123
Router#write
Building configuration...
[OK]
Router#reload
Stap 5. Om te bevestigen dat het configuratieregister correct is gewijzigd, kunt u de opdracht versie weergeven uitvoeren en de laatste regel controleren vanaf de uitvoer versie weergeven.
Router#show version
Cisco IOS XE Software, Version 16.12.04
Cisco IOS Software [Gibraltar], ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.12.4, RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2020 by Cisco Systems, Inc.
Compiled Thu 09-Jul-20 21:44 by mcpre
Cisco IOS-XE software, Copyright (c) 2005-2020 by cisco Systems, Inc.
All rights reserved. Certain components of Cisco IOS-XE software are
licensed under the GNU General Public License ("GPL") Version 2.0. The
software code licensed under GPL Version 2.0 is free software that comes
with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such
GPL code under the terms of GPL Version 2.0. For more details, see the
documentation or "License Notice" file accompanying the IOS-XE software,
or the applicable URL provided on the flyer accompanying the IOS-XE
software.
ROM: 16.12(2r)
Router uptime is 19 minutes
Uptime for this control processor is 22 minutes
System returned to ROM by Reload Command at 21:14:19 UTC Tue Apr 13 2021
System image file is "bootflash:isr4300-universalk9.16.12.04.SPA.bin"
Last reload reason: Reload Command
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Suite License Information for Module:'esg'
--------------------------------------------------------------------------------
Suite Suite Current Type Suite Next reboot
--------------------------------------------------------------------------------
FoundationSuiteK9 None Smart License None
securityk9
appxk9
AdvUCSuiteK9 None Smart License None
uck9
cme-srst
cube
Technology Package License Information:
-----------------------------------------------------------------
Technology Technology-package Technology-package
Current Type Next reboot
------------------------------------------------------------------
appxk9 appxk9 Smart License appxk9
uck9 uck9 Smart License uck9
securityk9 None Smart License None
ipbase ipbasek9 Smart License ipbasek9
The current throughput level is 300000 kbps
Smart Licensing Status: UNREGISTERED/EVAL MODE
cisco ISR4331/K9 (1RU) processor with 1694893K/3071K bytes of memory.
Processor board ID FLM1922W1BZ
3 Gigabit Ethernet interfaces
32768K bytes of non-volatile configuration memory.
4194304K bytes of physical memory.
3223551K bytes of flash memory at bootflash:.
0K bytes of WebUI ODM Files at webui:.
Configuration register is 0x2142 (will be 0x2102 at next reload)
Opmerking: een ander configuratieregister kan onverwacht gedrag veroorzaken.
Een onderbrekingssignaal simuleren
De standaard seriële/consoleconfiguratie kan worden gecontroleerd in Putty-configuratie zoals weergegeven in de afbeelding.

Als het onderbrekingssignaal niet goed kan worden herkend door de router, kunt u het signaal simuleren met Putty om in de normale modus te gaan.
Stap 1. Om het onderbrekingssignaal te simuleren, moet u de seriële/consoleconfiguratie als volgt instellen:
- Snelheid: 1200.
- Gegevensbits: 8.
- Stopbits: 1.
- Pariteit: geen.
- Stroomregeling: geen.
Deze seriële configuratie wordt geconfigureerd zoals in het image wordt weergegeven.

Zodra u het apparaat met de vorige configuratie hebt verbonden, ziet u geen uitvoer meer van de console. Dit is een verwacht gedrag.
Stap 2. U moet het apparaat opstarten en de spatiebalktoets gedurende 10-15 seconden indrukken om het onderbrekingssignaal in de router te genereren.
Daarna is de router in de normale modus, maar u kunt de rommon-prompt niet zien.
Stap 3. Open de Putty-sessie met de standaardwaarden en probeer opnieuw verbinding te maken met de console. Het toont de Rommon prompt.