美文网首页
实战H3C交换机升级固件

实战H3C交换机升级固件

作者: 王忘杰 | 来源:发表于2022-04-23 10:35 被阅读0次

一、前言

通常情况下,交换机是非常稳定的,但只要是软件就会有bug,所以设备厂家都会提供固件的更新,比如我使用的华三交换机,就出现了一些奇奇怪怪的问题,随即想到升级固件试一下。

二、固件下载

华三交换机固件下载地址在华三官网 首页-支持-文档与软件-软件下载-交换机

https://www.h3c.com/cn/Service/Document_Software/Software_Download/Switches/

官方提供了下载专用的用户名密码

用户名:yx800

密码:01230123

注意:华三交换机的系统固件和BootRom已经放在一块了,一次升级即可全部升级。

注意:不同固件的华三命令稍有不同,若命令无法执行,用问号?可查看详细提示。

我的交换机型号为H3C S5120-28P-SI,能够选择的最新的固件为H3C S5120SI_E-CMW520-R1519P06,下载该型号并解压出

S5120SI_E-CMW520-R1519P06.bin

三、TFTP环境准备

下载3CDaemon汉化版,并配置TFTP服务

配置服务目录

注意:关闭系统防火墙或添加端口

四、交换机清空配置并直连电脑

清空的目的是为了防止有配置兼容问题

<H3C>reset saved-configuration

The saved configuration file will be erased. Are you sure? [Y/N]:y

Configuration file in flash is being cleared.

Please wait ...

Configuration file is cleared.

<H3C>reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

This command will reboot the device. Current configuration may be lost in next startup if you continue. Continue? [Y/N]:y

System is rebooting now.

为交换机配置vlanip与电脑互联,电脑IP为192.168.18.2

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]int vlan 1

[H3C-Vlan-interface1]ip add 192.168.18.1 24

[H3C-Vlan-interface1]ping 192.168.18.2

  PING 192.168.18.2: 56  data bytes, press CTRL_C to break

    Reply from 192.168.18.2: bytes=56 Sequence=1 ttl=64 time=7 ms

    Reply from 192.168.18.2: bytes=56 Sequence=2 ttl=64 time=3 ms

    Reply from 192.168.18.2: bytes=56 Sequence=3 ttl=64 time=3 ms

    Reply from 192.168.18.2: bytes=56 Sequence=4 ttl=64 time=3 ms

  --- 192.168.18.2 ping statistics ---

    4 packet(s) transmitted

    4 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 3/4/7 ms

五、上传固件

空间充裕

[H3C-Vlan-interface1]quit

[H3C]quit

<H3C>dir

Directory of flash:/

  0    -rw-      341  Apr 26 2000 12:10:45  system.xml

  1    -rw-  10184320  Jun 29 2010 14:14:25  s5120si-cmw520-r1101p10.bin

  2    drw-        -  Apr 26 2000 12:00:02  logfile

97920 KB total (81690 KB free)

上传固件

<H3C>tftp 192.168.18.2 get  S5120SI_E-CMW520-R1519P06.bin

  File will be transferred in binary mode

  Downloading file from remote TFTP server, please wait.../

  TFTP: 14877696 bytes received in 118 second(s)

  File downloaded successfully.

<H3C>dir

Directory of flash:/

  0    -rw-  14877696  Apr 26 2000 12:19:55  s5120si_e-cmw520-r1519p06.bin

  1    -rw-      341  Apr 26 2000 12:10:45  system.xml

  2    -rw-  10184320  Jun 29 2010 14:14:25  s5120si-cmw520-r1101p10.bin

  3    drw-        -  Apr 26 2000 12:00:02  logfile

97920 KB total (67158 KB free)

六、安装固件

配置新固件为第一启动项

<H3C>boot-loader file flash:/s5120si_e-cmw520-r1519p06.bin main

  This command will set the boot file. 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. Current configuration may be lost in next startup if you continue. Continue? [Y/N]:y

Reboot device by command.

System is rebooting now.

自动安装固件,全程等待,直至自动进入系统

Starting......

    ************************************************************************

    *                                                                      *

    *              H3C S5120-28P-SI BOOTROM, Version 119                  *

    *                                                                      *

    ************************************************************************

    Creation Date      : Feb  3 2010

    CPU L1 Cache        : 32KB

    CPU Clock Speed    : 333MHz

    Memory Size        : 128MB

    Flash Size          : 128MB

    CPLD Version        : 002

    PCB Version        : Ver.B

    Mac Address        : C4CAD99DD5A6

Press Ctrl-B to enter Extended Boot menu...0

Starting to get the main application

file--flash:/s5120si_e-cmw520-r1519p06.bin!....................................

..............................................................................

The main application file is self-decompressing................................

...............................................................................

...............................................................................

............Done!

Extend BootWare Version is not equal,updating? (Y/N):

Updating extended BootRom...Done!

Basic BootWare Version is not equal,updating? (Y/N):

Updating Basic BootRom...Done!

BootWare updated,System is rebooting now.

Starting......

Press Ctrl+D to access BASIC BOOT MENU

Press Ctrl+T to start memory test

********************************************************************************

*                                                                              *

*                    H3C S5120-28P-SI BOOTROM, Version 180                    *

*                                                                              *

********************************************************************************

Copyright (c) 2004-2017 New H3C Technologies Co., Ltd.

Creation Date      : Aug  9 2017

CPU L1 Cache        : 32KB

CPU Clock Speed    : 333MHz

Memory Size        : 128MB

Flash Size          : 128MB

CPLD Version        : 002

PCB Version        : Ver.B

Mac Address        : C4CAD99DD5A6

the normal and back basic is not equal, update back basic....

the normal and back extend is not equal, update back extend....

Press Ctrl-B to enter Extended Boot menu...0

Starting to get the main application file--flash:/s5120si_e-cmw520-r1519p06.bin!

................................................................................

..................................

The main application file is self-decompressing.................................

................................................................................

................................................................................

.........Done!

System is starting...

Startup configuration file does not exist.

It will take a long time to get configuration file, please wait...

Press CTRL_C to break

Retrieving configuration file failed!

User interface aux0 is available.

Press ENTER to get started.

<H3C>

七、删除旧固件,并为当前交换机保存配置文件

<H3C>del s5120si-cmw520-r1101p10.bin

Delete flash:/s5120si-cmw520-r1101p10.bin?[Y/N]:y

%Delete file flash:/s5120si-cmw520-r1101p10.bin...Done.

<H3C>dir

Directory of flash:/

  0    -rw-      1617  Apr 26 2000 12:01:22  startup.cfg

  1    -rw-      341  Apr 26 2000 12:10:45  systembak.xml

  2    -rw-      7655  Apr 26 2000 12:01:20  config.cwmp

  3    -rw-  14877696  Apr 26 2000 12:19:55  s5120si_e-cmw520-r1519p06.bin

  4    drw-        -  Apr 26 2000 12:00:02  logfile

97920 KB total (67142 KB free)

<H3C>save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

flash:/startup.cfg exists, overwrite? [Y/N]:y

Validating file. Please wait....

Saved the current configuration to mainboard device successfully.

Configuration is saved to device successfully.

八、升级完成

如果升级完成后交换机仍有问题,那就扔了吧

相关文章

网友评论

      本文标题:实战H3C交换机升级固件

      本文链接:https://www.haomeiwen.com/subject/jdqaertx.html