簡介
本文件說明如何將思科路由器還原為原廠預設設定。
必要條件
需求
若要執行本文所述的程式,您必須對路由器具有啟用(也稱為特權EXEC)存取許可權。
Router# <<< Privileged EXEC mode
採用元件
本文件所述內容不限於特定軟體和硬體版本。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
慣例
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
將思科路由器重設為出廠預設值的說明
將Cisco路由器還原為其原始出廠預設值有兩種主要方法。下面將介紹這兩種方法。
附註:要檢視有關本文中命令的任何資訊,請參閱《Cisco IOS® 配置基礎命令參考》。
方法1
該方法在全域性配置模式下使用config-register 0x2102命令。
- 發出show version命令以檢查路由器上的配置暫存器。
配置暫存器設定顯示在show version命令輸出的最後一行,必須設定為0x2102。
Router#show version
Cisco IOS Software, VG3X0 Software (VG3X0-UNIVERSALK9-M), Version 15.4(3)M3, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Fri 05-Jun-15 17:29 by prod_rel_team
ROM: System Bootstrap, Version 15.4(3r)M1a, RELEASE SOFTWARE (fc1)
Router uptime is 1 day, 14 hours, 14 minutes
System returned to ROM by power-on
System image file is "flash0:vg3x0-universalk9-mz.SPA.154-3.M3.bin"
Last reload type: Normal Reload
Last reload reason: power-on
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.
Cisco VG320 (revision 1.0) with 1003520K/45056K bytes of memory.
Processor board ID FGL2023103U
2 Gigabit Ethernet interfaces
1 Virtual Private Network (VPN) Module
DRAM configuration is 32 bits wide with parity enabled.
255K bytes of non-volatile configuration memory.
255488K bytes of ATA System CompactFlash 0 (Read/Write)
License Info:
License UDI:
-------------------------------------------------
Device# PID SN
-------------------------------------------------
*0 VG320 FGL2023103U
Technology Package License Information for Module:'vg3x0'
------------------------------------------------------------------------
Technology Technology-package Technology-package
Current Type Next reboot
------------------------------------------------------------------------
ipbase ipbasek9 None ipbasek9
security securityk9 RightToUse securityk9
uc None None None
data datak9 RightToUse datak9
NtwkEss None None None
CollabPro None None None
Configuration register is 0x2102
如果不是這種情況,請在全域性配置模式下輸入config-register 0x2102命令一次。
Router#configure terminal
Router(config)#config-register 0x2102
Router(config)#end
Router#
如果再次發出show version命令,則命令輸出中的同一行可以將(下次重新載入時為0x2102)附加到當前暫存器設定。
2.使用write erase指令清除路由器上的目前啟動組態。
3.使用reload 指令重新載入路由器。當系統提示輸save
入配置時,不要
Router#reload
System configuration has been modified. Save
?
[yes/no]: n
Proceed with reload? [confirm]
路由器重新載入後,將出現System Configuration(系統配置)對話方塊。
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]:
路由器現在已重置為原始出廠預設設定。
方法2
該方法在全域性配置模式下使用config-register 0x2142命令。
-
在全域性配置模式下輸入 config-register 0x2142命令。
Router(config)#config-register 0x2142
這會導致路由器在下一次重新載入時忽略啟動配置。如果再次運行show version,它將將(下次重新載入時0x2142)附加到當前配置暫存器 setting
中。
Router#show version
Cisco IOS Software, VG3X0 Software (VG3X0-UNIVERSALK9-M), Version 15.4(3)M3, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Fri 05-Jun-15 17:29 by prod_rel_team
ROM: System Bootstrap, Version 15.4(3r)M1a, RELEASE SOFTWARE (fc1)
Router uptime is 1 day, 14 hours, 19 minutes
System returned to ROM by power-on
System image file is "flash0:vg3x0-universalk9-mz.SPA.154-3.M3.bin"
Last reload type: Normal Reload
Last reload reason: power-on
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.
Cisco VG320 (revision 1.0) with 1003520K/45056K bytes of memory.
Processor board ID FGL2023103U
2 Gigabit Ethernet interfaces
1 Virtual Private Network (VPN) Module
DRAM configuration is 32 bits wide with parity enabled.
255K bytes of non-volatile configuration memory.
255488K bytes of ATA System CompactFlash 0 (Read/Write)
License Info:
License UDI:
-------------------------------------------------
Device# PID SN
-------------------------------------------------
*0 VG320 FGL2023103U
Technology Package License Information for Module:'vg3x0'
------------------------------------------------------------------------
Technology Technology-package Technology-package
Current Type Next reboot
------------------------------------------------------------------------
ipbase ipbasek9 None ipbasek9
security securityk9 RightToUse securityk9
uc None None None
data datak9 RightToUse datak9
NtwkEss None None None
CollabPro None None None
Configuration register is 0x2102 (will be 0x2142 at next reload)
- 在啟用模式下使用reload 指令重新載入路由器。系統提示時
save
不需要進 save
行配置。
Router#reload
System configuration has been modified. Save
? [yes/no]: n
Proceed with reload? [confirm]
路由器重新載入後,出現「System Configuration(系統配置)」對話方塊。
-
輸入no回答以下問題:是否要進入初始配置對話方塊?
-
使用config-register setting
0x2102 命令(在全域性配置模式下輸入一次)將配置暫存器更改回0x2102。
-
在啟用模式下發出write memory命令,以使用目前執行的配置覆寫目前的啟動組態。
-
在啟用模式下使用reload 指令重新載入路由器。
-
路由器重新載入後,將出現「系統配置」對話方塊。
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]:
路由器現在已重置為原始出廠預設設定。
附註:後續配置儲存在ROMMON中,而write erase 和/orconfig-register 0x2142 命令無法將它們重置為出廠預設 settings
值。
驗證
本節提供的資訊可用於驗證您的路由器是否已回覆為出廠預設值。
附註:內部和錯誤資訊只能由已註冊的思科使用者端存取。
相關資訊