此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档介绍如何在具有运行Cisco IOS®软件的Supervisor引擎的Catalyst 4500/4900交换机上恢复丢失的口令。
本文档没有任何特定的要求。
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
注:在Catalyst 4500/4000系列交换机中,Supervisor引擎II+、II+10GE、II+TS、III、IV、V和V-10GE仅支持Cisco IOS软件。
本文档介绍了如何在配有 Supervisor 引擎 II-Plus (WS-X4013+)、Supervisor 引擎 II-Plus-TS (WS-X4013+TS)、Supervisor 引擎 II-Plus-10GE (WS-X4013+10GE)、Supervisor 引擎 III (WS-X4014)、Supervisor 引擎 IV (WS-X4515)、Supervisor 引擎 V (WS-X4516)、Supervisor 引擎 V-10GE (WS-X4516-10GE) 模块的 Catalyst 4500/4000 交换机,以及 Cisco Catalyst 4948、Cisco Catalyst 4948 10GE 和 Cisco Catalyst 4900M 交换机上恢复丢失的口令或未知的口令。
要在Catalyst 4500/4900交换机上恢复密码,请执行以下操作:
注意:在执行这些步骤时,请确保您对交换机有物理访问权限,并且您对Supervisor引擎模块使用控制台访问权限。有关交换机控制台连接的详细信息,请参阅将调制解调器连接到Catalyst交换机的控制台端口。
提示:如果遵循上述步骤,交换机配置不会丢失。作为最佳实践,Cisco 建议您在 TFTP 服务器或网络管理服务器上为所有 Cisco 设备的配置创建备份副本。
为设备重新通电。
要为设备重新通电,请将其关闭,然后再打开。
在 5 秒内按 Ctrl-C 可防止自动启动。此操作将使您进入 ROM Monitor (ROMmon) 提示符模式。
!--- Here, you power cycle the switch. ********************************************************** * * * Welcome to ROM Monitor for WS-X4014 System. * * Copyright (c) 1999-2000, 2001 by Cisco Systems, Inc. * * All rights reserved. * * * ********************************************************** ROM Monitor Program Version 12.1(10r)EY(1.21) Board type 1, Board revision 7 Swamp FPGA revision 16, Dagobah FPGA revision 43 Timer interrupt test passed. MAC Address : 00-02-b9-83-af-fe IP Address : 172.16.84.122 Netmask : 255.255.255.0 Gateway : 172.16.84.1 TftpServer : Not set. Main Memory : 256 MBytes ***** The systemwill
autoboot in 5 seconds ***** Type control-C to prevent autobooting.
!--- At this point, press Ctrl-C.
Autoboot cancelled......... please wait!!!
Autoboot cancelled......... please wait!!!
rommon 1 > [interrupt]
!--- The module ended in the ROMmon.
rommon 1 > [interrupt]
在提示 confreg 符下发出
rommon 命令。
选择此处显示为粗体字的内容以用于口令恢复:
rommon 1 > set
rommon 1 > confreg
Configuration Summary :
=> load ROM after netboot fails
=> console baud: 9600
=> autoboot from: commands specified in 'BOOT' environment variable
do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]: n
enable "use net in IP bcast address"? y/n [n]: n
disable "load ROM after netboot fails"? y/n [n]: n
enable "use all zero broadcast"? y/n [n]: n
enable "break/abort has effect"? y/n [n]: n
enable "ignore system config info"? y/n [n]: y
change console baud rate? y/n [n]: n
change the boot characteristics? y/n [n]: n
Configuration Summary :
=> load ROM after netboot fails
=> ignore system config info
=> console baud: 9600
=> autoboot from: commands specified in 'BOOT' environment variable
do you wish to save this configuration? y/n [n]: y
You must reset or power cycle for new configuration to take effect
注:您也可以在ROMmonconfreg 0x2142提示符处使用命令,设置配置寄存器值以绕过NVRAM中存储的启动配置。
rommon 1 > confreg 0x2142
You must reset or power cycle for the new configuration to take effect.
-
发出命 reset 令,以便模块重新启动。
由于在步骤 2 中所做的更改,模块将重新启动,但是会忽略保存的配置。
rommon 2 > reset
Resetting
.......
rommon 3 >
**********************************************************
* *
* Welcome to ROM Monitor for WS-X4014 System. *
* Copyright (c) 1999-2000, 2001 by Cisco Systems, Inc. *
* All rights reserved. *
* *
**********************************************************
!--- Output suppressed.
Press RETURN to get started!
!--- Press Return.
00:00:21: %SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software
IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-IS-M),
Version 12.1(8a)EW, RELEASE SOFTWARE (fc1)
TAC Support: http://www.cisco.com/tac
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Thu 24-Jan-02 17:34 by ccai
00:00:21: %SNMP-5-COLDSTART: SNMP agent on host Switch
is undergoing a cold start
Switch>
-
请确保配置寄存器值为 0x2142。
该值可使模块从闪存重新启动,而无须载入保存的配置。在 Switch 提示符处发出 enable 命令,进入启用模式。然后,发出 show version 命令,检查配置寄存器值。
Switch>enable
Switch#show version
Cisco Internetwork Operating System Software
Cisco IOS (TM) Catalyst 4000 L3 Switch Software (cat4000-IS-M),
Version 12.1(8a)EW, RELEASE SOFTWARE (fc1)
TAC Support: https://www.cisco.com/tac
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Thu 24-Jan-02 17:34 by ccai
Image text-base: 0x00000000, data-base: 0x00AA2B8C
ROM: 12.1(10r)EY(1.21)
Switch uptime is 5 minutes
System returned to ROM by reload
Running
default software
cisco WS-C4006 (MPC8245) processor (revision 7) with 262144K bytes of memory.
Processor board ID FOX04183666
Last reset from Reload
32 Gigabit Ethernet/IEEE 802.3 interface(s)
467K bytes of non-volatile configuration memory.
Configuration register is 0x2142
Switch#
-
发出 configure memory 命令或 copy startup-config running-config 命令将NVRAM复制到内存中。
不要发出显示模块上的默认配置的命令 configure terminal 。
Switch#configure memory
Uncompressed configuration from 1307 bytes to 3014 bytes
Switch#
00:13:52: %SYS-5-CONFIG_I: Configured from memory by console
c-4006-SUPIII#
-
发出 show ip interface brief 命令,确保之前使用的接口显示up/up状态。
如果在口令恢复之前使用的任何接口显示down,则在该接口上发出no shutdown命令以启用该接口。
-
发出 write terminal 命令或 show running-config 命令,显示保存在模块上的配置。
c-4006-SUPIII# show running-config
Building
configuration...
Current configuration : 3014 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
service compress-config
!
hostname c-4006-SUPIII
!
boot system flash bootflash:
!
vtp mode transparent
!--- Output suppressed.
line con 0
stopbits 1
line vty 0 4
login
!
end
c-4006-SUPIII#
现在可以开始更改模块上的口令。
-
请发出以下这些命令以更改口令:
c-4006-SUPIII#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
c-4006-SUPIII(config)#no enable secret
!--- This step is necessary if the switch had an enable secret password.
c-4006-SUPIII(config)#enable secret < password >
[Choose a strong password with at least one capital letter,
one number, and one special character.]
!--- This command sets the new password.
-
确保将配置寄存器值改回 0x2102。
在配置提示符下完成以下步骤以更改和验证配置寄存器值。
c-4006-SUPIII(config)#config-register 0x2102
c-4006-SUPIII(config)# ^Z
c-4006-SUPIII#
00:19:01: %SYS-5-CONFIG_I: Configured from console by console
c-4006-SUPIII#write memory
!--- This step saves the configuration.
Building
configuration...
Compressed configuration from 3061 bytes to 1365 bytes[OK]
c-4006-SUPIII#show version
!--- This step verifies the value change.
Cisco Internetwork Operating System Software
Cisco IOS (TM) Catalyst 4000 L3 Switch Software (cat4000-IS-M),
Version 12.1(8a)EW, RELEASE SOFTWARE (fc1)
TAC Support: https://www.cisco.com/tac
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Thu 24-Jan-02 17:34 by ccai
Image text-base: 0x00000000, database: 0x00AA2B8C
ROM: 12.1(10r)EY(1.21)
c-4006-SUPIII uptime is 20 minutes
System returned to ROM by reload
Running
default software
cisco WS-C4006 (MPC8245) processor (revision 7) with 262144K bytes of memory.
Processor board ID FOX04183666
Last reset from Reload
32 Gigabit Ethernet/IEEE 802.3 interface(s)
467K bytes of nonvolatile configuration memory.
Configuration register is 0x2142 (will be 0x2102 at next reload)
c-4006-SUPIII#
此时口令已更改。
示例配置和输出
此示例输出是在Catalyst 4000 Supervisor引擎III上执行密码恢复过程的结果。
c-4006-SUPIII> enable
Password:
Password:
Password:
% Bad secrets
!--- Here, you power cycle the switch.
**********************************************************
* *
* Welcome to ROM Monitor for WS-X4014 System. *
* Copyright (c) 1999-2000, 2001 by Cisco Systems, Inc. *
* All rights reserved. *
* *
**********************************************************
ROM Monitor Program Version 12.1(10r)EY(1.21)
Board type 1, Board revision 7
Swamp FPGA revision 16, Dagobah FPGA revision 43
Timer interrupt test passed.
MAC Address : 00-02-b9-83-af-fe
IP Address : 172.16.84.122
Netmask : 255.255.255.0
Gateway : 172.16.84.1
TftpServer : Not set.
Main Memory : 256 Mbytes
***** The system will
autoboot in 5 seconds *****
Type control-C to prevent autobooting
.
!--- At this point, press Ctrl-C.
Autoboot cancelled......... please wait!!!
Autoboot cancelled......... please wait!!!
rommon 1 > [interrupt]
rommon 1 > [interrupt]
rommon 1 > confreg
Configuration Summary :
=> load ROM after netboot fails
=> console baud: 9600
=> autoboot from: commands specified in 'BOOT' environment variable
do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]: n
enable "use net in IP bcast address"? y/n [n]: n
disable "load ROM after netboot fails"? y/n [n]: n
enable "use all zero broadcast"? y/n [n]: n
enable "break/abort has effect"? y/n [n]: n
enable "ignore system config info"? y/n [n]: y
change console baud rate? y/n [n]: n
change the boot characteristics? y/n [n]: n
Configuration Summary :
=> load ROM after netboot fails
=> ignore system config info
=> console baud: 9600
=> autoboot from: commands specified in 'BOOT' environment variable
do you wish to save this configuration? y/n [n]: y
You must reset or power cycle for new configuration to take effect
rommon 2 > reset
Resetting
.......
rommon 3 >
**********************************************************
* *
* Welcome to ROM Monitor for WS-X4014 System. *
* Copyright (c) 1999-2000, 2001 by Cisco Systems, Inc. *
* All rights reserved. *
* *
**********************************************************
ROM Monitor Program Version 12.1(10r)EY(1.21)
Board type 1, Board revision 7
Swamp FPGA revision 16,
Dagobah FPGA revision 43
Timer interrupt test passed.
MAC Address : 00-02-b9-83-af-fe
IP Address : 172.16.84.122
Netmask : 255.255.255.0
Gateway : 172.16.84.1
TftpServer : Not set.
Main Memory : 256 Mbytes
***** The system will
autoboot in 5 seconds *****
Type control-C to prevent autobooting
.
. . . . .
******** The system will
autoboot now ********
config-register = 0x2142
Autobooting using
BOOT variable specified file.....
Current BOOT file is --- bootflash:
Rommon reg: 0x2B004180
Decompressing
the image : ###########################
#####################################################
####################################### [OK]
k2diags version 1.6
prod: WS-X4014 part: 73-6854-07 serial: JAB0546060Z
Power-on-self-test for Module 1: WS-X4014
Status: (. = Pass, F = Fail)
Traffic using serdes loopback (L2; one port at a time)...
switch port 0: . switch port 1: . switch port 2: .
switch port 3: . switch port 4: . switch port 5: .
switch port 6: . switch port 7: . switch port 8: .
!--- Output suppressed.
Module 1 Passed
Exiting
to ios
...
Rommon reg: 0x2B000180
Decompressing
the image : ##########################
!--- Output suppressed.
######################################################### [OK]
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 Internetwork Operating System Software
Cisco IOS (TM) Catalyst 4000 L3 Switch Software (cat4000-IS-M),
Version 12.1(8a)EW, RELEASE SOFTWARE (fc1)
TAC Support: http://www.cisco.com/tac
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Thu 24-Jan-02 17:34 by ccai
Image text-base: 0x00000000, database: 0x00AA2B8C
cisco WS-C4006 (MPC8245) processor (revision 7) with 262144K bytes of memory.
Processor board ID FOX04183666
Last reset from Reload
32 Gigabit Ethernet/IEEE 802.3 interface(s)
467K bytes of nonvolatile configuration memory.
Press RETURN to get started!
00:00:21: %SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software
Cisco IOS (TM) Catalyst 4000 L3 Switch Software (cat4000-IS-M),
Version 12.1(8a)EW, RELEASE SOFTWARE (fc1)
TAC Support: https://www.cisco.com/tac
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Thu 24-Jan-02 17:34 by ccai
00:00:21: %SNMP-5-COLDSTART: SNMP agent on host Switch is undergoing
a cold start
Switch>enable
Switch#show version
Cisco Internetwork Operating System Software
Cisco IOS (TM) Catalyst 4000 L3 Switch Software (cat4000-IS-M),
Version 12.1(8a)EW, RELEASE SOFTWARE (fc1)
TAC Support: https://www.cisco.com/tac
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Thu 24-Jan-02 17:34 by ccai
Image text-base: 0x00000000, database: 0x00AA2B8C
ROM: 12.1(10r)EY(1.21)
Switch uptime is 5 minutes
System returned to ROM by reload
Running default software
cisco WS-C4006 (MPC8245) processor (revision 7) with 262144K bytes of memory.
Processor board ID FOX04183666
Last reset from Reload
32 Gigabit Ethernet/IEEE 802.3 interface(s)
467K bytes of nonvolatile configuration memory.
Configuration register is 0x2142
Switch#
Switch#configure memory
Uncompressed configuration from 1307 bytes to 3014 bytes
c-4006-SUPIII#
00:13:52: %SYS-5-CONFIG_I: Configured from memory by console
c-4006-SUPIII#show running-config
Building
configuration...
Current configuration : 3014 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
service compress-config
!
hostname c-4006-SUPIII
!
boot system flash bootflash:
!
vtp mode transparent
!
vlan 20
private-vlan primary
!
vlan 100
!
vlan 202
private-vlan association 440
!
vlan 440
private-vlan isolated
!
vlan 500
ip subnet-zero
no ip domain-lookup
!
ip multicast-routing
!
!
interface GigabitEthernet1/1
no switchport
ip address 10.1.1.1 255.255.255.0
ip pim dense-mode
!
interface GigabitEthernet1/2
no switchport
ip address 10.2.2.2 255.255.255.0
!
!--- Output suppressed.
!
interface Vlan1
ip address 172.16.84.140 255.255.255.0
ip pim dense-mode
!
interface Vlan2
no ip address
shutdown
!
interface Vlan20
no ip address
shutdown
!
!--- Output suppressed.
!
line con 0
stopbits 1
line vty 0 4
login
!
end
c-4006-SUPIII#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
c-4006-SUPIII(config)#no enable secret
!--- This step is necessary if the switch had an enable secret password.
c-4006-SUPIII(config)#enable secret < password >
[Choose a strong password with at least one capital letter,
one number, and one special character.]
c-4006-SUPIII(config)#config-register 0x2102
c-4006-SUPIII(config)#^Z
c-4006-SUPIII#write memory
Building
configuration...
Compressed configuration from 3061 bytes to 1365 bytes[OK]
c-4006-SUPIII#show version
Cisco Internetwork Operating System Software
Cisco IOS (TM) Catalyst 4000 L3 Switch Software (cat4000-IS-M),
Version 12.1(8a)EW, RELEASE SOFTWARE (fc1)
TAC Support: https://www.cisco.com/tac
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Thu 24-Jan-02 17:34 by ccai
Image text-base: 0x00000000, database: 0x00AA2B8C
ROM: 12.1(10r)EY(1.21)
c-4006-SUPIII uptime is 20 minutes
System returned to ROM by reload
Running
default software
cisco WS-C4006 (MPC8245) processor (revision 7) with 262144K bytes of memory.
Processor board ID FOX04183666
Last reset from Reload
32 Gigabit Ethernet/IEEE 802.3 interface(s)
467K bytes of nonvolatile configuration memory.
Configuration register is 0x2142 (will
be 0x2102 at next reload)
c-4006-SUPIII#
相关信息
版本 | 发布日期 | 备注 |
---|---|---|
2.0 |
31-Oct-2023 |
重新认证 |
1.0 |
13-Mar-2002 |
初始版本 |