路由器交换机系统恢复及密码恢复
一、IOS的恢复(思科2600为例)
1.TFTP服务器的设置
设置PC
的IP
如下:ip:192.168.1.10/24
设置TFTP
软件,
关键是TFTP的根目录的设置,并且
打开TFTP
服务器软件
2.cisco2600在ROMMON模式下恢复IOS
rommon 1 > help 查看此模式下的命令
rommon 2 > set 设置网络参数
下面就开始设置route的参数啦,这里我们使用PC通过TFTP灌IOS:
rommon 3 > IP_ADDRESS=192.168.1.2
Rommon 4 > IP_SUBNET_MASK=255.255.255.0
Rommon 5 > DEFAULT_GATEWAY=192.168.1.1
Rommon 6 > TFTP_SERVER=192.168.1.10
Rommon 7 > TFTP_FILE=c2600.bin
Rommon 8 > tftpdnld
注意:在这里配置的IP要和PC为同一网段,并且TFTP_SERVER为PC的IP地址,文件名。然后等到大约20分钟以后就可以了
3.cisco2600 IOS的升级。
TFTP服务器地址:192.168.2.1
(1)在路由器测试与TFTP服务器的连通性
ISP3#ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
(2)备份路由器配置(防止升级失败,配置丢失)
ISP3#copy running-config tftp:
Address or name of remote host []? 192.168.2.1
Destination filename [isp3-confg]? config.text
!!
1034 bytes copied in 5.709 secs (181 bytes/sec)
在服务器上可看到已经成功接收文件
(3)备份IOS
查看flash:
ISP3#dir flash:
Directory of flash:/
1 -rw- 12965760 <no date> c2600-ipbase-mz.124-25a.bin
33030140 bytes total (20064316 bytes free)
ISP3#copy flash: tftp
Source filename []? c2600-ipbase-mz.124-25a.bin
Address or name of remote host []? 192.168.2.1
Destination filename [c2600-ipbase-mz.124-25a.bin]? c2600.bak.bin
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12965760 bytes copied in 115.457 secs (112299 bytes/sec)
TFTP
服务器上成功接收文件
(4)升级IOS
ISP3#
copy tftp: flash:
Address or name of remote host []?
192.168.2.1
Source filename []?
c2600.bin
Destination filename [c2600.bin]?
Accessing tftp://192.168.2.1/c2600.bin...
Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files! Continue? [confirm]
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erasedeeee
Erase of flash: complete
Loading c2600.bin from 192.168.2.1 (via FastEthernet0/1): !!!!!!!!!!!!!!!!!!!!!!
(5)恢复IOS
3550 flash 中的ios已被误删 ,现加电后只能进入 switch: 模式。
这时候只可以使用X-Modem来恢复它。恢复过程如下:
1用控制线连接交换机console口与计算机串口1,用带有xmodem功能的终端软件连接(win2000 and xp的超级终端就带这功能)。
设置连接方式为串口1(如果连接的是其他串口就选择其他串口),速率9600,无校验,无流控,停止位1。或者点击
默认设置也可以。
2连接以后计算机回车出现交换机无ios的界面,一般的提示符是:
switch: 拔掉交换机后的电源线重新启动交换机
3在超级终端输入: switch:flash_init
会出现如下提示: Initializing Flash...
4:输入拷贝指令:
switch:copy xmodem: flash:c3500.bin
出现如下提示:
Begin the Xmodem or Xmodem-1K transfer now...
系统提示不断出现
C这个字母就可以开始传文件了
5点击超级终端菜单:传送---发送文件,在协议选项中选择
Xmodem或者
1K -Xmodem协议,然后选择ios的影像文件(*.bin),开始传送。
传送完毕后提示:
File "xmodem:" successfully copied to "flash:c3550.bin"
在提示符下输入
switch:boot
启用新的ios系统,重新加电完成恢复工作。