• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C SOHO交换机 典型配置举例(Comware V5)-6W102

03-设备软件升级与维护典型配置举例

本章节下载 03-设备软件升级与维护典型配置举例  (144.73 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S5110/S5110/Configure/Typical_Configuration_Example/H3C_SOHO_CE(Comware_V5)-6W102/201809/1107278_30005_0.htm

03-设备软件升级与维护典型配置举例


1  设备软件升级与维护典型配置举例

1.1  简介

本章介绍设备软件(启动文件)的升级操作。

1.2  交换机作为FTP客户端典型配置举例

1.2.1  组网需求

图1所示,Switch分别与客户端和FTP服务器相连,FTP服务器已经配置好用户名和密码,Switch为FTP客户端,设备的启动文件存储在FTP服务器的工作路径下。现要求通过交换机作为FTP客户端实现将设备启动文件从FTP服务器下载到Switch的Flash中,并升级Switch的启动文件。

图1 交换机作为FTP客户端典型配置组网图

 

1.2.2  配置注意事项

在通过FTP方式将启动文件下载到设备的Flash中前,请将文件传输的模式设置为二进制模式,以免不能正确解析启动文件。

1.2.3  配置步骤

# 以客户端方式登录FTP服务器,用于获取新的启动文件。

<Sysname> ftp 10.1.1.1

Trying 10.1.1.1 ...

Press CTRL+K to abort

Connected to 10.1.1.1.

220 FTP service ready.

User(10.1.1.1:(none)):abc

331 Password required for abc.

Password:

230 User logged in.

# 设置文件传输的模式为二进制模式。

[ftp] binary

200 Type set to I.

# 下载FTP服务器上的设备启动文件device.bin并保存在本地。

[ftp] get device.bin

227 Entering Passive Mode (10,1,1,1,4,9).

125 BINARY mode data connection already open, transfer starting for device.bin.

226 Transfer complete.

FTP: 9875040 byte(s) received in 126.253 second(s) 78.00K byte(s)/sec.

[ftp] bye

#指定Switch下次启动时使用的启动文件为device.bin。

<Sysname> boot-loader file device.bin slot 1 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!

#重启Switch,完成启动文件升级。

<Sysname> reboot

1.2.4  验证配置

# 验证Switch的启动文件是否已经升级成功。

<Sysname> display boot-loader

 Slot 1

  Current boot app is: flash:/device.bin

  Next main boot app is: flash:/device.bin

  Next backup boot app is: null

结果表明,Switch当前的启动文件为device.bin,说明升级成功。

1.2.5  配置文件

本配置指导中使用的均为一次性生效的命令,不会保存到配置文件中,不涉及完整配置。

1.3  交换机作为FTP服务器典型配置举例

1.3.1  组网需求

图2所示,PC与Switch相连,PC为FTP客户端,Switch为FTP服务器,设备的启动文件存储在FTP客户端的工作路径下。现要求通过交换机作为FTP服务器实现将设备启动文件从PC上传到Switch的Flash中,并升级Switch的启动文件。

图2 交换机作为FTP服务器典型配置组网图

 

1.3.2  配置注意事项

在通过FTP方式将启动文件下载到设备的Flash中前,请将文件传输的模式设置为二进制模式,以免不能正确解析启动文件。

1.3.3  配置步骤

(1)     配置Switch

# 启动设备的FTP服务。

<Sysname> system-view

[Sysname] ftp server enable

# 在设备上添加一个本地用户abc,并设置其认证密码为pwd。

[Sysname] local-user abc

[Sysname-luser-abc] password simple pwd

# 指定abc可以使用的服务类型为FTP。

[Sysname-luser-abc] service-type ftp

# 配置abc的用户级别为3级,使其可以向访问目录中上传文件。

[Sysname-luser-abc] authorization-attribute level 3

[Sysname-luser-abc] quit

(2)     配置PC

# 以FTP方式登录FTP服务器。

c:\> ftp 1.1.1.1

Connected to 1.1.1.1.

220 FTP service ready.

User(1.1.1.1:(none)):abc

331 Password required for abc.

Password:

230 User logged in.

# 设置文件传输的模式为二进制模式。

[ftp] binary

200 Type set to I.

# 上传启动文件device.bin。

ftp> put device.bin

200 Port command okay.

150 Opening BINARY mode data connection for /device.bin.

226 Transfer complete.

ftp: 发送 9875040 字节,用时 126.253 Seconds 87.32Kbytes/sec.

(3)     配置Switch

#指定Switch下次启动时使用的启动文件为device.bin。

<Sysname> boot-loader file device.bin slot 1 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!

#重启Switch,完成启动文件升级。

<Sysname> reboot

1.3.4  验证配置

# 验证Switch的启动文件是否已经升级成功。

<Sysname> display boot-loader

 Slot 1

  Current boot app is: flash:/device.bin

  Next main boot app is: flash:/device.bin

  Next backup boot app is: null

结果表明,Switch当前的启动文件为device.bin,说明升级成功。

1.3.5  配置文件

#

 ftp server enable

#

local-user abc

 password simple pwd

 authorization-attribute level 3

 service-type ftp

#

1.4  交换机作为TFTP客户端典型配置举例

1.4.1  组网需求

图3所示,PC与Switch相连,PC为TFTP服务器,Switch为TFTP客户端,设备的启动文件放在TFTP服务器工作路径下。现要求通过交换机作为TFTP客户端实现将设备启动文件从TFTP服务器下载到Switch的Flash中,并升级Switch的启动文件。

图3 交换机作为TFTP客户典型配置组网图

 

1.4.2  配置步骤

(1)     配置Switch

# 将启动文件device.bin从TFTP服务器上下载到设备。

<Sysname> tftp 1.2.1.1 get device.bin

  File will be transferred in binary mode

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

  TFTP:   9875040 bytes received in 126 second(s)

  File downloaded successfully.

#指定Switch下次启动时使用的启动文件为device.bin。

<Sysname> boot-loader file device.bin slot 1 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!

#重启Switch,完成启动文件升级。

<Sysname> reboot

1.4.3  验证配置

# 验证Switch的启动文件是否已经升级成功。

<Sysname> display boot-loader

 Slot 1

  Current boot app is: flash:/device.bin

  Next main boot app is: flash:/device.bin

  Next backup boot app is: null

结果表明,Switch当前的启动文件为device.bin,说明升级成功。

1.4.4  配置文件

本配置指导中使用的均为一次性生效的命令,不会保存到配置文件中,不涉及完整配置。

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

新华三官网
联系我们