以3650为例:(适用于大部分接入层网络设备,TFTP最好使用tftp32,可以支持大文件)
1、查看3650IOS信息
WH-KJY-HJ-B16-3650-01#sh flash
Directory of flash:/
2 -rwx 1036 Feb 7 2012 13:39:20 +08:00 vlan.dat
3 -rwx 5 Oct 25 2012 16:11:52 +08:00 private-config.text
5 -rwx 7691 Oct 25 2012 16:11:52 +08:00 config.text
6 drwx 192 Mar 1 1993 08:07:03 +08:00 c3650-ipservices-mz.122-35.SE5
15998976 bytes total (5480960 bytes free)
2、由于flash空间不够无法导入新版本的IOS,所以只能删除旧的IOS版本
WH-KJY-HJ-B16-3650-01#cd flash:/c3650-ipservices-mz.122-35.SE5 //进入旧的目录下删除
WH-KJY-HJ-B16-3650-01#dir
Directory of flash:/c3650-ipservices-mz.122-35.SE5/
7 -rwx 8054867 Mar 1 1993 08:05:34 +08:00 c3650-ipservices-mz.122-35.SE5.bin
8 drwx 4224 Mar 1 1993 08:05:57 +08:00 html
509 -rwx 616 Mar 1 1993 08:07:03 +08:00 info
15998976 bytes total (5480960 bytes free)
#delete flash:/c3650-ipservices-mz.122-35.SE5/c3650-ipservices-mz.122-35.SE5.bin //删除旧IOS版本(注意在操作这步前,将之前的IOS备份一份保存,以便出现问题可以回退)
Delete filename [/c3650-ipservices-mz.122-35.SE5/c3650-ipservices-mz.122-35.SE5.bin]?
Delete flash:/c3650-ipservices-mz.122-35.SE5/c3650-ipservices-mz.122-35.SE5.bin? [confirm]
删除完成后查看flash信息:
WH-KJY-HJ-B16-3650-01#sh flash
Directory of flash:/c3650-ipservices-mz.122-35.SE5/
8 drwx 4224 Mar 1 1993 08:05:57 +08:00 html
509 -rwx 616 Mar 1 1993 08:07:03 +08:00 info
15998976 bytes total (13536256 bytes free)
3、导入新的IOS
#copy tftp: c3650-ipservicesk9-mz.122-40.SE.bin flash: c3650-ipservicesk9-mz.122-40.SE.bin
4、查看新的IOS导入后flash信息
WH-KJY-HJ-B16-3650-01#sh flash
Directory of flash:/
2 -rwx 1036 Feb 7 2012 13:39:20 +08:00 vlan.dat
3 -rwx 5 Oct 25 2012 16:11:52 +08:00 private-config.text
4 -rwx 9975530 Mar 5 2013 17:59:01 +08:00 c3650-ipservicesk9-mz.122-40.SE.bin
5 -rwx 7691 Oct 25 2012 16:11:52 +08:00 config.text
6 drwx 128 Mar 5 2013 17:53:23 +08:00 c3650-ipservices-mz.122-35.SE5 //不带bin后缀这种事目录)
15998976 bytes total (3560448 bytes free)
WH-KJY-HJ-B16-3650-01#sh boot
BOOT path-list : flash:c3650-ipservices-mz.122-35.SE5/c3650-ipservices-mz.122-35.SE5.bin
Config file : flash:/config.text
Private Config file : flash:/private-config.text
Enable Break : no
Manual Boot : no
HELPER path-list :
Auto upgrade : yes
Auto upgrade path :
5、更改设备IOS启动顺序,并保存
WH-KJY-HJ-B16-3650-0(config)#boot sys flash:/c3650-ipservicesk9-mz.122-40.SE.bin
WH-KJY-HJ-B16-3650-0(config)#end
WH-KJY-HJ-B16-3650-01#wr
Building configuration...
[OK]
6、查看设备IOS启动项是否是新升级的ios名称
WH-KJY-HJ-B16-3650-01#sh boot
BOOT path-list : flash:/c3650-ipservicesk9-mz.122-40.SE.bin
Config file : flash:/config.text
Private Config file : flash:/private-config.text
Enable Break : no
Manual Boot : no
HELPER path-list :
Auto upgrade : yes
Auto upgrade path :
7、启动项正常后,重启网络设备
WH-KJY-HJ-B16-3650-01#reload
1