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

01-基础配置命令参考

06-软件升级命令

本章节下载 06-软件升级命令  (151.56 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S7500E/S7500E/Command/Command_Manual/H3C_S7500E(R6700)-S7508E-X(R6900)CR-6W102/01/201303/776417_30005_0.htm

06-软件升级命令


1 软件升级配置命令

说明

本系列交换机未形成IRF时,适用本手册中的“独立运行模式”的情况;形成IRF后则适用本手册中的“IRF模式”的情况。有关IRF特性的详细介绍,请参见“IRF配置指导”。

1.1  软件升级配置命令

1.1.1  boot-loader

【命令】

独立运行模式:

boot-loader file file-url slot slot-number { main | backup }

IRF模式:

boot-loader file file-url chassis chassis-number slot slot-number { main | backup }

【视图】

用户视图

【缺省级别】

3:管理级

【参数】

file file-url:文件名,为1~63个字符的字符串,如果用户输入的是相对路径,则执行命令时系统会自动将相对路径转换为绝对路径,同时要求绝对路径最多不能超过63个字符,否则,命令执行失败。格式为[drive:/]file-name,其中,

·              [ ]表示该参数可选。

·              drive用来指定文件在设备的哪个存储介质上,取值为存储介质的名称。如果设备上只有一个存储介质,可以不用输入该参数。

·              file-name表示文件的名称,以.app作为后缀名。

slot slot-number:表示单板所在的槽位号。(独立运行模式)

chassis chassis-number slot slot-number:用来设置指定成员设备上指定单板的下次启动文件为指定文件。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。(IRF模式)

main:指定该文件为主用启动文件。主用启动文件用于引导、启动设备。

backup:指定该文件为备用启动文件。备用启动文件只用于异常情况下,当主用启动文件不可用时,引导、启动设备。

【描述】

(1)      独立运行模式

boot-loader命令用来指定主用主控板或者备用主控板的下次启动文件。

需要注意的是:

·              必须先将下次启动文件保存到相应主控板存储介质的根目录下,boot-loader命令才能执行成功。

·              主用主控板上的存储介质直接用存储介质的名称表示,比如flash;备用主控板的存储介质需要使用slotslot-number#存储介质的名称slot-number表示备用主控板所在的槽位号),比如slot1#flash。

·              设置主用主控板的下次启动文件时,file-url参数不能携带槽位号,slot-number为主用主控板所在的槽位号;设置备用主控板的下次启动文件时,file-url参数需要携带备用主控板所在的槽位号(形如slot1#flash:/test.app),slot-number为备用主控板所在的槽位号。

·              主用主控板和备用主控板的下次启动文件名称可以不同,但是版本必须一致,否则,可能会导致设备不能正常启动。

相关配置可参考命令display boot-loader

(2)      IRF模式

boot-loader命令用来指定IRF中某个主控板的下次启动文件。

需要注意的是:

·              必须先将下次启动文件保存到相应成员设备某个主控板存储介质的根目录下,boot-loader命令才能执行成功。

·              全局主用主控板(Master设备的主用主控板)的存储介质直接用存储介质的名称表示,比如flash;全局备用主控板(IRF中全局主用主控板外的其它主控板)的存储介质需要使用chassischassis-number#slotslot-number#存储介质的名称,比如chassis2#slot1#flash。

·              设置全局主用主控板的下次启动文件时,file-url参数不能携带成员编号和单板编号,chassis-number参数指定为Master设备的成员编号,slot-number参数指定为全局主用主控板所在的槽位号;设置全局备用主控板的下次启动文件时,file-url参数必须携带该主控板所在设备的成员编号和单板的槽位号(形如chassis3#slot1#flash:/test.app),chassis-numberslot-number指定为设备的成员编号和单板所在的槽位号。

·              全局主用主控板和全局备用主控板的下次启动文件名称可以不同,但是版本最好一致,否则,可能会导致备用主控板不能加入IRF。

相关配置可参考命令display boot-loader

【举例】

# 指定主用主控板(所在槽位为0)的主用下次启动文件为test.app(请先保证test.app已经存储在主用主控板的存储介质中,否则系统会提示错误,命令执行失败)。(独立运行模式)

<Sysname> boot-loader file test.app slot 0 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 0!

# 指定备用主控板(所在槽位为1)的主用下次启动文件为test.app(请先保证test.app已经存储在备用主控板的存储介质中,否则系统会提示错误,命令执行失败)。(独立运行模式)

<Sysname> boot-loader file slot1#flash:/test.app 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!

# 指定全局主用主控板(所在设备的成员编号为1,槽位号为0)的主用下次启动文件为test.app(请先保证test.app已经存储在该单板的存储介质中,否则系统会提示错误,命令执行失败)。(IRF模式)

<Sysname> boot-loader file test.app chassis 1 slot 0 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 chassis 1 slot 0!

# 指定全局备用主控板(所在设备的成员编号为1,槽位号为1)的主用下次启动文件为test.app(请先保证test.app已经存储在该单板的存储介质中,否则系统会提示错误,命令执行失败)。(IRF模式)

<Sysname> boot-loader file chassis1#slot1#flash:/test.app chassis 1 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 chassis 1 slot 1!

1.1.2  bootrom

【命令】

独立运行模式:

bootrom { backup | read | restore | update file file-url } slot slot-number-list  [ all | part ]

IRF模式:

bootrom { backup | read | restore | update file file-url } chassis chassis-number slot slot-number-list [ all | part ]

【视图】

用户视图

【缺省级别】

3:管理级

【参数】

read:读取Bootrom,即将Bootrom程序从Bootrom存储器的Normal区读取到Flash中以作备份。当Bootrom存储器损坏,可以重新运行Flash上的Bootrom文件来恢复Bootrom。

restore:恢复Bootrom,即将Bootrom代码从Bootrom存储器的Backup区恢复到Normal区。如果当前的Bootrom被损坏,并且在损坏前备份了Bootrom,可以用restore操作来恢复Bootrom。

backup:备份Bootrom,即将Bootrom代码从Bootrom存储器的Normal区备份到Backup区,以便Normal区损坏时,可以从Backup区恢复Bootrom程序。建议在升级Bootrom前备份Bootrom。

update file file-url:升级Bootrom,file-url表示用于升级的文件名,为1~63个字符的字符串。

slot slot-number-list:单板的槽位号列表,表示多个单板。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要升级的单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。(独立运行模式)

chassis chassis-number:表示需要升级的设备在IRF中的成员编号。不指定该参数时,表示所有成员设备。(IRF模式)

slot slot-number-list:单板的槽位号列表,表示多个单板。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要升级的单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。(IRF模式)

all:操作Bootrom的全部内容。不指定allpart参数时,默认使用all

part:只操作Bootrom的扩展内容(Bootrom分两部分:常规部分和扩展部分,常规部分提供Bootrom的基本操作项,扩展部分提供更多的Bootrom操作项)。不指定allpart参数时,默认使用all

【描述】

(1)      独立运行模式

bootrom命令用来读取、恢复、备份或升级指定单板的Bootrom程序。

需要注意的是:

·              如果升级主控板,需要先将对应的Bootrom程序保存到该主控板存储介质的根目录下;如果升级业务板或者网板,需要先将对应的Bootrom程序保存到主用主控板存储介质的根目录下。

·              升级主用主控板、业务板或者网板的Bootrom程序时,file-url参数不能携带槽位号;升级备用主控板的Bootrom程序时,file-url参数需要携带该板的槽位号(形如slot1#flash:/test.btw)。

·              设备上各单板的Bootrom程序名称可以不同,但是版本必须兼容(是否兼容请查看Bootrom版本说明书),否则,可能会导致单板不能正常启动。

(2)      IRF模式

bootrom命令用来读取、恢复、备份或升级指定成员设备上指定单板的Bootrom程序。

需要注意的是:

·              如果升级主控板,需要先将对应的Bootrom程序保存到该主控板存储介质的根目录下;如果升级业务板或者网板,需要先将对应的Bootrom程序保存到业务板或者网板所在成员设备的主用主控板存储介质的根目录下。

·              升级全局主用主控板以及Master上业务板或者网板的Bootrom程序时,file-url参数不能携带成员编号和单板的槽位号;升级IRF中其它主控板的Bootrom程序时, file-url参数必须携带该主控板所在设备的成员编号以及主控板所在的槽位号(形如chassis3#slot1#flash:/test.btw);升级IRF中其它业务板或者网板的Bootrom程序时,file-url参数必须携带该单板所在设备的成员编号以及单板所在的槽位号(形如chassis3#slot5#flash:/test.btw)。

【举例】

# 使用a.btw文件升级主用主控板(所在槽位号为0)的Bootrom程序(本命令的显示信息请以设备的实际情况为准)。(独立运行模式)

<Sysname> bootrom update file a.btw slot 0

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

  Now updating bootrom, please wait...

  Start accessing bootflash chip...

  Attention:don't power down device, don't execute restart command such as slave

  switchover!!! 

  Bootrom update succeeded in slot 0.

# 使用a.btw文件升级备用主控板(所在槽位号为1)的Bootrom程序(本命令的显示信息请以设备的实际情况为准)。(独立运行模式)

<Sysname> bootrom update file slot1#flash:/a.btw slot 1

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

  Now updating bootrom, please wait...

  Start accessing bootflash chip...

  Attention:don't power down device, don't execute restart command such as slave

  switchover!!! 

  Bootrom update succeeded in slot 1.

# 使用a.btw文件升级全局主用主控板(所在设备的成员编号为1,槽位号为0)的Bootrom程序。(本命令的显示信息请以设备的实际情况为准)(IRF模式)

<Sysname> bootrom update file a.btw chassis 1 slot 0

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

  Now updating bootrom, please wait...

  Start accessing bootflash chip...

  Attention:don't power down device, don't execute restart command such as slave

  switchover!!! 

  Bootrom update succeeded in slot 0.

# 使用a.btw文件升级Master上业务板(所在设备的成员编号为1,槽位号为3)的Bootrom程序。(本命令的显示信息请以设备的实际情况为准)(IRF模式)

<Sysname> bootrom update file a.btw chassis 1 slot 3

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

  Now updating bootrom, please wait...

  Start accessing bootflash chip...

  Bootrom update succeed in chassis 1 slot 3.

# 使用a.btw文件升级全局备用主控板(所在设备的成员编号为1,槽位号为1)的Bootrom程序(本命令的显示信息请以设备的实际情况为准)。(IRF模式)

<Sysname> bootrom update file chassis1#slot1#flash:/a.btw chassis 1 slot 1

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

  Now updating bootrom, please wait...

  Start accessing bootflash chip...

  Bootrom update succeed in chassis 1 slot 1.

# 使用a.btw文件升级Slave设备业务板(所在设备的成员编号为2,槽位号为5)的Bootrom程序(本命令的显示信息请以设备的实际情况为准)。(IRF模式)

<Sysname> bootrom update file chassis2#slot0#flash:/a.btw chassis 2 slot 5

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

  Now updating bootrom, please wait...

  Start accessing bootflash chip...

  Bootrom update succeed in chassis 2 slot 5.

1.1.3  display boot-loader

【命令】

独立运行模式:

display boot-loader [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]

IRF模式:

display boot-loader [ chassis chassis-number [ slot slot-number ] ] [ | { begin | exclude | include } regular-expression ]

【视图】

任意视图

【缺省级别】

2:系统级

【参数】

slot slot-number:显示指定单板的启动文件的信息。slot-number表示单板所在的槽位号。(独立运行模式)

chassis chassis-number:显示指定成员设备的启动文件的信息。chassis-number表示设备在IRF中的成员编号。不使用该参数时,表示所有成员设备。(IRF模式)

slot slot-number:显示指定单板的启动文件的信息。slot-number表示单板所在的槽位号。不使用该参数时,表示该成员设备的所有主控板。(IRF模式)

|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。

begin:从包含指定正则表达式的行开始显示。

exclude:只显示不包含指定正则表达式的行。

include:只显示包含指定正则表达式的行。

regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。

【描述】

display boot-loader命令用来显示启动文件信息。

相关配置可参考命令boot-loader

【举例】

# 显示本次启动和下次启动所采用的启动文件(本命令的显示信息请以设备的实际情况为准)。(独立运行模式)

<Sysname> display boot-loader

  The primary app to boot of board 0 at this time is: flash:/test.app

  The primary app to boot of board 0 at next time is: flash:/test.app

  The slave app to boot of board 0 at next time is: flash:/test.app

  The primary app to boot of board 1 at this time is: flash:/test.app

  The primary app to boot of board 1 at next time is: flash:/test.app

  The slave app to boot of board 1 at next time is: flash:/test.app

表1-1 display boot-loader命令显示信息描述表(独立运行模式)

字段

描述

The primary app to boot of board slot-number at this time is

单板(slot-number表示单板所在的槽位号)本次启动时使用的启动文件

The primary app to boot of board slot-number at next time is

单板(slot-number表示单板所在的槽位号)下次启动时使用的主用启动文件

The slave app to boot of board slot-number at next time is

单板(slot-number表示单板所在的槽位号)下次启动时使用的备用启动文件

 

# 显示本次启动和下次启动所采用的启动文件(本命令的显示信息请以设备的实际情况为准)。(IRF模式)

<Sysname> display boot-loader

  The primary app to boot of chassis 1 board 0 at this time is: flash:/test.app

  The primary app to boot of chassis 1 board 0 at next time is: flash:/test.app

  The slave app to boot of chassis 1 board 0 at next time is: flash:/test.app

  The primary app to boot of chassis 2 board 0 at this time is: flash:/test.app

  The primary app to boot of chassis 2 board 0 at next time is: flash:/test.app

  The slave app to boot of chassis 2 board 0 at next time is: flash:/test.app

表1-2 display boot-loader命令显示信息描述表(IRF模式)

字段

描述

The primary app to boot of chassis 1 board 0 at this time is

成员设备1上的0号单板本次启动时使用的启动文件

The primary app to boot of chassis 1 board 0 at next time is

成员设备1上的0号单板下次启动时使用的主用启动文件

The slave app to boot of chassis 1 board 0 at next time is

成员设备1上的0号单板下次启动时使用的备用启动文件

 

1.1.4  display patch

【命令】

display patch [ | { begin | exclude | include } regular-expression ]

【视图】

任意视图

【缺省级别】

3:管理级

【参数】

|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。

begin:从包含指定正则表达式的行开始显示。

exclude:只显示不包含指定正则表达式的行。

include:只显示包含指定正则表达式的行。

regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。

【描述】

display patch命令用来显示当前安装的补丁包文件及其版本。

【举例】

# 显示当前安装的补丁文件和补丁包版本(本命令的显示信息请以设备的实际情况为准)。(独立运行模式)

<Sysname> display patch

The following patch packages are loaded:

flash:/s7500e-cmw520-r1126h03.app, Package-Version-001, loaded on slot(s):

0, 1, 2, 3, 4, 5,

# 显示当前安装的补丁文件和补丁包版本(本命令的显示信息请以设备的实际情况为准)。(IRF模式)

<Sysname> display patch

The following patch packages are loaded:

flash:/s7500e-cmw520-r1126h03.app, Package-Version-001, loaded on slot(s):

Chassis 1, slot(s): 0

表1-3 display patch命令显示信息描述表

字段

描述

flash:/s7500e-cmw520-r1126h03.app

安装的补丁包文件的路径

Package-Version-001

补丁包的版本

loaded on slot(s):

加载补丁的设备单板编号,如果单板上只有一个CPU,则直接显示slot-number,如果单板上有多个CPU,则主CPU显示为slot-number,辅助CPU显示为slot-number.cpu-id

 

1.1.5  display patch information

【命令】

display patch information [ | { begin | exclude | include } regular-expression ]

【视图】

任意视图

【缺省级别】

3:管理级

【参数】

|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。

begin:从包含指定正则表达式的行开始显示。

exclude:只显示不包含指定正则表达式的行。

include:只显示包含指定正则表达式的行。

regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。

【描述】

display patch information命令用来显示补丁的信息。

【举例】

# 显示补丁的信息(本命令的显示信息请以设备的实际情况为准)。(独立运行模式)

<Sysname> display patch information

The location of patches: flash:

Slot Version   Temporary Common Current Active Running  Start-Address

----------------------------------------------------------------------

1    MPU       0         0      0       0      0        0x86f17d98

2    LPU       0         0      0       0      0        0x85748fb0

3    LPU       0         0      0       0      0        0x85748fb0

4    LPU       0         0      0       0      0        0x85748fb0

# 显示补丁的信息(本命令的显示信息请以设备的实际情况为准)。(IRF模式)

<Sysname> display patch information

The location of patches: flash:

Chassis   Slot Version   Temporary Common Current Active Running  Start-Address

----------------------------------------------------------------------

1          1    MPU       0         0      0       0      0        0x86f17d98

1          2    LPU       0         0      0       0      0        0x85748fb0

1          3    LPU       0         0      0       0      0        0x85748fb0

1          4    LPU       0         0      0       0      0        0x85748fb0

表1-4 display patch information命令显示信息描述表

字段

描述

The location of patches

补丁文件的加载路径,可以通过patch location命令设置

Chassis

设备的成员编号(IRF模式)

Slot

单板所在的槽号,如果单板上只有一个CPU,则直接显示slot-number,如果单板上有多个CPU,则主CPU显示为slot-number,辅助CPU显示为slot-number.cpu-id

Version

补丁版本号

Temporary

临时补丁数目

Common

正式补丁数目

Current

当前补丁总数目

Running

处于运行状态的补丁数目

Active

处于激活状态的补丁数目

Start-Address

内存补丁区在内存中的起始地址

 

1.1.6  patch install

【命令】

patch install file filename

undo patch install

【视图】

系统视图

【缺省级别】

3:管理级

【参数】

filename:表示补丁包文件的名称。

【描述】

patch install file命令用来安装补丁包文件中的补丁。undo patch install命令用来卸载补丁包文件中的补丁。

在执行patch install file命令时,系统会提示“Do you want to continue running patches after reboot? [Y/N]:”,

·              如果输入<Y>或者<y>,设备或单板重启后所安装的补丁继续生效。

·              如果输入<N>或者<n>,设备或单板重启后所安装的补丁不再继续生效。

执行该命令前,请将补丁包文件保存所有主控板Flash的根目录下。

说明

如果设备以前安装过补丁,必须先将历史补丁卸载,才能安装新补丁。用户可以使用display patch information显示设备的补丁信息。

 

【举例】

# 加载补丁文件包,并且要求设备重启后补丁继续生效(本命令的显示信息请以实际情况为准)。

<Sysname> system-view

[Sysname] patch install file s7500e-cmw520-r1126h03.app

Patches will be installed. Continue? [Y/N]:y

Do you want to run patches after reboot? [Y/N]:y

Installing patches…

 

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

新华三官网
联系我们