一次不成功的思科2960S交换机的IOS升级

公司一台设备, WS-C2960S-24TS-L,是思科24口1000M的二层交换杨,使用的IOS版本为12.2(55) universalk9-M的IOS软件,最近公司安装了一些数字摄像头,把监控主机和一台球型监控接到了这台机器上,接口的收发速率远大于普通办公用的速率,下面是我复制的两个接口的速率。服务器


G1/0/3(监控主机接口)网络


 5 minute input rate 2087000 bits/sec, 4065 packets/secapp

  5 minute output rate 45545000 bits/sec, 4065 packets/secide



G1/0/13(监控球机接口,海康130W像素)ui

5 minute input rate 2823000 bits/sec, 279 packets/secthis

  5 minute output rate 146000 bits/sec, 281 packets/secspa


发现CPU占用率高,并且是5秒钟的占用为17%,5分钟的占用每每超过了50%,为了解决CPU占用率高的问题,决定对机器进行一次升级unix

查看了tar格式的IOS的升级方法,有两种rest

方法一:Switch#archive tar /xtrat tftp://TFTP服务器IP地址/c3750-ipservicesk9-tar.150-2.SE2.tar flash:orm


方法二:archive download-sw /leave-old-sw /reload tftp://192.168.12.65/c2960s-universalk9-tar.150-2.SE6.tar flash:/

首先,我使用的保险一点的方法,即将这个IOS下载到交换机的flash:中,而且不删除原有flash,下载完成后重启



方法二还有覆盖原有IOS的选项,但不建议使用。由于通常来讲,如今的flash彻底能够容纳两个IOS包没有问题


接下来看我悲催的升级过程

1、 恰好思科的帐号能够下载我这台机器的IOS,我就下载了最新的15.2.2aE1,使用方法将它灌进了FLASH中。可是机器并无重启,我就敲下了reload

2、接下来就等待了,满心觉得不会出问题,由于我2960的百M机器已经实验过升级到15.0的IOS了。等待了五分钟仍是没通,到机房查看,只看到左边那排的第一个灯亮,而后console灯那里亮,手工断电再重启,仍是网络不通

3、找了台笔记本,串口链接进去,发现系统进去了,enable模式也能够进去,可是就是无法查看flash,配置文件不生效,而后也不能进行一些配置。杯具了!

4、之前的老方法都是在IP环境下copy tffp:/   flash:/,即将bin文件复制过去升级的,除了那个百M的升级tar文件到15.0之外,因此有些不知道怎么办了

5、按位mode断电重启,进入到最小系统模式,注意,不是提示的rommon>  好像是switch:仍是怎么的?

6、查看这里只有flash_init和boot这两个命令了

7、flash_init,对于这个我理解错了,觉得进行初始化之后,至关于把flash格盘了,就这点注定了四个小时的加班,其实这个命令应该是告诉咱们将flash进行了挂载,在最小系统模式下能够查看flash了,而我觉得已经格式化了,而后,敲入了这个命令之后,能够查看一些别的命令,好比dir这些。我当时在进入那个15.0的系统时show flash用不了,觉得flash损坏了,没办法,只好使用xmodem来发送数据包了,

copy xmodem: flash:image_filename.bin

(在这中间,使用一个备用的100M2960将原来备份的配置恢复过去,还好常常备份)

8、接下来就用CRT软件,使用xmodem来传输文件了,真心慢

9、回宿舍等待的过程当中,看到网上有人说能够将波特率设置成115200   set buad 115200,没报错,但将电脑的串口设置成这个速率,直接死机,弄了两次,死了两次,从新用9600的速率将15.0的se6弄过去,发送文件,速度不到1K

10、回宿舍睡觉并思考为何,开始觉得是那个IOS版本叫aE1,好像看到支持SSH,觉得这个版本是专门为企业版用的

11、次日回办公室,IOS弄好了

12、重启,结果显示和15.2.2aE1同样,在开机的时候会有显示无效的许可之类的信息,和日常的系统启动不一样。而后那些命令一样使用不了。恨得牙都痒痒的了。想着不会真要从新把12.2那个弄回去吧?

十3、再重启,按MODE,进入最小系统模式switch:  ,敲入flash_init。  通常思考,应该 flash并无损坏,并且IOS也已经弄进去了,但惟一可能的缘由是这台机器不支持升级到15.0的系统。

而后再敲了一个?(这之间有没有敲入load_help不记得了),忽然看到有一个很熟悉的命令dir,能够看到 flash里面有文件,并且原来的IOS还在,新灌的IOS也在,将原来12.2的IOS的路径复制下来。直接 boot  flash:/原有IOS的路径/文件名,进入了原来的系统,配置也在。

十4、使用tftp,再使用copy tftp:/   flash:/ ,将一个12.2(58)SE2的IOS复制到flash:

十5、再使用boot system 路径,将系统的启动IOS设置成58的这个IOS


至此,系统升级成了12.2(58)SE2的系统,并无升级到15.0的系统


总结:

1. 若是要升级的话,可使用方法一和方法二,方法一是将tar包解压到了flash中,但不该用,方法二是保留原有的IOS升级,并重启  

2. 还能够将tar包解压,复制里面的bin文件到flash中

3.在升级前必定记得要备份配置文件到本地

4.将flash里面的目录用手机拍照,记录下图片,而后将原有的启动路径记清,使用show boot命令

5.若是使用download-sw /leaveoldsw这个命令的话,原有的IOS会保留,虽然进入新的系统不支持生产环境的配置,但可使用boot system这个命令,能够直接使用boot system这个命令设置成原来的IOS启动,并不会耽搁不少时间

6.在switch:这个最小系统里面设置了boot 路径,第一次能够重启到你原来的IOS,但进入到原来的IOS里面,仍然要使用boot sytem这个命令指定你的IOS路径,这样才会在下次重启时使用你预期的IOS启动

7.不用怀疑,虽然思科的背板比华为的要低好多,但依照个人结果,一个接口输入2Mbps,输入45Mbps彻底没有问题,不会丢包或者其余


结果:将系统升级到12.2(58)后,原来的CPU占用率高已经解决了,看来仍是软件的bug。如今使用正常,CPU占用率13%




因为过程,没有记录下来,因此没法贴图,但相信你们应该能够根据个人过程和总结解决IOS升级的问题,有问题请看思科的手册。这是最好的办法。

看到网上的方法都是原来的老方法,特将此文件共享出来,但愿帮到新学的朋友,另将思科的手册里面的升级方法粘贴以下







Switch software can be corrupted during an upgrade, by downloading the wrong file to the switch, and

by deleting the image file. In all of these cases, the switch does not pass the power-on self-test (POST),

and there is no connectivity.

This procedure uses the Xmodem Protocol to recover from a corrupt or wrong image file. There are many

software packages that support the Xmodem Protocol, and this procedure is largely dependent on the

emulation software that you are using.

This recovery procedure requires that you have physical access to the switch.

Step 1 From your PC, download the software image tar file (image_filename.tar) from Cisco.com.

The Cisco IOS image is stored as a bin file in a directory in the tar file. For information about locating

the software image files on Cisco.com, see the release notes.

Step 2 Extract the bin file from the tar file.

If you are using Windows, use a zip program that can read a tar file. Use the zip program to navigate

to and extract the bin file.

If you are using UNIX, follow these steps:

1. Display the contents of the tar file by using the tar -tvf <image_filename.tar> UNIX command.

unix-1% tar -tvf image_filename.tar

2. Locate the bin file, and extract it by using the tar -xvf <image_filename.tar>

<image_filename.bin> UNIX command.

unix-1% tar -xvf image_filename.tar image_filename.bin

x c2960-lanbase-mz.122-25.FX/c2960-lanbase-mz.122-25.FX.bin, 2928176 bytes, 5720

tape blocks

3. Verify that the bin file was extracted by using the ls -l <image_filename.bin> UNIX command.

unix-1% ls -l image_filename.bin

-rw-r--r-- 1 boba 2928176 Apr 21 12:01

c2960-lanbase-mz.122-25.FX/c2960-lanbase-mz.122-25.FX.bin

Step 3 Connect your PC with terminal-emulation software supporting the Xmodem Protocol to the switch

console port.

Step 4 Set the line speed on the emulation software to 9600 baud.

Step 5 Unplug the switch power cord.

Step 6 Press the Mode button and at the same time, reconnect the power cord to the switch.

You can release the Mode button a second or two after the LED above port 1 goes off. Several lines of

information about the software appear along with instructions:

39-3

Catalyst 2960 and 2960-S Switches Software Configuration Guide, Release 15.0(1)SE

OL-26520-01

Chapter 39 Troubleshooting

Recovering from a Lost or Forgotten Password

The system has been interrupted prior to initializing the flash file system. The following

commands will initialize the flash file system, and finish loading the operating system

software#

flash_init

load_helper

boot

Step 7 Initialize the flash file system:

switch: flash_init

Step 8 If you had set the console port speed to anything other than 9600, it has been reset to that particular

speed. Change the emulation software line speed to match that of the switch console port.

Step 9 Load any helper files:

switch: load_helper

Step 10 Start the file transfer by using the Xmodem Protocol.

switch: copy xmodem: flash:image_filename.bin

Step 11 After the Xmodem request appears, use the appropriate command on the terminal-emulation software to

start the transfer and to copy the software image into flash memory.

Step 12 Boot the newly downloaded Cisco IOS image.

switch:boot flash:image_filename.bin

Step 13 Use the archive download-sw privileged EXEC command to download the software image to the switch

or to the switch stack.

Step 14 Use the reload privileged EXEC command to restart the switch and to verify that the new software image

is operating properly.

Step 15 Delete the flash:image_filename.bin file from the switch.

相关文章
相关标签/搜索