简介
本文档介绍在虚拟交换系统(VSS)模式下运行的Cisco Catalyst 4500系列交换机的口令恢复过程。
先决条件
使用的组件
本文档中的信息基于运行Supervisor引擎7-E的Cisco Catalyst 4500系列交换机。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
背景信息
在运行VSS模式的Cisco Catalyst 4500系列交换机上恢复口令需要将交换机转换为独立模式,而要绕过启动配置,必须执行此操作。如果不转换交换机,您将收到以下错误消息:
********************* CAUTION ************************
* *
* Switch is booting up in VSS mode but *
* startup-config is being ignored. Autoboot is *
* disabled and now dropping into ROMMON. *
* *
* Please configure the switch for not ignoring *
* startup-config if it is needed to work in VSS Mode *
* OR *
* clear VS_SWITCH_NUMBER rommon variable to boot *
* the switch in standalone mode. *
******************************************************
*Jul 29 12:25:59.403: %RF-5-RF_RELOAD: Self Reload.
Reason: Startup-config ignore not allowed in VSS mode
*Jul 29 12:25:59.568: %SYS-5-RELOAD:
Reload requested by Platform redundancy manager. Reload Reason:
Startup-config ignore not allowed in VSS mode.Please stand by while
重新加载后按Ctrl-C以中断rommon中的每个机箱。清除VS_SWITCH_NUMBER rommon变量(rommon1 > unset VS_SWITCH_NUMBER)以在独立模式下启动交换机。
密码恢复程序
将交换机转换为独立模式后,必须在两台交换机上分别执行口令恢复。本文档中描述的过程以VSS模式下的交换机1开头,必须对交换机2重复执行。
要在运行VSS模式的Cisco Catalyst 4500系列交换机上执行口令恢复,请完成以下步骤:
- 如果之前已备份,请在外部文件上保持VSS的运行配置。此配置可用于在密码恢复完成后重新配置VSS(步骤10)。
- 通过禁用每个机箱的电源来重新加载交换机,并进入rommon:
Restarting system.
Type control-C to prevent autobooting.
. .
Autoboot cancelled......... please wait!!!
rommon 1 > [interrupt]
rommon 1 >set
PS1=rommon ! >
RommonVer=15.0(1r)SG1
BOOT=bootflash:cat4500e-universalk9.SPA.03.04.00.SG.151-2.SG.bin,12;
ConfigReg=0x2102
DiagMonitorAction=Normal
BootedFileName=bootflash:cat4500e-universalk9.SPA.03.04.00.SG.151-2.SG.bin
VS_SWITCH_NUMBER=1
ConsecPostPassedCnt=7
RET_2_RTS=12:20:28 UTC Mon Jul 29 2013
RET_2_RCALTS=1375100428
rommon 2 >
- 配置交换机以忽略启动配置:
rommon 2 >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]:
disable "load rom after netboot fails"? y/n [n]:
enable "use all zero broadcast"? y/n [n]:
enable "break/abort has effect"? y/n [n]:
enable "ignore system config info"? y/n [n]: y
change console baud rate? y/n [n]:
change the boot characteristics? y/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 3 >set
PS1=rommon ! >
RommonVer=15.0(1r)SG1
BOOT=bootflash:cat4500e-universalk9.SPA.03.04.00.SG.151-2.SG.bin,12;
DiagMonitorAction=Normal
BootedFileName=bootflash:cat4500e-universalk9.SPA.03.04.00.SG.151-2.SG.bin
VS_SWITCH_NUMBER=1
ConsecPostPassedCnt=7
RET_2_RTS=12:20:28 UTC Mon Jul 29 2013
RET_2_RCALTS=1375100428
ConfigReg=0x2142
rommon 4 >
- 输入clear swnum命令,该命令将清除虚拟交换机编号并将交换机转换为独立模式:
rommon 4 >clear swnum
rommon 5 >
rommon 5 >set
PS1=rommon ! >
RommonVer=15.0(1r)SG1
BOOT=bootflash:cat4500e-universalk9.SPA.03.04.00.SG.151-2.SG.bin,12;
DiagMonitorAction=Normal
BootedFileName=bootflash:cat4500e-universalk9.SPA.03.04.00.SG.151-2.SG.bin
BootStatus=Failure
ConsecPostPassedCnt=8
ConfigReg=0x2142
RET_2_RTS=12:25:59 UTC Mon Jul 29 2013
RET_2_RCALTS=1375100759
- 使用所需映像启动交换机。交换机会忽略启动配置,并创建空配置:
rommon 6 >boot bootflash:cat4500e-universalk9.SPA.03.04.00.SG.151-2.SG.bin
loading image
Checking digital signature
flash1:/USER/cat4500e-universalk9.SPA.03.04.00.SG.151-2.SG.bin:
Digitally Signed Release Software with key version A
Rommon reg: 0x00004F80
Reset2Reg: 0x00000F00
Image load status: 0x00000000
#####
Snowtrooper 220 controller 0x04328B30..0x0450A0DF Size:0x0057B4C5 Program Done!
##############
Linux version 2.6.24.4.96.70.k10 (susingh@build-lnx-036)
(gcc version 4.2.1 p7 (Cisco c4.2.1-p7)) #1 SMP Wed Dec 5 03:42:58 PST 2012
Starting System Services
diagsk10-post version 5.1.4.0
按Enter开始。
- 为交换机配置新密码和参数,以便将交换机转换为VSS模式。更改config-register以避免再次绕过配置:
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#username xxxx password xxxx
Switch(config)#enable secret xxxx
4k_vss(config)#config-register 0x2102
4k_vss(config)#
4k_vss(config)#switch virtual domain 100
4k_vss(config-vs-domain)#switch 1
4k_vss(config-vs-domain)#end
4k_vss#wr
Building configuration...
Compressed configuration from 2988 bytes to 1385 bytes
- 再次将交换机转换为VSS模式:
4k_vss#switch convert mode virtual
******************* CAUTION ******************
* No VSL port is configured or all VSL ports *
* are put in shutdown state. *
* This may cause Dual-Active mode of VSS. *
**********************************************
This command will convert all interface names
to naming convention "interface-type switch-number/slot/port",
save the running config to startup-config and
reload the switch.
Do you want to proceed? [yes/no]: yes
Converting interface names
Building configuration...
Compressed configuration from 3113 bytes to 1424 bytes[OK]
Saving converted configuration to bootflash: ...
Destination filename [startup-config.converted_vs-20130729-130331]?
Please stand by while rebooting the system...
- 对另一台交换机重复此步骤,并将其配置为以交换机2的形式加入VSS模式。
注意:有关如何在VSS模式下配置交换机的更多信息,请参阅Catalyst 4500系列交换机软件配置指南(版本IOS XE 3.4.0SG和IOS 15.1(2)SG)的配置VSS部分。
- 在文本编辑器中打开步骤1中保存的原始运行配置,并从配置中删除旧密码。现在,可以安全地将此修改后的配置加载到交换机上。这可确保不再重新配置旧的丢失密码。