はじめに
このドキュメントでは、Cisco IOS®ルータおよびCisco IOS® XEルータでパスワード回復を実行するプロセスについて説明します。
前提条件
要件
- このドキュメントは、ISRG2、ISR4000、ASR1000、およびISR1000ファミリのシスコルータに適用されます。
異なるCisco IOSおよびCisco IOS XEファミリを実行しているルータでは、このプロセスは変更される可能性があります。
- パスワード回復を実行するには、デバイスコンソール接続が必要です。
注:デバイスへのリモート接続(SSHまたはTelnet)を使用してパスワード回復プロセスを実行することはできません。コンソール接続にターミナルサーバを使用している場合、このプロセスは機能しません。直接コンソール接続が推奨されます。
- 影響を受けるデバイスの電源をリモートで管理するには、物理デバイスへのアクセスまたは可用性が必要です。
- ブレークシーケンスを送信するには、ターミナルエミュレータを使用する必要があります。
注:一部のPCキーボードにはブレークキーが付いています。このキーを使用して信号を送信できます。
使用するコンポーネント
このドキュメントの情報は、次のソフトウェアとハードウェアのバージョンに基づいています。
- Cisco IOS XE 16.12.4を実行するルータISR4331
- Puttyターミナルセッションリリース0.71
このドキュメントの情報は、特定のラボ環境にあるデバイスに基づいて作成されました。このドキュメントで使用するすべてのデバイスは、クリアな(デフォルト)設定で作業を開始しています。本稼働中のネットワークでは、各コマンドによって起こる可能性がある影響を十分確認してください。
背景説明
この手順は、ユーザ名とパスワードのクレデンシャル、およびイネーブルパスワードの回復に使用できます。
現在のデバイス設定に基づいて、パスワードを抽出したり、新しいパスワードに置き換えたりすることができます。
Cisco IOSルータおよびCisco IOS XEルータは、startup-configおよびrunning-configに設定を保存します。
デフォルトでは、startup-configファイルはNVRAMに保存され、running-config(実際のデバイス設定)はDRAMに保存されます。
パスワード回復プロセスの主な目的は、デフォルト設定でデバイスを起動し、デバイスへのアクセスが可能になったら、現在の設定をロードし、クレデンシャルを変更することです。
注:ルータにno service password-recovery機能が設定されている場合、パスワードの回復は実行できません。この設定は、デバイスのブート中に特定できます。No Service Password-Recovery機能の詳細については、このドキュメントを参照してください。
Cisco IOSおよびCisco IOS XEルータのパスワード回復
ステップ 1:デバイスをリブートします。コマンドラインからデバイスにアクセスできないため、電源/スイッチからデバイスをリブートする必要があります。
ステップ 2:デバイスのブート中に、ブレークシーケンスを発行する必要があります。
Puttyの場合は、図に示すように、特殊コマンド> Breakオプションに移動します。

- 複数のブレーク信号を送信する必要があります。POSTに合格した後、Cisco IOSの起動が終了する直前に、ブレーク信号が認識されます。
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 >
ステップ 3:デバイスにログインします。rommonモードでは、デフォルト設定で次回のリロード時にブートするために、コンフィギュレーションレジスタを0x2142に設定する必要があります。
リロードするには、resetコマンドを使用します。デバイスは通常どおりブートしたままにする必要があります。
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!
ステップ 4:ルータには、この時点でデフォルト設定があります。実行コンフィギュレーションのコンフィギュレーションをバックアップする必要があります。startup-configファイルまたは別のファイルに保存されているコンフィギュレーションを使用する必要があります。 startup-configファイルを使用するには、グローバルモードでファイルをrunning-confgにコピーする必要があります。
1. バックアップが完了したら、コンフィギュレーションモードに移行し、クレデンシャルを変更または確認できます。
2. コンフィギュレーションレジスタを0x2102に変更する必要があります。この後、変更を保存してデバイスをリブートできます。
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
ステップ 5:コンフィギュレーションレジスタが正しく変更されていることを確認するには、show versionコマンドを実行し、show versionの出力の最終行を確認します。
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)
注:異なるコンフィギュレーションレジスタを使用すると、予期しない動作が発生する可能性があります。
ブレーク信号のシミュレート
デフォルトのシリアル/コンソール設定は、図に示すようにPutty設定で確認できます。

ブレーク信号がルータで適切に認識されない場合は、Puttyで信号をシミュレートしてROMmonモードに入ることができます。
ステップ 1:ブレーク信号をシミュレートするには、シリアル/コンソールを次のように設定する必要があります。
- 速度:1200
- データ ビット:8.
- Sropビット:1
- パリティ:なし
- フロー制御:なし
このシリアル設定は、図に示すように設定されます。

以前の設定でデバイスを接続すると、コンソールからの出力が表示されなくなります。これは予期された動作です。
ステップ 2:ルータでブレーク信号を生成するには、デバイスの電源を再投入し、スペースバーを10 ~ 15秒間押し続ける必要があります。
その後、ルータはrommonモードになりますが、rommonプロンプトは表示されません。
ステップ 3:デフォルト値でPuttyセッションを開き、コンソールに接続し直します。rommonプロンプトが表示されます。