交换机、路由器等网络产品的版本升级或者打补丁是非常重要的,必须掌握。一般在初次调试之前,建议升级到官方推荐的最稳定版本,除非必要,尽量避免在设备有配置时升级交换机。因为升级有风险,升级需谨慎。
一、配置需求与说明
本案例分别介绍通过命令行以及bootware升级交换机版本的具体操作步骤。当设备可以正常启动,进入命令行时,可以通过命令行方式升级。如若设备版本丢失或者版本损坏导致无法正常启动,则可以通过bootware菜单升级。
说明:
(1)命令行方式升级 命令少,配置简单,但是只有在设备正常时才能使用(一般选择)
(2)bootware菜单升级 命令多,配置相对复杂,但是万能,可以在设备版本丢失或者版本损坏情况下强制刷版本(被迫选择)
二、配置拓扑
电脑使用网线和console线连接交换机。
说明:console线用来配置命令;网线用来传输交换机版本软件
三、配置步骤
(1)下载上传交换机版本软件到交换机
说明:不论通过命令方式升级还是bootware菜单升级,都必须下载对应交换机版本软件,然后上传到交换机中。
1. 华三官网下载所需要的升级版本,本案例以S5130-EI为例。如若是其他型号,根据具体的型号下载对应版本
点击同意,下载即可。
2. 将下载的压缩包解压成文件夹,能够看到两个文件,我们需要使用的是ipe后缀的文件
3. 在3CDaemon利用TFTP上传所要升级的版本文件夹
上传、下载目录选择文件夹S5130EI_E-CMW710-R3208P10
通过命令行升级
(2)启动交换机,查看初始版本
<H3C>dis version
H3C Comware Software, Version 7.1.070, Release 3208P08
Copyright (c) 2004-2018 New H3C Technologies Co., Ltd. All rights reserved.
H3C S5130-28S-PWR-EI uptime is 1 week, 3 days, 18 hours, 36 minutes
Last reboot reason : User reboot
(3)配置PC和交换机地址,保证PC和交换机之间可以互通
PC地址:192.168.10.1
交换机地址:192.168.10.2
(4)在SecureCRT 中输入命令
<H3C>tftp 192.168.10.1 get S5130EI_E-CMW710-R3208P10.ipe
<H3C>boot-loader file flash:/S5130EI_E-CMW710-R3208P10.ipe slot all main
This command will set the boot file of the specified board. Continue? [Y/N]:y
The specified file will be used as the main boot file at the next reboot on slot 1!
<H3C>reboot
Start to check configuration with next startup configuration file, please wait.........DONE!
This command will reboot the device. Continue? [Y/N]:y
Updating Basic BootRom......
Updating extended BootRom......
BootRom file updating finished
(6)查看实验结果,升级完毕
<H3C>dis version
H3C Comware Software, Version 7.1.070, Release 3208P10
Copyright (c) 2004-2018 New H3C Technologies Co., Ltd. All rights reserved.
H3C S5130-28S-PWR-EI uptime is 1 week, 3 days, 18 hours, 36 minutes
Last reboot reason : User reboot
可以看到,版本已经由Version 7.1.070, Release 3208P08变成了 Version 7.1.070, Release 3208P10
通过Bootware菜单升级
(2)断电重启交换机,当出现Press Ctrl-B to enter Extended Boot menu...3时,迅速按Ctrl+B(也可以开机启动的时候一直按着ctrl+B),进入bootware菜单后,提示输入密码。密码默认为空,直接回车即可,然后显示如下界面:
(3)输入1,回车
(4)输入1,回车,配置如下
Load File Name :S5130EI_E-CMW710-R3208P10.ipe
Server IP Address :192.168.10.1
Local IP Address :192.168.10.2
Subnet Mask :255.255.255.0
Gateway IP Address :0.0.0.0
(5)打开3CDaemon,可以看到数据正在传输,当显示如下界面时,数据传输完毕
(6)当命令行界面出现
Please input the file attribute (Main/Backup/None)时,输入main,回车
(7)输入0,重启交换机。查看结果,升级完毕
<H3C>dis version
H3C Comware Software, Version 7.1.070, Release 3208P10
Copyright (c) 2004-2018 New H3C Technologies Co., Ltd. All rights reserved.
H3C S5130-28S-PWR-EI uptime is 0 week, 0 days, 0 hours, 5 minutes
Last reboot reason : User reboot