Cisco Catalyst交换机密码恢复策略 zz

上一篇 / 下一篇  2007-07-04 16:59:03 / 个人分类:Switch

 

来源:vlan9收集 作者: 2005-10-19 出处:PCDOG.COM 

&qH*MG-?;j$n$V-| m0
 
关键字:

`7@"Z8|0?f V0

9pK8x SI f)o0   木铎校园 BBS 社区 G{\HVrz
  如果交换机的login密码忘记了咋办啊?(T-T)木铎校园 BBS 社区L2Q7FU'Ta
  别急别急,只要你有PC,有类似超级终端(Hyper Terminal)这样是终端程序,连接到交换机的console口,那么密码的恢复就N简单了.木铎校园 BBS 社区+Tm;d\0[ ?K
  
&jOV0BLa*D:P/L*~H0  1.对于Catalyst 2900/3500XL系列来说:
C6F]d+C%v+z y0

  拔下交换机的电源线,然后按住交换机的Mode按钮,再重新插上交换机的电源线.直到端口Port 1x的LED熄灭之后释放Mode按钮.
T:jP+G+bdYv c5B0  就这么简单,别告诉我你不知道Mode按钮在哪啊-_-#
,o1T9J'T|0  木铎校园 BBS 社区N+SFqKZ/A
  2.对于Catalyst 2940/2950L系列来说:
-v'E6VL bv0  拔下交换机的电源线,然后按住交换机的Mode按钮,再重新插上交换机的电源线.直到STAT的LED熄灭之后释放Mode按钮.木铎校园 BBS 社区d6e4~pmA)MO
  木铎校园 BBS 社区 }[F nkF4Fl
  3.对于Catalyst 2955系列来说:
|i&["xtc2z0  Catalyst 2955没有没有外部的Mode按钮,因此就不能使用之前的那种方法来进行密码恢复.在交换机启动时,对于Windows系列的PC,按下Ctrl+Break键;对于UNIX系列的工作站,按下Ctrl+C.如下:
|{%HQ;M7}0  C2955 Boot Loader (C2955−HBOOT−M) Version 12.1(0.0.514), CISCO DEVELOPMENT TEST木铎校园 BBS 社区/z g1V,ur)l9B7M3P\
  VERSION木铎校园 BBS 社区_KxfU]N&JJ
  Compiled Fri 13−Dec−02 17:38 by madison
o I$w$J;Gl0  WS−C2955T−12 starting...
]MY ~u L3~cDY0  Base ethernet MAC Address: 00:0b:be:b6:ee:00
+B,x&^9l2A[l1NO0  Xmodem file system is available.木铎校园 BBS 社区d;R1]rC7l1[{
  木铎校园 BBS 社区/] F'U7I$N2A
  Initializing Flash...
J/u/N6T'A nU0  flashfs[0]: 19 files, 2 directories
Ghx"|2wj9~-g0  flashfs[0]: 0 orphaned files, 0 orphaned directories木铎校园 BBS 社区Tn6V$G*Bw
  flashfs[0]: Total bytes: 7741440木铎校园 BBS 社区C$\2I F!utg M SJ
  flashfs[0]: Bytes used: 4510720
:a yu*X.E^pr"Z0  flashfs[0]: Bytes available: 3230720木铎校园 BBS 社区A]+S2~%hc8g
  flashfs[0]: flashfs fsck took 7 seconds.木铎校园 BBS 社区&Ef/L.v$N:g8})IY!t/T
  ...done initializing flash.
w&^+cG/o)V;i0  Boot Sector Filesystem (bs:) installed, fsid: 3
0}+N-P#D9P%B"pODk"f0  Parameter Block Filesystem (pb:) installed, fsid: 4
RX_i@ii0  /---接下来交换机会在15秒内自动启动,等出现该信息之后,按下Ctrl+Break键或Ctrl+C键----/木铎校园 BBS 社区x$E%W*^_FiG]E
  
5P5_0Zm"W$?8K9on0  The system has been interrupted prior to initializing the flash file system to finish
Uy O L }3IDQH0  loading the operating system software:木铎校园 BBS 社区0oZg [e$x?H
  flash_init木铎校园 BBS 社区 a0[5M_#]
  load_helper木铎校园 BBS 社区UJ%r5p6z
  bootswitch:木铎校园 BBS 社区y _3@u3]6Emrp#C
  木铎校园 BBS 社区"Im#~%s?5|t
  接下来输入flash_init命令:
Y^ui }a&C0  switch:flash_init
Px [9Qg O~;E0  Initializing Flash...木铎校园 BBS 社区_ PR0GMmE
  flashfs[0]: 143 files, 4 directories
9t ox U(h9L\0  flashfs[0]: 0 orphaned files, 0 orphaned directories木铎校园 BBS 社区0NtPfV4S
  flashfs[0]: Total bytes: 3612672
K7B DR@ J0  flashfs[0]: Bytes used: 2729472
Nr(SM8kA)cV0  flashfs[0]: Bytes available: 883200木铎校园 BBS 社区|^e$qU
  flashfs[0]: flashfs fsck took 86 seconds
rz q.eGK C0  ....done Initializing Flash.木铎校园 BBS 社区%Yg hly
  Boot Sector Filesystem (bs:) installed, fsid: 3木铎校园 BBS 社区;ct"Q&_n?/C
  Parameter Block Filesystem (pb:) installed, fsid: 4
/^#t)s+}$Gy|0  switch:木铎校园 BBS 社区}iB3K |!u O
  
8?9x a+]ajl0  接着输入load_helper命令:木铎校园 BBS 社区_ht h4Xas
  switch:load_helper
yq!U5OdF0  switch:
2}Y:wF@7SzpD:Lv:],{0  木铎校园 BBS 社区rkXa[My:F*h\
  再输入dir flash:命令显示交换机的文件系统:木铎校园 BBS 社区!A5t([/x'Y-y
  switch:dir flash:
;H"T L"G.\0  Directory of flash:/木铎校园 BBS 社区Vz+fk8e$tf
  2 −rwx 1803357c3500xl−c3h2s−mz.120−5.WC7.bin
Kh` PBz0  4 −rwx 1131config.text木铎校园 BBS 社区;lH2\OtI
  5 −rwx 109info木铎校园 BBS 社区@j ELy%}9U
  6 −rwx 389env_vars木铎校园 BBS 社区Hy(Y%[!tZ
  7 drwx 640html
,qH/~/u!O8J0  18 −rwx 109info.ver木铎校园 BBS 社区6A'Fp#Y6Y#nFq
  403968 bytes available (3208704 bytes used)
W a8~\;U&HK0  switch:
,a4?D;o:\&g!tV8N |0  
w-b:K x;O[3s ~0  把配置文件重命名:木铎校园 BBS 社区+m N\&gn*}_0HL
  switch:rename flash:config.text flash:config.old木铎校园 BBS 社区]/zLD*I3z#G8K+Z
  switch:
,V5T/@&C] Pa!]+k0  
Kk:K P4r0  输入boot命令启动交换机:木铎校园 BBS 社区3OBK0@4F1?z\o
  switch:boot木铎校园 BBS 社区l@5~ltGZpbo!? y
  Loading "flash:c3500xl−c3h2s−mz.120−5.WC7.bin"...###############################木铎校园 BBS 社区+m0l#R+X9Msj$p
  ################################################################################
&rT%? n @S}:]0  ######################################################################
LY;Gdu$m0e0  File "flash:c3500xl−c3h2s−mz.120−5.WC7.bin" uncompressed and installed, entry po
S8kq n}gDP0  int: 0x3000木铎校园 BBS 社区-^Y \&O0r9A#W ^[Oe
  executing...木铎校园 BBS 社区]oZ0i"Y;]3c
  (略)
$C-R/id@+x~7b"F0  
mB['_9GZP1p0  不进入setup模式:木铎校园 BBS 社区)H%L _ @6G7E,d
  −−− System Configuration Dialog −−−
P&V6fI&\(ca+u0  At any point you may enter a question mark '?' for help.木铎校园 BBS 社区~%mc1aJ?&mw
  Use ctrl−c to abort configuration dialog at any prompt.木铎校园 BBS 社区8H$f'B#i"H+~"EP ?
  Default settings are in square brackets '[]'.木铎校园 BBS 社区t$j J4g@F rl
  Continue with configuration dialog? [yes/no]: n
:c\x)b2Pbql$G;U0  
!S _)@{D l_3{ gg0_)?0  进入特权模式,恢复原始的配置文件:木铎校园 BBS 社区8]P B_1GD:c[
  Switch#rename flash:config.old flash:config.text
JLy"};}2k:d#v"T"TG0  Destination filename [config.text]木铎校园 BBS 社区-`7a3PTxS/{/@(y
  Switch#木铎校园 BBS 社区||U6^k
  木铎校园 BBS 社区R*E V _WH%VZI7p_
  把配置文件保存在内存里:木铎校园 BBS 社区m1~+MM9y*p
  Switch#copy flash:config.text system:running−config木铎校园 BBS 社区 L6rcQEy+[
  Destination filename [running−config]?
E k:j,g F f}0  1131 bytes copied in 0.760 secs
|/tk3An*{l0  Switch#木铎校园 BBS 社区7T*pX s$Bw/^
  木铎校园 BBS 社区_o|#_fzL9C#D%E-u1q
  进入全局配置模式,取消密码设置:木铎校园 BBS 社区 uF ?-J/~&V
  Switch(config)#no enable secret
8ncRsLd5M1?.Nl\*\0  
L-L;bPX0  保存配置:
[ jj*Z5NN/U"l0  Switch#write memory
L#iN;A5ls(}rF0  Building configuration...木铎校园 BBS 社区(^#Xx"B8S5K
  [OK]木铎校园 BBS 社区,he3~:{S:b
  Switch#
"Kz?[Ho|0  
-A EQ/APu1Tu0  搞定了@_@
:F&CixKP/Th.M7o[0  
r2]6O}[0  4.对于Catalyst 3550/3750系列来说:
6_9UHYpF3~J0  1.通过带有支持Xmodem协议的超级终端程序的PC连接到交换机的console口,把波特率设置为9600.木铎校园 BBS 社区f1L8g\mFx$j
  2.拔掉交换机的电源.
/W4VZI [sw0  3.按下交换机上的Mode按钮,与此同时,重新插上交换机的电源线.当交换机端口1X上的LED熄灭后可以松开Mode按钮1到2秒.之后将显示一些指示信息:木铎校园 BBS 社区-f3\W6[or\8S
  The system has been interrupted prior to initializing the flash file system. The following
q8?3Q1A:Ev!`.Z*]&Z0  commands will initialize the flash file system, and finish loading the operating system木铎校园 BBS 社区*yw6r#QQI$mx_8H#]
  software:
Nf9Ar8G'h'C!A0  flash_init
iE'r#shjhBt3u0  load_helper木铎校园 BBS 社区.x!@(BE+k"|'O"l1Ps
  boot
)SLo*o*\ E OO p0  switch#木铎校园 BBS 社区S h8R K!d'[
  4.初始化flash文件系统:
I{!Q"KLa$K%R0  switch#flash_init木铎校园 BBS 社区V'Ex/[a1C/F7wM
  5.加载帮助文件:木铎校园 BBS 社区A;J`9\o3w9YV!I(wEY
  switch#load_helper
"jF;^-k.}0  6.显示闪存里的内容:木铎校园 BBS 社区m-k0I CG!W
  switch#dir flash:木铎校园 BBS 社区5]$oG7}.}2_aZ
  7.重命名配置文件:
ZN0F5G1mZ0  switch#rename flash:config.text flash:config.text.old
J`8L,j(KG X0  8.启动系统,并且如果提示进入setup模式,输入N:
1o H!o|bs3GzoV1d0  switch#boot
U0L"s0sr A0  Continue with the configuration dialog? [yes/no]: N
%Tbf!B0[.n^8s0  9.进入特权模式,把配置文件名恢复为原始文件名:木铎校园 BBS 社区;q1z$b{ ~"{"P&I
  Switch#rename flash:config.text.old flash:config.text
Vh+RS*H0  10.把配置文件写进内存:
3c-JJy/grr*C0  Switch#copy flash:config.text system:running-config
D yc"WE.]&ni,lk0  Source filename [config.text]?
q8ATU i9W0  Destination filename [running-config]?
2]x Q4~-s0  11.进入全局配置模式更改密码:
EfUa#h5B7qe['u!B0  Switch(config)#enable secret {password}木铎校园 BBS 社区f9C&T*|Q2^ ^)Xk
  12.退出,并保存到startup-config文件里:木铎校园 BBS 社区-O2TpKA2^wA-Q
  Switch(config)#copy running-config startup-config
zFX$lcV0  
:k*S)b/o us3a3Y0  其实有的时候硬件安全比软件安全还要重要些.不然人人都抗个本本,.连根线到console口去恢复密码了-_-

2G3V rCf0

如果您想了解更多内容请看Cisco IOS技术手册  Cisco交换机  Cisco交换机口令恢复专题

~Ug9rl Pv1rL.q ~'I0

3hgo2HEv8Z:\p0
 

TAG:

流殇之城 引用 删除 祝德亮   /   2007-07-06 00:03:07
看8懂……还是要多学啊……
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

关于作者