• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

H3C 园区盒式交换机典型配置举例-6W106

目录

03-软件升级配置举例

本章节下载 03-软件升级配置举例  (431.62 KB)

03-软件升级配置举例


1  简介

本文档介绍软件升级的典型配置举例。

2  配置前提

本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解软件升级和FTP/TFTP的特性。

3  设备作为TFTP client升级版本配置举例

3.1  组网需求

图1所示,Switch和文件服务器通过交换机相连,Switch作为TFTP客户端,文件服务器作为TFTP服务器。现要求:通过TFTP方式将存储在文件服务器上的文件switch.ipe下载到TFTP客户端,为Switch升级软件版本。

图1 配置组网图

 

3.2  配置思路

Switch作为TFTP客户端,若Switch支持管理用以太网口,建议将IP地址配置在管理用以太网口上;否则,建议将IP地址配置在Vlan-interface1上。

为了使交换机在重启后使用新版本软件,需要指定下次启动时所用的主用启动文件为升级后的软件版本。

3.3  适用产品及版本

表1 适用产品及版本

产品

软件版本

S6812系列

S6813系列

Release 6615Pxx系列、Release 6628Pxx系列

S6550XE-HI系列

Release 6008及以上版本、Release 8106Pxx

S6526XE-HI[EI]系列

Release 8340P02及以上版本

S6510系列

Release 8340P02及以上版本

S6525XE-HI系列

Release 6008及以上版本、Release 8106Pxx

S5850系列

Release 8005及以上版本、Release 8106Pxx

S5570S-EI系列

Release 11xx

S5560X-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5560X-HI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5500V2-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30F

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30C

MS4520V2-54C

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-28S

MS4520V2-24TP

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5000-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4600系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

ES5500系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5500V3-24P-SI

S5500V3-48P-SI

Release 63xx系列

S5500V3-SI系列(除S5500V3-24P-SI、S5500V3-48P-SI)

Release 11xx

S5170-EI系列

Release 11xx

S5130S-HI系列

S5130S-EI[-R]系列

S5130S-SI系列

S5130S-LI系列

Release 63xx系列

S5120V2-SI系列

S5120V2-LI系列

Release 63xx系列

S5120V3-EI系列

Release 11xx

S5120V3-36F-SI

S5120V3-28P-HPWR-SI

S5120V3-54P-PWR-SI

Release 11xx

S5120V3-SI系列(除S5120V3-36F-SI、S5120V3-28P-HPWR-SI、S5120V3-54P-PWR-SI)

Release 63xx系列

S5120V3-LI系列

Release 63xx系列

S3600V3-EI系列

Release 11xx

S3600V3-SI系列

Release 11xx

S3100V3-EI系列

S3100V3-SI系列

Release 63xx系列

S5110V2系列

Release 63xx系列

S5110V2-SI系列

Release 63xx系列

S5000V3-EI系列

S5000V5-EI系列

Release 63xx系列

S5000E-X系列

S5000X-EI系列

Release 63xx系列

E128C

E152C

E500C系列

E500D系列

Release 63xx系列

MS4320V2系列

MS4320V3系列

MS4300V2系列

MS4320系列

MS4200系列

Release 63xx系列

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

Release 63xx系列

WAS6000系列

Release 63xx系列

IE4300-12P-AC & IE4300-12P-PWR

IE4300-M系列

IE4320系列

Release 63xx系列

IE4520系列

Release 66xx系列

S5135S-EI系列

Release 6810及以上版本

 

3.4  配置注意事项

·     当设备剩余的存储空间不够,请使用delete /unreserved file-url命令删除部分暂时不用的文件后再执行升级软件操作。

·     软件升级时需要重启设备,建议使用save命令保存设备的当前配置。

3.5  配置步骤

3.5.1  文件服务器的配置

# 配置文件服务器的IP地址为192.168.100.14/24,与Switch路由可达,具体配置方法略。

# 启动文件服务器上的TFTP服务器功能(以3CDaemon软件为例),设置TFTP服务器下载路径等参数,并开启服务。

图2 配置TFTP服务器

 

3.5.2  Switch的配置

# 配置Switch管理用以太网口的IP地址。(适用于支持管理用以太网口的Switch)

<Switch> system-view

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

[Switch] interface m-gigabitethernet 0/0/0

[Switch-M-GigabitEthernet0/0/0] ip address 192.168.100.66 255.255.255.0

[Switch-M-GigabitEthernet0/0/0] quit

[Switch] quit

# 配置Switch上Vlan-interface1的IP地址。(适用于不支持管理用以太网口的Switch)

[Switch] interface Vlan-interface1

[Switch-Vlan-interface1] ip address 192.168.100.66 255.255.255.0

[Switch-Vlan-interface1] quit

# 在Switch 上ping TFTP服务器地址,能够ping通。

<Switch> ping 192.168.100.14

Ping 192.168.100.14 (192.168.100.14): 56 data bytes, press CTRL_C to break

56 bytes from 192.168.100.14: icmp_seq=0 ttl=64 time=10.701 ms

56 bytes from 192.168.100.14: icmp_seq=1 ttl=64 time=2.678 ms

56 bytes from 192.168.100.14: icmp_seq=2 ttl=64 time=2.282 ms

56 bytes from 192.168.100.14: icmp_seq=3 ttl=64 time=1.617 ms

56 bytes from 192.168.100.14: icmp_seq=4 ttl=64 time=1.701 ms

 

--- Ping statistics for 192.168.100.14 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 1.617/3.796/10.701/3.474 ms

# 执行save命令保存交换机当前配置信息。

<Switch> 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.

# 使用TFTP方式将文件服务器上的软件版本switch.ipe文件下载到Switch上,以缺省文件名switch.ipe保存。

<Switch> tftp 192.168.100.14 get switch.ipe

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 58.7M  100 58.7M    0     0  1193k      0  0:00:50  0:00:50 --:--:-- 1127k

# 指定Switch下次启动时所用的主用启动文件为switch.ipe。

<Switch> boot-loader file flash:/switch.ipe slot 1 main

Verifying the file flash:/switch.ipe on slot 1.....Done.

Images in IPE:

  boot.bin

  system.bin

This command will set the main startup software images. Continue? [Y/N]:y

Add images to slot 1.

Decompressing file switch.bin to flash:/boot.bin.........Done.

Decompressing file switch.bin to flash:/system.bin.................................Done.

The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 1.

# 重启设备。

<Switch> reboot

3.6  验证配置

# 设备重启后,使用display version命令查看设备版本信息。

<Switch> display version

H3C Comware Software, Version 7.1.070, Release xxxx

Copyright (c) 2004-2019 New H3C Technologies Co., Ltd. All rights reserved.

H3C S5130S-52S-HI uptime is 0 weeks, 0 days, 0 hours, 19 minutes

Last reboot reason : User reboot

 

Boot image: flash:/boot.bin

Boot image version: 7.1.070, Release xxxx

  Compiled Jun 18 2019 17:52:09

System image: flash:/system.bin

System image version: 7.1.070, Release xxxx

  Compiled Jun 18 2019 17:52:09

……略……

# 显示本次启动和下次启动所采用的启动软件包的名称。

<Switch> display boot-loader

Software images on slot 1:

Current software images:

  flash:/boot.bin

  flash:/system.bin

Main startup software images:

  flash:/boot.bin

  flash:/system.bin

Backup startup software images:

None

3.7  配置文件

·     支持管理用以太网口的Switch

#

interface M-GigabitEthernet0/0/0

ip address 192.168.100.66 255.255.255.0

#

·     不支持管理用以太网口的Switch

#

interface Vlan-interface1

ip address 192.168.100.66 255.255.255.0

#

4  设备作为FTP client升级版本配置举例

4.1  组网需求

图3所示,Switch和文件服务器通过交换机相连,Switch作为FTP客户端,文件服务器作为FTP服务器。现要求:

·     通过FTP方式为Switch升级软件版本,将存储在文件服务器上的文件switch.ipe下载到FTP客户端。

·     配置FTP客户端登录FTP服务器的用户名为123456,密码为123456。

图3 配置组网图

 

4.2  配置思路

Switch作为FTP客户端,若Switch支持管理用以太网口,建议将IP地址配置在管理用以太网口上;否则,建议将IP地址配置在Vlan-interface1上。

为了使交换机在重启后使用新软件版本,需要指定下次启动时所用的主用启动文件为升级后的软件版本。

4.3  适用产品及版本

表2 适用产品及版本

产品

软件版本

S6812系列

S6813系列

Release 6615Pxx系列、Release 6628Pxx系列

S6550XE-HI系列

Release 6008及以上版本、Release 8106Pxx

S6526XE-HI[EI]系列

Release 8340P02及以上版本

S6510系列

Release 8340P02及以上版本

S6525XE-HI系列

Release 6008及以上版本、Release 8106Pxx

S5850系列

Release 8005及以上版本、Release 8106Pxx

S5570S-EI系列

Release 11xx

S5560X-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5560X-HI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5500V2-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30F

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30C

MS4520V2-54C

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-28S

MS4520V2-24TP

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5000-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4600系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

ES5500系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5500V3-24P-SI

S5500V3-48P-SI

Release 63xx系列

S5500V3-SI系列(除S5500V3-24P-SI、S5500V3-48P-SI)

Release 11xx

S5170-EI系列

Release 11xx

S5130S-HI系列

S5130S-EI[-R]系列

S5130S-SI系列

S5130S-LI系列

Release 63xx系列

S5120V2-SI系列

S5120V2-LI系列

Release 63xx系列

S5120V3-EI系列

Release 11xx

S5120V3-36F-SI

S5120V3-28P-HPWR-SI

S5120V3-54P-PWR-SI

Release 11xx

S5120V3-SI系列(除S5120V3-36F-SI、S5120V3-28P-HPWR-SI、S5120V3-54P-PWR-SI)

Release 63xx系列

S5120V3-LI系列

Release 63xx系列

S3600V3-EI系列

Release 11xx

S3600V3-SI系列

Release 11xx

S3100V3-EI系列

S3100V3-SI系列

Release 63xx系列

S5110V2系列

Release 63xx系列

S5110V2-SI系列

Release 63xx系列

S5000V3-EI系列

S5000V5-EI系列

Release 63xx系列

S5000E-X系列

S5000X-EI系列

Release 63xx系列

E128C

E152C

E500C系列

E500D系列

Release 63xx系列

MS4320V2系列

MS4320V3系列

MS4300V2系列

MS4320系列

MS4200系列

Release 63xx系列

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

Release 63xx系列

WAS6000系列

Release 63xx系列

IE4300-12P-AC & IE4300-12P-PWR

IE4300-M系列

IE4320系列

Release 63xx系列

IE4520系列

Release 66xx系列

S5135S-EI系列

Release 6810及以上版本

 

4.4  配置注意事项

·     当设备剩余的内存空间不够,请使用delete /unreserved file-url命令删除部分暂时不用的文件后再执行升级软件操作。

·     确保主机和Switch的FTP用户名、密码及文件名等参数保持一致。

4.5  配置步骤

4.5.1  文件服务器的配置

# 配置文件服务器的IP地址为192.168.100.14/24,使得与Switch路由可达,具体配置方法略。

# 启动文件服务器上的FTP功能(以3CDaemon软件为例),设置FTP服务器下载路径、FTP用户名和密码,并开启FTP服务。

图4 配置FTP服务器

 

4.5.2  Switch的配置

# 配置Switch管理以太网接口IP地址。(适用于支持管理用以太网口的Switch)

<Switch> system-view

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

[Switch] interface m-gigabitethernet 0/0/0

[Switch-M-GigabitEthernet0/0/0] ip address 192.168.100.66 255.255.255.0

[Switch-M-GigabitEthernet0/0/0] quit

[Switch] quit

# 配置Switch上Vlan-interface1的IP地址。(适用于不支持管理用以太网口的Switch)

[Switch] interface Vlan-interface1

[Switch-Vlan-interface1] ip address 192.168.100.66 255.255.255.0

[Switch-Vlan-interface1] quit

# 在Switch上ping文件服务器地址,能够ping通。

<Switch> ping 192.168.100.14

Ping 192.168.100.14 (192.168.100.14): 56 data bytes, press CTRL_C to break

56 bytes from 192.168.100.14: icmp_seq=0 ttl=64 time=10.701 ms

56 bytes from 192.168.100.14: icmp_seq=1 ttl=64 time=2.678 ms

56 bytes from 192.168.100.14: icmp_seq=2 ttl=64 time=2.282 ms

56 bytes from 192.168.100.14: icmp_seq=3 ttl=64 time=1.617 ms

56 bytes from 192.168.100.14: icmp_seq=4 ttl=64 time=1.701 ms

 

--- Ping statistics for 192.168.100.14 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 1.617/3.796/10.701/3.474 ms

# 执行save命令保存交换机当前配置信息。

<Switch> 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...

Configuration is saved to  mainboard device successfully.

# 以用户名123456、密码123456登录FTP服务器。

<Switch> ftp 192.168.100.14

Connected to 192.168.100.14 (192.168.100.14).

220 3Com 3CDaemon FTP Server Version 2.0

User (192.168.100.14:(none)): 123456

331 User name ok, need password

Password:

230 User logged in

Remote system type is UNIX.

Using binary mode to transfer files.

# 将文件switch.ipe从FTP服务器下载到Switch上。

ftp> get switch.ipe

227 Entering passive mode (192,168,100,14,8,86)

125 Using existing data connection

226 Closing data connection; File transfer successful.

50445056 bytes received in 53.6 seconds (1.25 Mbyte/s)

ftp> quit

# 指定Switch下次启动时所用的主用启动文件为switch.ipe。

<Switch> boot-loader file flash:/switch.ipe slot 1 main

Verifying the file flash:/switch.ipe on slot 1.....Done.

Images in IPE:

  boot.bin

  system.bin

This command will set the main startup software images. Continue? [Y/N]:y

Add images to slot 1.

Decompressing file switch.bin to flash:/boot.bin.........Done.

Decompressing file switch.bin to flash:/system.bin.................................Done.

The images that have passed all examinations will be used as the main startup software images at the next reboot on on slot 1.

# 重启设备。

<Switch> reboot

4.6  验证配置

# 设备重启后,使用display version命令查看设备版本信息。

<Switch> display version

H3C Comware Software, Version 7.1.070, Release xxxx

Copyright (c) 2004-2019 New H3C Technologies Co., Ltd. All rights reserved.

H3C S5130S-52S-HI uptime is 0 weeks, 0 days, 0 hours, 19 minutes

Last reboot reason : User reboot

 

Boot image: flash:/boot.bin

Boot image version: 7.1.070, Release xxxx

  Compiled Jun 18 2019 17:52:09

System image: flash:/system.bin

System image version: 7.1.070, Release xxxx

  Compiled Jun 18 2019 17:52:09

……略……

# 显示本次启动和下次启动所采用的启动软件包的名称。

<Switch> display boot-loader

Software images on slot 1:

Current software images:

  flash:/boot.bin

  flash:/system.bin

Main startup software images:

  flash:/boot.bin

  flash:/system.bin

Backup startup software images:

None

4.7  配置文件

·     支持管理用以太网口的Switch

#

interface M-GigabitEthernet0/0/0

ip address 192.168.100.66 255.255.255.0

#

·     不支持管理用以太网口的Switch

#

interface Vlan-interface1

ip address 192.168.100.66 255.255.255.0

#

5  设备作为FTP server升级版本配置举例

5.1  组网需求

图5所示,Switch和文件服务器通过交换机相连,Switch作为FTP服务器,文件服务器作为FTP客户端。

现要求:

·     通过FTP方式为Switch升级软件版本,将存储在FTP客户端上的文件switch.ipe上传到FTP服务器。

·     配置FTP客户端登录FTP服务器的用户名为abc,密码为a123456789。

图5 配置组网图

 

5.2  配置思路

Switch作为FTP服务器,若Switch支持管理用以太网口,建议将IP地址配置在管理用以太网口上;否则,建议将IP地址配置在Vlan-interface1上。

为了使交换机在重启后使用新软件版本,需要指定下次启动时所用的主用启动文件为升级后的软件版本。

5.3  适用产品及版本

表3 适用产品及版本

产品

软件版本

S6812系列

S6813系列

Release 6615Pxx系列、Release 6628Pxx系列

S6550XE-HI系列

Release 6008及以上版本、Release 8106Pxx

S6526XE-HI[EI]系列

Release 8340P02及以上版本

S6510系列

Release 8340P02及以上版本

S6525XE-HI系列

Release 6008及以上版本、Release 8106Pxx

S5850系列

Release 8005及以上版本、Release 8106Pxx

S5570S-EI系列

Release 11xx

S5560X-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5560X-HI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5500V2-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30F

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30C

MS4520V2-54C

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-28S

MS4520V2-24TP

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5000-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4600系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

ES5500系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5500V3-24P-SI

S5500V3-48P-SI

Release 63xx系列

S5500V3-SI系列(除S5500V3-24P-SI、S5500V3-48P-SI)

Release 11xx

S5170-EI系列

Release 11xx

S5130S-HI系列

S5130S-EI[-R]系列

S5130S-SI系列

S5130S-LI系列

Release 63xx系列

S5120V2-SI系列

S5120V2-LI系列

Release 63xx系列

S5120V3-EI系列

Release 11xx

S5120V3-36F-SI

S5120V3-28P-HPWR-SI

S5120V3-54P-PWR-SI

Release 11xx

S5120V3-SI系列(除S5120V3-36F-SI、S5120V3-28P-HPWR-SI、S5120V3-54P-PWR-SI)

Release 63xx系列

S5120V3-LI系列

Release 63xx系列

S3600V3-EI系列

Release 11xx

S3600V3-SI系列

Release 11xx

S3100V3-EI系列

S3100V3-SI系列

Release 63xx系列

S5110V2系列

Release 63xx系列

S5110V2-SI系列

Release 63xx系列

S5000V3-EI系列

S5000V5-EI系列

Release 63xx系列

S5000E-X系列

S5000X-EI系列

Release 63xx系列

E128C

E152C

E500C系列

E500D系列

Release 63xx系列

MS4320V2系列

MS4320V3系列

MS4300V2系列

MS4320系列

MS4200系列

Release 63xx系列

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

Release 63xx系列

WAS6000系列

Release 63xx系列

IE4300-12P-AC & IE4300-12P-PWR

IE4300-M系列

IE4320系列

Release 63xx系列

IE4520系列

Release 66xx系列

S5135S-EI系列

Release 6810及以上版本

 

5.4  配置注意事项

·     当设备剩余的内存空间不够,请使用delete /unreserved file-url命令删除部分暂时不用的文件后再执行升级软件操作。

·     确保主机和Switch的FTP用户名、密码及文件名等参数保持一致。

·     在Switch和主机之间进行FTP传输,需要选择binary方式传输文件。

5.5  配置步骤

5.5.1  Switch上配置FTP服务器

# 配置Switch管理以太网接口IP地址。(适用于支持管理用以太网口的Switch)

<Switch> system-view

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

[Switch] interface m-gigabitethernet 0/0/0

[Switch-M-GigabitEthernet0/0/0] ip address 192.168.100.66 255.255.255.0

[Switch-M-GigabitEthernet0/0/0] quit

# 配置Switch上Vlan-interface1的IP地址。(适用于不支持管理用以太网口的Switch)

[Switch] interface Vlan-interface1

[Switch-Vlan-interface1] ip address 192.168.100.66 255.255.255.0

[Switch-Vlan-interface1] quit

# 在Switch上添加一个FTP用户abc,并设置其认证密码为a123456789。

[Switch] local-user abc

[Switch-luser-manage-abc] password simple a123456789

# 配置用户角色为network-admin。

[Switch-luser-manage-abc] authorization-attribute user-role network-admin

# 为保证FTP客户端仅使用授权的用户角色network-admin,删除缺省用户角色network-operator。

[Switch-luser-manage-abc] undo authorization-attribute user-role network-operator

# 配置服务类型为FTP。

[Switch-luser-manage-abc] service-type ftp

[Switch-luser-manage-abc] quit

# 启动Switch的FTP服务功能。

[Switch] ftp server enable

[Switch] quit

# 执行save命令保存交换机当前配置信息。

<Switch> 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.

5.5.2  文件服务器的配置

# 配置文件服务器的IP地址为192.168.100.14/24,使得到Switch路由可达,具体配置方法略。

# 从文件服务器登录FTP server,本例以Windows命令提示符界面为例。

C:\Documents and Settings\Administrator> ftp 192.168.100.66

Connected to 192.168.100.66.

220 FTP service ready.

# 以用户名abc、密码a123456789登录FTP服务器。

User (192.168.100.66:(none)): abc

331 Password required for abc.

Password:

230 User logged in.

# 使用lcd命令,将FTP客户端本地的工作路径切换到软件版本所在的目录下。

ftp> lcd E:\

Local directory now E:\

# 将传输模式设置为binary方式。

ftp> binary

200 TYPE is now 8-bit binary

# 将本地switch.ipe文件上传到FTP服务器上,缺省以文件名switch.ipe保存。

ftp> put switch.ipe

200 PORT command successful

150 Connecting to port 2903

226 File successfully transferred

ftp: 发送 50445056 字节,用时 1.05Seconds 67282.77Kbytes/sec.

# 使用ls命令查看FTP服务器上是否有文件。

ftp> ls switch.ipe

200 PORT command successful

150 Connecting to port 3391

switch.ipe

226 1 matches total

ftp: 收到 24 字节,用时 0.00Seconds 24000.00Kbytes/sec.

# 终止与FTP Server的连接,并退回到用户视图。

ftp> bye

5.5.3  Switch上配置启动文件

# 指定Switch下次启动时所用的主用启动文件为switch.ipe。

<Switch> boot-loader file flash:/switch.ipe slot 1 main

Verifying the IPE file and the images.....Done.

Verifying the file flash:/switch.ipe on slot 1.....Done.

Images in IPE:

  boot.bin

  system.bin

This command will set the main startup software images. Continue? [Y/N]:y

Add images to slot 1.

Decompressing file switch.bin to flash:/boot.bin.........Done.

Decompressing file switch.bin to flash:/system.bin.................................Done.

The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 1.

# 重启设备。

<Switch> reboot

5.6  验证配置

# 设备重启后,使用display version命令查看设备版本信息。

<Switch> display version

H3C Comware Software, Version 7.1.070, Release xxxx

Copyright (c) 2004-2019 New H3C Technologies Co., Ltd. All rights reserved.

H3C S5130S-52S-HI uptime is 0 weeks, 0 days, 0 hours, 19 minutes

Last reboot reason : User reboot

 

Boot image: flash:/boot.bin

Boot image version: 7.1.070, Release xxxx

  Compiled Jun 18 2019 17:52:09

System image: flash:/system.bin

System image version: 7.1.070, Release xxxx

  Compiled Jun 18 2019 17:52:09

……略……

# 显示本次启动和下次启动所采用的启动软件包的名称。

<Switch> display boot-loader

Software images on slot 1:

Current software images:

  flash:/boot.bin

  flash:/system.bin

Main startup software images:

  flash:/boot.bin

  flash:/system.bin

Backup startup software images:

None

5.7  配置文件

·     支持管理用以太网口的Switch

#

interface M-GigabitEthernet0/0/0

ip address 192.168.100.66 255.255.255.0

#

local-user abc class manage

 password hash $h$6$YMVbbwFL/vviWcQu$+CuTbYCehNZtZo5RCXiadpYbXYWa2omt5TUtEh3UPCg3fZjxYCp5WzbuE2GoowVi2YA/BK+mnSZJZqi5jRDuCg==

 service-type ftp

 authorization-attribute user-role network-admin

#

 ftp server enable

#

·     不支持管理用以太网口的Switch

#

interface Vlan-interface1

ip address 192.168.100.66 255.255.255.0

#

local-user abc class manage

 password hash $h$6$YMVbbwFL/vviWcQu$+CuTbYCehNZtZo5RCXiadpYbXYWa2omt5TUtEh3UPCg3fZjxYCp5WzbuE2GoowVi2YA/BK+mnSZJZqi5jRDuCg==

 service-type ftp

 authorization-attribute user-role network-admin

#

 ftp server enable

#

6  设备采用BootWare TFTP方式升级软件配置举例

6.1  组网需求

图6所示,文件服务器与Device的管理以太网接口M-GigabitEthernet0/0/0相连,Host通过串口线连接Device的Console口。现由于设备问题,不能正常启动Device。

现要求:使用BootWare菜单升级Device的软件版本。

图6 配置组网图

 

6.2  适用产品及版本

表4 适用产品及版本

产品

软件版本

S6812系列

S6813系列

Release 6615Pxx系列、Release 6628Pxx系列

S6550XE-HI系列

Release 6008及以上版本、Release 8106Pxx

S6526XE-HI[EI]系列

Release 8340P02及以上版本

S6510系列

Release 8340P02及以上版本

S6525XE-HI系列

Release 6008及以上版本、Release 8106Pxx

S5850系列

Release 8005及以上版本、Release 8106Pxx

S5570S-EI系列

Release 11xx

S5560X-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5560X-HI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5500V2-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30F

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30C

MS4520V2-54C

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-28S

MS4520V2-24TP

Release 63xx系列

S6520X-HI系列

S6520X-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S6520X-SI系列

S6520-SI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5000-EI系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4600系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

ES5500系列

Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5560S-EI系列

S5560S-SI系列

Release 63xx系列

S5500V3-24P-SI

S5500V3-48P-SI

Release 63xx系列

S5500V3-SI系列(除S5500V3-24P-SI、S5500V3-48P-SI)

Release 11xx

S5170-EI系列

Release 11xx

S5130S-HI系列

S5130S-EI[-R]系列

S5130S-SI系列

S5130S-LI系列

Release 63xx系列

S5120V2-SI系列

S5120V2-LI系列

Release 63xx系列

S5120V3-EI系列

Release 11xx

S5120V3-36F-SI

S5120V3-28P-HPWR-SI

S5120V3-54P-PWR-SI

Release 11xx

S5120V3-SI系列(除S5120V3-36F-SI、S5120V3-28P-HPWR-SI、S5120V3-54P-PWR-SI)

Release 63xx系列

S5120V3-LI系列

Release 63xx系列

S3600V3-EI系列

Release 11xx

S3600V3-SI系列

Release 11xx

S3100V3-EI系列

S3100V3-SI系列

Release 63xx系列

S5110V2系列

Release 63xx系列

S5110V2-SI系列

Release 63xx系列

S5000V3-EI系列

S5000V5-EI系列

Release 63xx系列

S5000E-X系列

S5000X-EI系列

Release 63xx系列

E128C

E152C

E500C系列

E500D系列

Release 63xx系列

MS4320V2系列

MS4320V3系列

MS4300V2系列

MS4320系列

MS4200系列

Release 63xx系列

WS5850-WiNet系列

Release 63xx系列

WS5820-WiNet系列

WS5810-WiNet系列

Release 63xx系列

WAS6000系列

Release 63xx系列

IE4300-12P-AC & IE4300-12P-PWR

IE4300-M系列

IE4320系列

Release 63xx系列

IE4520系列

Release 66xx系列

S5135S-EI系列

Release 6810及以上版本

 

6.3  配置注意事项

·     确保在文件服务器上开启TFTP服务器功能。

·     当设备剩余的存储空间不够,请使用delete /unreserved file-url命令删除部分暂时不用的文件后,再执行升级软件操作。

·     将交换机的升级启动文件拷贝到文件服务器上,并正确设置TFTP服务器的访问路径。

6.4  配置步骤

6.4.1  Host的配置

# 使用串口线,从主机连至Device的Console口。

# 通过超级终端或PuTTY等终端仿真程序与设备建立连接。这些程序的详细介绍和使用方法请参见该程序的使用指导。打开终端仿真程序后,请按如下要求设置终端参数:

·     波特率:9600

·     数据位:8

·     停止位:1

·     奇偶校验:无

·     流量控制:无

6.4.2  文件服务器的配置

# 配置文件服务器的IP地址为192.168.100.14/24,具体配置步骤略。

# 启动文件服务器的TFTP服务器设置TFTP服务器下载路径等参数,并开启服务。

6.4.3  Device的配置

说明

各产品的BootWare菜单存在差异,本配置以S6550XE-56HF-HI产品为例,其它产品的实际显示信息请以实际情况为准。

 

# 使用直通线从TFTP服务器连接到设备的管理以太网接口M-GigabitEthernet 0/0/0上(已使用串口线从主机连接至Device的Console口)。

# 将设备的当前配置保存到指定文件。

<Device> system-view

[Device] 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.

[Device] quit

# 重启设备。

<Device> reboot

# 交换机上加电重启的过程中,在配置终端的屏幕上将显示:

Starting......

Press Ctrl+D to access BASIC BOOT MENU...

Press Ctrl+T to start heavy memory test

Booting extended BootRom

The extended BootRom is self-decompressing......Done.

 

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

*                                                                              *

*                   H3C S6550XE-56HF-HI BOOTROM, Version 103                   *

*                                                                              *

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

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

 

Creation Date         : Mar 30 2021

Memory Type           : DDR4 SDRAM

Memory Size           : 3072MB

Memory Speed          : 800MHz

Flash Size            : 1024MB

CPLD 1 Version        : 001

CPLD 2 Version        : 001

CPLD 3 Version        : 001

PCB 1 Version         : Ver.A

PCB 2 Version         : Ver.B

Mac Address           : 346b5bebf2ed

 

 

Press Ctrl+B to access EXTENDED BOOT MENU...0

# 当出现“Press Ctrl+B to access EXTENDED-BOOTWARE MENU”时,键入<Ctrl+B>,系统提示:

Password recovery capability is enabled.

 

   EXTENDED BOOT MENU

 

1. Download image to flash

2. Select image to boot

3. Display all files in flash

4. Delete file from flash

5. Restore to factory default configuration

6. Enter BootRom upgrade menu

7. Skip current system configuration

8. Set switch startup mode

9. Set The Operating Device

0. Reboot

Ctrl+Z: Access EXTENDED ASSISTANT MENU

Ctrl+F: Format file system

Ctrl+P: Change authentication for console login

Ctrl+R: Download image to SDRAM and run

Ctrl+C: Display Copyright

 

Enter your choice(0-9):

# 在BootWare菜单下键入<1>,回车后,进入下载协议选择子菜单,终端显示信息如下:

Enter your choice(0-9): 1

1. Set TFTP protocol parameters

2. Set FTP protocol parameters

3. Set XMODEM protocol parameters

0. Return to boot menu

 

Enter your choice(0-3):

# 在下载协议选择子菜单中,键入<1>,选择采用TFTP协议完成启动软件包的加载,回车后,开始TFTP协议相关参数的设置:

Load File Name     : s6550xe-h3c-test.ipe

                   :

Server IP Address  :192.168.0.30

Local IP Address   :192.168.0.20

Subnet Mask        :0.0.0.0

Gateway IP Address :0.0.0.0

 

Loading... Done.

说明

·     Load File Name:待升级Device的启动软件包的名称,该文件位于TFTP服务器的工作目录下。

·     Server IP Address:TFTP服务器的IP地址。

·     Local IP Address:Device连接文件服务器的端口IP地址。

·     Subnet Mask:子网掩码。

·     Gateway IP Address:网关地址,当TFTP服务器与待升级的Device不在同一网段时,必须配置该地址。

 

# 根据实际情况,完成相关参数设置,回车后系统输出下载确认提示,键入<Y>,系统开始软件包下载;键入<N>,系统将返回BootWare主菜单:

Are you sure to download file to flash? Yes or No (Y/N):Y

# 键入<Y>,系统开始软件包下载。

Loading.........................................................................

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

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

................................................................Done.

# 当下载操作完成后,系统提示用户设置该软件包的属性,即主用(M)、备用(B)或无属性(N)。键入<M>并回车,将所下载软件包写入Flash并设置为主用启动软件包。

Please input the file attribute (Main/Backup/None) M

Image file boot.bin is self-decompressing...

Free space: 534980608 bytes

Writing flash...................................................................

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

...................................................................Done.

Image file system.bin is self-decompressing...

Free space: 525981696 bytes

Writing flash...................................................................

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

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

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

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

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

.......................................................................Done.

 

   EXTENDED BOOT MENU

 

1. Download image to flash

2. Select image to boot

3. Display all files in flash

4. Delete file from flash

5. Restore to factory default configuration

6. Enter BootRom upgrade menu

7. Skip current system configuration

8. Set switch startup mode

9. Set The Operating Device

0. Reboot

Ctrl+Z: Access EXTENDED ASSISTANT MENU

Ctrl+F: Format file system

Ctrl+P: Change authentication for console login

Ctrl+R: Download image to SDRAM and run

Ctrl+C: Display Copyright

 

Enter your choice(0-9):

# 在BootWare主菜单键入<0>,重启设备:

Enter your choice(0-9): 0

Loading the main image files...

Loading file flash:/s6550xe-cmw710-system-test.bin........................

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

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

.........................Done.

Loading file flash:/s6550xe-cmw710-boot-test.bin..........................

....Done.

 

Image file flash:/s6550xe-cmw710-boot-test.bin is self-decompressing......

....................................................Done.

System image is starting...

Line aux1 is available.

 

 

Press ENTER to get started.

6.5  验证配置

# 设备重启后,使用display version命令查看设备版本信息。

<Device> display version

H3C Comware Software, Version 7.1.070, Release 8106P22

Copyright (c) 2004-2022 Hangzhou H3C Tech. Co., Ltd. All rights reserved.

H3C S6550XE-56HF-HI uptime is 0 weeks, 0 days, 5 hours, 45 minutes

Last reboot reason : User reboot

 

Boot image: flash:/s6550xe-cmw710-boot-test.bin

Boot image version: 7.1.070, Release 8106P22

  Compiled Nov 19 2022 11:00:00

System image: flash:/s6550xe-cmw710-system-test.bin

System image version: 7.1.070, Release 8106P22

  Compiled Nov 19 2022 11:00:00

 

……略……

# 显示设备本次启动和下次启动所采用的启动软件包的名称。

<Device> display boot-loader slot 1

Software images on slot 1:

Current software images:

  flash:/s6550xe-cmw710-boot-test.bin

  flash:/s6550xe-cmw710-system-test.bin

Main startup software images:

  flash:/s6550xe-cmw710-boot-test.bin

  flash:/s6550xe-cmw710-system-test.bin

Backup startup software images:

  flash:/s6550xe-cmw710-boot-old.bin

  flash:/s6550xe-cmw710-system- old.bin

6.6  配置文件

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们