簡介
本檔案介紹在虛擬交換系統(VSS)模式下運作的Cisco Catalyst 4500系列交換器的密碼復原程式。
必要條件
採用元件
本檔案中的資訊是根據執行Supervisor Engine 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系列交換器上執行密碼復原,請完成以下步驟:
- 如果以前進行過備份,請將running-config保留在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
- 確認config-register 已變更:
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...
- 對另一台交換機重複此過程,並將其配置為作為switch 2加入VSS模式。
附註:有關如何在VSS模式下設定交換器的其他資訊,請參閱IOS XE 3.4.0SG和IOS 15.1(2)SG版Catalyst 4500系列交換器軟體組態設定指南的設定VSS一節。
- 在文本編輯器中開啟步驟1中儲存的原始running-config,然後從配置中刪除舊密碼。現在,在交換機上載入此修改後的配置是安全的。這可確保不再重新配置丟失的舊密碼。