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

H3C交换机 典型配置举例-6W100

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

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

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S10500/S10500/Configure/Typical_Configuration_Example/H3C_Typical_Configuration_Example-6W100/201312/807730_30005_0.htm

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


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

1.1  简介

本章介绍Bootrom文件、启动文件及配置文件的升级操作。

表1 软件升级的特点及升级步骤

特点

软件升级具体步骤

(1)升级前的准备

(2)选择文件传输协议并进行相应配置

(3)执行升级操作

支持IRF的设备需要对所有成员设备进行软件升级

1.2  升级前的准备典型配置举例

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

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

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

1.6  升级操作典型配置举例

 

1.2  升级前的准备典型配置举例

1.2.1  适用产品和版本

表2 配置适用的产品与软件版本关系

产品

软件版本

S5800&S5820X系列以太网交换机

Release 1808

S5830系列以太网交换机

Release 1115,Release 1118

S5500-EI&S5500-SI系列以太网交换机

Release 2220

 

1.2.2  组网需求

图1所示,两台IRF设备连入网络。现要求通过升级前的准备实现备份重要文件,删除设备文件,保证Master和Slave有足够剩余空间存放新的设备文件。

图1 升级操作典型配置组网图

 

1.2.3  配置步骤

# 查看Master设备根目录下的文件及子目录。

<Sysname> dir

Directory of flash:/

 

   0     -rw-  20070016  Apr 26 2012 12:45:21   bootfile-e1109.bin

   1     -rw-        151  Apr 26 2012 12:12:54   system.xml

   2     -rw-       2019  Apr 26 2012 12:12:56   startup.cfg

   3     -rw-  21527220  Apr 26 2012 13:06:45   bootfile-e1108.bin

   4     -rw-  21527956  Apr 26 2012 12:38:22   bootfile-e1107.bin

   5     -rw-  21280832  Apr 26 2012 13:09:13   bootfile-e1106.bin

   6     -rw-  20840600  Apr 26 2012 12:07:00   bootfile-e1105.bin

   7     -rw-  20594888  Apr 26 2012 12:09:59   bootfile-e1104.bin

 

515712 KB total (18604 KB free)

# 查看Slave设备根目录下的文件及子目录。

<Sysname> cd slot2#flash:/

<Sysname> dir

Directory of slot2#flash:/

 

   0     -rw-  21280832  Apr 26 2012 13:09:30   bootfile-e1109.bin

   1     -rw-  20840600  Apr 26 2012 12:09:02   bootfile-e1106.bin

   2     -rw-  20780880  Apr 24 2013 16:58:21   bootfile-e1105.bin

   3     -rw-  21604876  Apr 26 2012 14:04:36   bootfile-e1108.bin

   4     -rw-       151   Aug 31 2013 11:47:59   system.xml

   5     -rw-      2508   Apr 26 2012 13:01:15   startup.cfg

   6     -rw-  21527220  Apr 26 2012 18:06:53   bootfile-e1107.bin

   7     -rw-  21527956  Apr 26 2012 12:22:15   bootfile-e1103.bin

   8     -rw-  20594888  Mar 25 2013 16:31:07   bootfile-e1104.bin

 

515712 KB total (167528 KB free)

# 删除Master设备中的文件bootfile-e1104.bin,以保证足够的剩余空间,用于存储新的启动文件。

<Sysname>delete /unreserved bootfile-e1104.bin

The contents cannot be restored!!! Delete flash:/bootfile-e1104.bin?[Y/N]:y

Deleting a file permanently will take a long time. Please wait...

 

%Delete file flash:/bootfile-e1104.bin...Done.

# 删除Slave设备中的文件bootfile-e1104.bin,以保证足够的剩余空间,用于存储新的启动文件。

<Sysname> delete /unreserved slot2#flash:/bootfile-e1104.bin

Delete slot2#flash:/bootfile-e1104.bin?[Y/N]:y

 

%Delete file slot2#flash:/bootfile-e1104.bin...Done.

# 将Master设备配置文件startup.cfg重命名为startup_old.cfg。

<Sysname>rename startup.cfg startup_old.cfg

Rename flash:/startup.cfg to flash:/startup_old.cfg?[Y/N]:y

 

%Renamed file flash:/startup.cfg to flash:/startup_old.cfg.

# 在Master设备根目录下建立备份目录backup。

<Sysname>mkdir backup

 

%Created dir flash:/backup.

# 把Master设备的配置文件复制到backup目录中,对配置文件进行备份。

<Sysname> copy startup_old.cfg backup

Copy flash:/startup_old.cfg to flash:/backup/startup_old.cfg?[Y/N]:y

.

%Copy file flash:/startup_old.cfg to flash:/backup/startup_old.cfg...Done.

1.2.4  验证配置

使用dir命令和more命令进行查看操作:

·     Master设备根目录下没有bootfile-e1104.bin和startup.cfg文件,新增startup_old.cfg文件和backup目录。

·     Slave设备根目录下没有bootfile-e1104.bin和startup.cfg文件,新增startup_old.cfg文件和backup目录。

1.2.5  配置文件

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

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

1.3.1  适用产品和版本

表3 配置适用的产品与软件版本关系

产品

软件版本

S5800&S5820X系列以太网交换机

Release 1808

S5830系列以太网交换机

Release 1115,Release 1118

S5500-EI&S5500-SI系列以太网交换机

Release 2220

 

1.3.2  组网需求

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

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

 

1.3.3  配置注意事项

当使用FTP方式将启动文件、bootrom及配置文件下载到设备的Flash中前,请将文件传输的模式设置为二进制模式,以免不能正确解析补丁文件。

1.3.4  配置步骤

(1)     配置Master

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

<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服务器上的Bootrom文件bootrom.btm。

[ftp]get bootrom.btm

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

125 BINARY mode data connection already open, transfer starting for /bootrom.btm.

226 Transfer complete.

FTP: 338736 byte(s) received in 1.488 second(s), 227.00K byte(s)/sec.

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

[ftp] get bootfile.bin

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

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

226 Transfer complete.

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

# 下载FTP服务器上的配置文件startup.cfg。

[ftp]get startup.cfg

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

125 BINARY mode data connection already open, transfer starting for /startup.cfg.

226 Transfer complete.

FTP: 2478 byte(s) received in 0.136 second(s), 18.00K byte(s)/sec.

[ftp] bye

(2)     配置Slave

Slave的配置与Master相似,配置过程略。

1.3.5  验证配置

# 验证文件是否都已下载到交换机的Flash中。

<Sysname>dir

Directory of flash:/

   0     -rw-  9875040    Apr 26 2000 13:08:36   bootfile.bin

   1     -rw-   338736    Apr 26 2000 13:06:57   bootrom.btm

   2     -rw-     2478    Apr 26 2000 12:45:01   startup.cfg

31496 KB total (17708 KB free)

1.3.6  配置文件

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

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

1.4.1  适用产品和版本

表4 配置适用的产品与软件版本关系

产品

软件版本

S5800&S5820X系列以太网交换机

Release 1808

S5830系列以太网交换机

Release 1115,Release 1118

S5500-EI&S5500-SI系列以太网交换机

Release 2220

 

1.4.2  组网需求

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

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

 

1.4.3  配置注意事项

当使用FTP方式将启动文件、bootrom及配置文件下载到设备的Flash中前,请将文件传输的模式设置为二进制模式,以免不能正确解析补丁文件。

1.4.4  配置步骤

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

# 上传bootrom文件bootrom.btm。

ftp> put bootrom.btm

200 Port command okay.

150 Opening BINARY mode data connection for /bootrom.btm.

226 Transfer complete.

ftp: 发送 463364 字节,用时 2.23Seconds 207.32Kbytes/sec.

# 上传启动文件bootfile.bin。

ftp> put bootfile.bin

200 Port command okay.

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

226 Transfer complete.

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

# 上传配置文件startup.cfg。

ftp> put startup.cfg

200 Port command okay.

150 Opening BINARY mode data connection for /startup.cfg.

226 Transfer complete.

ftp: 发送737556字节,用时7.02Seconds 390.24Kbytes/sec.

1.4.5  验证配置

# 验证文件是否都已下载到交换机的Flash中。

<Sysname>dir

Directory of flash:/

   0     -rw-  9875040    Apr 26 2000 13:08:36   bootfile.bin

   1     -rw-   338736    Apr 26 2000 13:06:57   bootrom.btm

   2     -rw-     2478    Apr 26 2000 12:45:01   startup.cfg

31496 KB total (17708 KB free)

1.4.6  配置文件

#

 ftp server enable

#

local-user abc

 password simple pwd

 authorization-attribute level 3

 service-type ftp

#

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

1.5.1  适用产品和版本

表5 配置适用的产品与软件版本关系

产品

软件版本

S5800&S5820X系列以太网交换机

Release 1808

S5830系列以太网交换机

Release 1115,Release 1118

S5500-EI&S5500-SI系列以太网交换机

Release 2220

 

1.5.2  组网需求

图4所示,两台IRF设备与TFTP服务器相连,IRF为TFTP客户端,设备的启动文件、bootrom及配置文件放在TFTP服务器工作路径下。现要求通过交换机作为TFTP客户端实现将设备文件从TFTP服务器下载到Switch的Flash中。

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

 

1.5.3  配置步骤

(1)     配置Master

# 将bootrom文件bootrom.btm从TFTP服务器上下载到设备。

<Sysname> tftp 1.2.1.1 get bootrom.btm

  File will be transferred in binary mode

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

  TFTP:   463364 bytes received in 6 second(s)

  File downloaded successfully.

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

<Sysname> tftp 1.2.1.1 get bootfile.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.

# 将配置文件startup.cfg从TFTP服务器上下载到设备。

<Sysname> tftp 1.2.1.1 get startup.cfg

  File will be transferred in binary mode

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

  TFTP:   863356 bytes received in 8 second(s)

  File downloaded successfully.

(2)     配置Slave

Slave的配置与Master相似,配置过程略。

1.5.4  验证配置

# 验证文件是否都已下载到交换机的Flash中。

<Sysname>dir

Directory of flash:/

   0     -rw-  9875040    Apr 26 2000 13:08:36   bootfile.bin

   1     -rw-   338736    Apr 26 2000 13:06:57   bootrom.btm

   2     -rw-     2478    Apr 26 2000 12:45:01   startup.cfg

31496 KB total (17708 KB free)

1.5.5  配置文件

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

1.6  升级操作典型配置举例

1.6.1  适用产品和版本

表6 配置适用的产品与软件版本关系

产品

软件版本

S5800&S5820X系列以太网交换机

Release 1808

S5830系列以太网交换机

Release 1115,Release 1118

S5500-EI&S5500-SI系列以太网交换机

Release 2220

 

1.6.2  组网需求

图5所示,两台IRF设备连入网络,某管理员通过FTP/TFTP方式已经把IRF设备升级所需要的启动文件、Bootrom文件及配置文件都下载保存到了IRF中Master设备的Flash中。现要求通过升级操作实现Master和Slave使用新的设备软件启动运行。

图5 升级操作典型配置组网图

 

1.6.3  配置注意事项

各成员设备的软件版本需要保持一致。

1.6.4  配置步骤

(1)     配置IRF设备

# 把Master设备的启动文件复制到Slave设备(成员编号为2)的根目录下。

<Sysname> copy bootfile-e1110.bin slot2#flash:/

Copy flash:/bootfile-e1110.bin to slot2#flash:/bootfile-e1110.bin?[Y/N]:y

 

%Copy file flash:/bootfile-e1110.bin to slot2#flash:/bootfile-e1110.bin...Done.

# 升级Master设备的Bootrom程序。

<Sysname>bootrom update file bootfile-e1110.bin slot 1

 This command will update bootrom file on the specified board(s), Continue? [Y/N]:y

 

  Now updating bootrom, please wait...

# 升级Slave设备(成员编号为2)的Bootrom程序。

<Sysname>bootrom update file bootfile-e1110.bin slot 2

 This command will update bootrom file on the specified board(s), Continue? [Y/N]:y

 

  Now updating bootrom, please wait...

# 指定Master设备下次启动的主用启动文件为bootfile-e1110.bin,并将bootfile-e1109.bin指定为备用启动文件。

<Sysname>boot-loader file bootfile-e1110.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!

<Sysname>boot-loader file bootfile-e1109.bin slot 1 backup

  This command will set the boot file. Continue? [Y/N]:y

  The specified file will be used as the backup boot file at the next reboot on slot 1!

# 指定Slave设备(成员编号为2)下次启动的主用启动文件为bootfile-e1110.bin,并将bootfile-e1109.bin指定为备用启动文件。

<Sysname>boot-loader file bootfile-e1110.bin slot 2 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 2!

<Sysname>boot-loader file bootfile.bin slot 2 backup

  This command will set the boot file. Continue? [Y/N]:y

  The specified file will be used as the backup boot file at the next reboot on slot 2!

# 把Master设备中的新配置文件startup.cfg重命名为startup_new.cfg。

<Sysname>rename startup.cfg startup_new.cfg

Rename flash:/startup.cfg to flash:/startup_new.cfg?[Y/N]:y

 

%Renamed file flash:/startup.cfg to flash:/startup_new.cfg.

# 指定Master设备的下次启动时的配置文件为startup_new.cfg,并将原有的配置文件startup_old.cfg指定为备用配置文件。

<Sysname>startup saved-configuration startup_new.cfg main

Please wait ...

Setting the master board ...

... Done!

 

<Sysname>startup saved-configuration startup_old.cfg backup

Please wait ...

Setting the master board ...

... Done!

# 重新启动交换机,使新的启动文件及配置文件生效。

<Sysname> 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

1.6.5  验证配置

设备重启后可以使用display version命令验证升级是否成功。使用display startup命令查看当前使用的配置文件以及下次启动的使用的主用配置文件和备用配置文件。

1.6.6  配置文件

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

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

新华三官网
联系我们