日期:2015-8-4 浏览次数:1237次 点赞次数:0

准备工作:
一台PC、一台cisco catalyst3550
TFTP
服务器版软件
12.4EMI增强版IOS

3550
简单配置一下,目的能与TFTP服务器(PC机器)通讯

PC机器IP设置:192.168.1.2/24
3550 vlan1 IP 192.168.1.1/24

保证
在同一个网段就行了!


1、查看原来IOS情况


catalyst3550#dir
Directory of flash:/

    2  -rwx           0   Jan 01 1970 00:01:44  env_vars
    3  -rwx         344   Jan 01 1970 00:01:44  system_env_vars
    4  -rwx        1216   Aug 12 1993 01:27:43  vlan.dat
    6  -rwx        5765   Aug 11 1993 06:03:29  config.text
    7  drwx         192   Mar 01 1993 00:03:20  c3550-i9q3l2-mz.121-13.EA1a
   24  -rwx          47   Aug 11 1993 06:03:29  private-config.text

15998976 bytes total (10733568 bytes free)
catalyst3550#cd c3550-i9q3l2-mz.121-13.EA1a
catalyst3550#dir
Directory of flash:/c3550-i9q3l2-mz.121-13.EA1a/

    8  drwx         832   Mar 01 1993 00:02:16  html
   22  -rwx     3247886   Mar 01 1993 00:03:20  c3550-i9q3l2-mz.121-13.EA1a.bin
   23  -rwx         255   Mar 01 1993 00:03:20  info

15998976 bytes total (10733568 bytes free)
catalyst3550#
catalyst3550#sh boot
BOOT path-list:       flash:c3550-i9q3l2-mz.121-13.EA1a/c3550-i9q3l2-mz.121-13.EA1a.bin
Config file:          flash:/config.text
Private Config file:  flash:/private-config.text
Enable Break:         no
Manual Boot:          no
HELPER path-list:     
NVRAM/Config file
      buffer size:    393216




2、备份原来的IOS


catalyst3550#archive tar /create tftp://192.168.1.2/c3550.tar flash: c3550-i9q3l2-mz.121-13.EA1a

!!
archiving c3550-i9q3l2-mz.121-13.EA1a (directory)
archiving c3550-i9q3l2-mz.121-13.EA1a/html (directory)
archiving c3550-i9q3l2-mz.121-13.EA1a/html/homepage.htm (3992 bytes)!
archiving c3550-i9q3l2-mz.121-13.EA1a/html/not_supported.html (1392 bytes)
archiving c3550-i9q3l2-mz.121-13.EA1a/html/common.js (9529 bytes)!!
archiving c3550-i9q3l2-mz.121-13.EA1a/html/cms_splash.gif (22152 bytes)!!!!!
archiving c3550-i9q3l2-mz.121-13.EA1a/html/cms_13.html (1211 bytes)
archiving c3550-i9q3l2-mz.121-13.EA1a/html/cluster.html (2823 bytes)!
archiving c3550-i9q3l2-mz.121-13.EA1a/html/Redirect.jar (4195 bytes)!
archiving c3550-i9q3l2-mz.121-13.EA1a/html/mono_disc.sgz (16232 bytes)!!!
archiving c3550-i9q3l2-mz.121-13.EA1a/html/CMS.sgz (1343769 

bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
archiving c3550-i9q3l2-mz.121-13.EA1a/html/images.sgz (86920 bytes)!!!!!!!!!!!!!!!!!
archiving c3550-i9q3l2-mz.121-13.EA1a/html/help.sgz (316438 

bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
archiving c3550-i9q3l2-mz.121-13.EA1a/html/CiscoChartPanel.sgz (135599 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!
archiving c3550-i9q3l2-mz.121-13.EA1a/html/cms_boot.jar (58863 bytes)!!!!!!!!!!!!
archiving c3550-i9q3l2-mz.121-13.EA1a/c3550-i9q3l2-mz.121-13.EA1a.bin (3247886 

bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
archiving c3550-i9q3l2-mz.121-13.EA1a/info (255 bytes)!


PC机器,TFTP目录下可以找到c3550.tar文件,这就是整个IOS的备份!
注意:如果上面命令中不是输入tftp://192.168.1.2/c3550.tar,直接是c3550.tar,则生成.tar文件在flash中

可以用命令上传到TFTP服务器
3550# copy flash tftp
Address or name of remote host []: 192.168.1.2    //注释:TFTP server IP
Source filename []: c3550.tar    //注释:源文件名,flash在前,说明从c3550 flash上传TFPT服务器
Destination filename [c3550.tar]: c3550.tar     //注释:目标文件名



3、从TFTP服务器上(PC机器)下载新IOS文件 12.4EMI

由于考虑到设备flash大小不够大,所以要把现有的IOS刪除掉,以便新的IOS顺利上到flash
12.4EMI 文件大约11,581,440 字节

catalyst3550#format flash:
format operation may take a while. Continue? [confirm]
format operation will destroy all data in "flash:".  Continue? [confirm]

有点慢,等待……
flashfs[1]: 0 files, 1 directories
flashfs[1]: 0 orphaned files, 0 orphaned directories
flashfs[1]: Total bytes: 7741440
flashfs[1]: Bytes used: 1024
flashfs[1]: Bytes available: 7740416
flashfs[1]: flashfs fsck took 6 seconds.
format of flash complete

catalyst3550#sh flash

Directory of flash:/

No files in directory


首先,把c3550-ipservicesk9-tar.122-44.SE.tar放到PC机器TFTP目录中 
然后,3550下载并且解压tar包

catalyst3550#archive tar /xtract tftp://192.168.1.2/c3550-ipservicesk9-tar.122-44.SE.tar flash:
TFTP
有点慢,继续等待……

也可以用命令
A 下载
3550# copy tftp flash
Address or name of remote host []: 192.168.1.2
Source filename []: c3550-ipservicesk9-tar.122-44.SE.tar
Destination filename [c3550-ipservicesk9-tar.122-44.SE.tar]:

注意:tftp在前,表示源在TFTP;flash在前,表示源在flash
这样就很好地区分上传、下载了!!!

B 解压tar包
catalyst3550#archive tar /xtract c3550-ipservicesk9-tar.122-44.SE.tar flash:


下载解压完毕后,查看文件大小

catalyst3550#dir
Directory of flash:/

    2  -rwx         285   Mar 01 1993 01:31:07  info
    3  drwx         128   Mar 01 1993 01:37:38  c3550-ipservicesk9-mz.122-44.SE
  317  -rwx         285   Mar 01 1993 01:38:41  info.ver

15998976 bytes total (4562432 bytes free)

4
、设置boot启动文件


QUOTE:
catalyst3550#sh boot
BOOT path-list:       flash:c3550-i9q3l2-mz.121-13.EA1a/c3550-i9q3l2-mz.121-13.EA1a.bin
Config file:          flash:/config.text
Private Config file:  flash:/private-config.text
Enable Break:         no
Manual Boot:          no
HELPER path-list:     
NVRAM/Config file
      buffer size:    393216

查看,还是原来的启动文件
设置boot为新IOS文件
首先,查看新IOS文件.bin在什么位置
catalyst3550#dir
Directory of flash:/

    2  -rwx         285   Mar 1 1993 01:31:07 +00:00  info
    3  drwx         128   Mar 1 1993 01:37:38 +00:00  c3550-ipservicesk9-mz.122-44.SE  
  317  -rwx         285   Mar 1 1993 01:38:41 +00:00  info.ver
  318  -rwx           0   Mar 1 1993 01:51:17 +00:00  env_vars
  319  -rwx         353   Mar 1 1993 01:51:17 +00:00  system_env_vars
  320  -rwx        5537   Mar 1 1993 00:10:38 +00:00  config.text
  321  -rwx        1048   Mar 1 1993 00:10:38 +00:00  multiple-fs
  323  -rwx        1096   Mar 1 1993 00:08:47 +00:00  vlan.dat
  324  -rwx          24   Mar 1 1993 00:10:38 +00:00  private-config.text

15998976 bytes total (4552192 bytes free)
catalyst3550#cd c3550-ipservicesk9-mz.122-44.SE
catalyst3550#dir
Directory of flash:/c3550-ipservicesk9-mz.122-44.SE/

    4  -rwx     9698361   Mar 1 1993 01:37:38 +00:00  c3550-ipservicesk9-mz.122-44.SE.bin
    5  drwx        4224   Mar 1 1993 01:38:15 +00:00  html

15998976 bytes total (4552192 bytes free)
catalyst3550#
catalyst3550#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
catalyst3550(config)#boot system flash:/c3550-ipservicesk9-mz.122-44.SE/c3550-ipservicesk9-mz.122-44.SE.bin 
catalyst3550(config)#^Z
catalyst3550#

catalyst3550#sh boot
BOOT path-list:       flash:/c3550-ipservicesk9-mz.122-44.SE/c3550-ipservicesk9-mz.122-44.SE.bin
Config file:          flash:/config.text
Private Config file:  flash:/private-config.text
Enable Break:         no
Manual Boot:          no
HELPER path-list:     
NVRAM/Config file
      buffer size:    393216
catalyst3550#wr

注意一定要保存呀!!!



5、重启catalyst3550设备
catalyst3550#reload
Proceed with reload? [confirm]


注意事项:
1、路径和目标文件不一致问题
在升级过程中一定要小心,在敲命令行的时候特别要仔细,特别是在改动启动路径的时候,如果启动路径和flash里面的IOS不相同的话,是启动不了的。
解决方法:
switch模式下,查看系统启动路径的全称
Interrupt within 5 seconds to abort boot process.
Boot process failed...
The system is unable to boot automatically.  The BOOT
environment variable needs to be set to a bootable
image.
switch: set
ASSEMBLY_REVISION_NUM=B0
BOOT=flash:c3550-smi.bin
MAC_ADDR=00:04:4D:72:87:C0
MODEL_NUM=WS-C3524-XL-EN
MODEL_REVISION_NUM=A0
MOTHERBOARD_ASSEMBLY_NUM=73-3904-11
MOTHERBOARD_SERIAL_NUM=FAB0445F1YR
POWER_SUPPLY_PART_NUM=34-0851-02
POWER_SUPPLY_SERIAL_NUM=NONE
SYSTEM_SERIAL_NUM=FAA0446W0XD
switch:

查看flashIOS的完全名称
switch: dir flash:
Directory of flash:/
2    -rwx  1645824   <date>               c35550-smi.bin
3    -rwx  1564      <date>               config.text
4    drwx  6784      <date>               html
111  -rwx  1367      <date>               01
112  -rwx  600       <date>               vlan.dat
114  -rwx  290       <date>               env_vars
936960 bytes available (2675712 bytes used)
switch:
flash里面的IOS的名称改成和boot里面的一致

switch: rename flash:c35550-smi.bin flash:c3550-smi.bin
switch: 
switch: 
switch: dir flash:
Directory of flash:/
2    -rwx  1645824   <date>               c3550-smi.bin
3    -rwx  1564      <date>               config.text
4    drwx  6784      <date>               html
111  -rwx  1367      <date>               01
112  -rwx  600       <date>               vlan.dat
114  -rwx  290       <date>               env_vars
936960 bytes available (2675712 bytes used)
switch:
重新启动设备

switch: reset
Are you sure you want to reset the system (y/n)?y
System resetting...

2
IOS文件损坏或者其他导致IOS损坏不能正常启动
如果在升级过程中出现断电或者其他原因导致IOS没有完全写入flash中,但是flash中旧的IOS又已经被删除掉了。
解决方法:
只能采用超级终端用Xmodem来把IOS传到设备
超級终端的设置采用默认设置就行了!
switch模式下执行采用xmodem
(很长时间,打印40分钟)
重启设备
传完后,重启设备就ok啦。

3、启动路径不完全,导致设备不能正常启动
在升级过程中的最后一步,修改启动路径时,如果把路径写错了,导致设备不能正常启动。
解决方法:
比如本来正确的是boot system flash:c3550-smi.bin,结果写成了boot  system c3550-smi.bin
set命令查看设备当前运行的路径

switch: set
ASSEMBLY_REVISION_NUM=B0
BOOT=c3550-smi.bin
MAC_ADDR=00:04:4D:72:87:C0
MODEL_NUM=WS-C3524-XL-EN
錯誤!未找到圖形專案表。
MODEL_REVISION_NUM=A0
MOTHERBOARD_ASSEMBLY_NUM=73-3904-11
MOTHERBOARD_SERIAL_NUM=FAB0445F1YR
POWER_SUPPLY_PART_NUM=34-0851-02
POWER_SUPPLY_SERIAL_NUM=NONE
SYSTEM_SERIAL_NUM=FAA0446W0XD
switch:
set命令修改BOOT路径

switch: set boot flash:c3550-smi.bin
switch: set
ASSEMBLY_REVISION_NUM=B0
BOOT=flash:c3550-smi.bin
MAC_ADDR=00:04:4D:72:87:C0
MODEL_NUM=WS-C3524-XL-EN
MODEL_REVISION_NUM=A0
MOTHERBOARD_ASSEMBLY_NUM=73-3904-11
MOTHERBOARD_SERIAL_NUM=FAB0445F1YR
POWER_SUPPLY_PART_NUM=34-0851-02
POWER_SUPPLY_SERIAL_NUM=NONE
SYSTEM_SERIAL_NUM=FAA0446W0XD
switch:

重启启动就OK了!