软件授权管理命令

命令 作用
license auto-install 自动匹配安装一个授权
license auto-unbind 解除绑定一个授权
license auto-uninstall 卸载授权
license copy 备份授权文件
license grace-period 配置提醒授权失效的友好警告时间
license install 安装一个授权
license unbind 解除绑定一个授权
license uninstall 卸载授权
license update 更新一个授权
show license all-license 查看设备中所有已安装的授权文件列表
show license dev-hostid 查看用于安装授权文件的所有设备的主机号
show license dev-license 查看系统中各个设备上的授权文件列表
show license dev-unbind-code 查看系统中各个设备已解除绑定授权的验证码
show license file 查看设备上指定授权文件的信息
show license hostid 查看本设备的主机号
show license unbind-code 查看本设备已解除绑定授权的验证码
show license usage 查看系统当前授权使用情况

 

 

1.1   license auto-install

【命令功能】

license auto-install命令用来自动匹配安装一个授权。

【命令格式】

license auto-install { flash: | usb0: } filename

【参数说明】

flash::指定授权文件在内部flash文件系统的位置。

usb0::指定授权文件在USB文件系统的位置。

filename:指定授权文件名字。

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

授权文件名可修改。

本命令主要适用于VSU环境下。

l  在VSU环境下,使用license auto-install命令,匹配的板才安装授权。

l  在非VSU环境下使用本命令,作用同于license install

【配置举例】

# 安装FC功能授权文件。

Hostname> enable

Hostname# license install usb0:fc.lic

License file install success, dev 2 install it, service name: LIC-FC-BLADE-S

【提示信息】

# 授权文件不存在。

Install failed: no such file or directory.

# 授权文件检查不合法。

Install failed: the install license may be wrong.

# 设备上已存在一个比要安装的授权文件更新的授权。

Install failed: device 2 already has a same license which is newer.

# 重复安装授权文件。

Install failed: the license has been installed to device 2 before.

# 该授权是临时授权,设备上已存在相同的永久授权。

Install failed: device 2 already has a same permanent license.

# 特定设备授权文件安装成功(本例中例举特性FC的授权)。

License file install success, device 2 installed it, service name: LIC-FC-BLADE-S.

# 特定设备授权安装成功,该授权转换为永久授权(本例中例举特性FC的授权)。

License file install success, device 2 installed it, service name: LIC-FC-BLADE-S .

The license turns to be permanent.

# 特定设备授权安装成功,该授权临近失效期(少于30天)(本例中例举特性FC的授权)。

License file install success, device 2 installed it, service name: LIC-FC-BLADE-S .;

The installed license is approaching deadline, less than 30 days.

【常见错误】

l  不存在指定的授权文件。

l  授权文件不合法。

l  环境中没有与授权文件相匹配的设备。

l  预安装的授权比系统已有的更旧。

l  重复安装同一个授权文件。

l  预安装临时授权,而系统已安装有永久授权。

【平台说明】

【相关命令】

1.2   license auto-unbind

【命令功能】

license auto-unbind命令用来解除绑定一个授权。

【命令格式】

license auto-unbind pak

【参数说明】

pak:指定授权码。

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

本命令的作用就是解除某个授权文件和对应设备的绑定关系。用户在网页上解除绑定之前,必须先在要设备上用本命令解除绑定。

成功解除绑定之后,会获得一串验证码。该验证码在网页上解除绑定时需要。

【配置举例】

# 解除系统上的NPOE授权。

Hostname> enable

Hostname# license auto-unbind RG-2XS-NPOE-LIC00030006122222

After unbinding, you can not install the corresponding license again. Are you sure to continue[y/n]:y

Success to unbind license RG-2XS-NPOE-LIC00030006122222.

The verification string is: 5DFC1037773779252787DA252A075A86A7C719E68555555585555555B565757575757995587557F577B5D835A8E6.

【提示信息】

# 系统中不存在匹配的授权。

Unbind failed: not match license found.

【常见错误】

l  系统中不存在匹配的授权。

【平台说明】

【相关命令】

1.3   license auto-uninstall

【命令功能】

license auto-uninstall命令用来卸载授权。

【命令格式】

license auto-uninstall device-id license [ filename ]

【参数说明】

device-id:要卸载的文件所在的设备号。

license:要卸载的授权名。

filename:要卸载的文件名。

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

当授权相关的特性正在运行时,授权卸载后不会立即生效。

授权卸载后不能恢复,建议卸载前先备份授权文件。

【配置举例】

# 卸载系统上的FC授权。

Hostname> enable

Hostname# license auto-uninstall 2 LIC-FC-BLADE-S

License file uninstall LIC-FC-BLADE-S of device 2 success

【提示信息】

# 错误提示:指定设备上没有指定授权(本例中指定设备2(下同),指定授权名为defd)。

Uninstall failed: there's no license defd in the device 2.

# 错误提示:指定设备上没有指定特性的指定授权文件(本例中指定特性为LIC-WLAN-AP-32,指定授权文件名为123.lic)。

Uninstall failed: there's no license 123.lic of service LIC-WLAN-AP-32 in device 2.

# 错误提示:卸载单实例授权特性的单个授权文件。

Uninstall failed: single instance license does not support license based uninstalling.

# 授权卸载成功(本例中例举特性FC)。

Uninstall LIC-FC-BLADE-S in device 2 success.

# 某授权中单个文件卸载成功(本例中LIC-WLAN-AP-32为授权特性名,AP32_1.lic为单个授权文件)。

Uninstall license AP32_1.lic of service LIC-WLAN-AP-32 in device 2 success.

【常见错误】

l  指定设备上还未安装指定授权特性的授权。

l  指定设备上指定授权特性下不存在指定的授权文件。

l  预卸载单实例特性下的某个授权文件(单实例授权不支持单个文件的卸载)。

l  指定设备不存在。

【平台说明】

【相关命令】

1.4   license copy

【命令功能】

license copy命令用来备份授权文件。

缺省情况下,未配置备份授权文件。

【命令格式】

license { copy-all | copy-file filename } { flash: | usb0: } [ target-filename ]

【参数说明】

copy-all:备份系统上的所有永久授权。

copy-file:备份授权上由filename指定的授权。其中filename表示系统已安装的授权文件名或特性名。filename可以是系统已安装的授权文件名,也可以是特性名,当filename为特性名时,就备份该特性下所有已安装的授权文件。

flash::指定授权文件在内部flash文件系统的位置。

usb0::指定授权文件在USB文件系统的位置。

target-filename:指定授权文件名字。

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

copy-file可以备份单个授权文件,也可以备份某个特性的所有授权文件。

当备份系统中所有授权文件时,生成的是tar文件。

使用dir查看已生成的授权文件压缩包,解压授权文件压缩包后,与show license all-license命令中各个永久授权特性的installed license字段显示的授权文件名对比,查看备份是否正确:

l  installed license字段只有多实例授权才有,多实例授权系统内部备份的文件名由多实例授权的id号决定。

l  单实例授权由于同一时刻系统内最多只有一个授权文件,所以内部授权文件备份直接以特性名命名。

【配置举例】

# 配置备份系统上所有的授权到u盘的rg-license-lics路径(该路径必须存在)下,授权压缩包命名为lics.tar。

Hostname> enable

Hostname# lic copy-all usb0:rg-license-lics/lics.tar

Success to copy all permanent license

【提示信息】

# 当备份所有授权时,系统上不存在可备份的授权时,则会提示以下错误信息。

Copy failed, there's no permanent license in the system.

# 成功备份系统所有授权。

Success to copy all permanent license.

# 如果设备上没有指定的特性或授权文件,则提示错误。

Copy failed, there’s no such service or license installed in the system.

# 如果指定的授权是时效性的,则提示失败。

Copy failed, the license is temporary.

# 成功备份指定授权。

Success to copy license vsd.lic.

【常见错误】

l  系统上不存在指定授权或指定文件。

l  指定要备份的授权是临时授权时,备份失败。

【平台说明】

【相关命令】

1.5   license grace-period

【命令功能】

license grace-period命令用来配置提醒授权失效的友好警告时间。

缺省情况下,提醒授权失效的友好警告时间为180天。

【命令格式】

license grace-period filename time

【参数说明】

filename:授权特性的名字。

time:提醒授权失效的友好警告时间。取值范围为0~365,单位为天。

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

评估授权才能设置友好警告时间,永久授权不需要设置。

当一项授权即将超时的时限小于100天时,每隔一段时间便会出现警告的提示信息:

l  当一项授权即将超时的时限小于友好周期警告值时,每天产生一次警告。

l  在授权失效的前一天,会每小时产生一次警告。警告以日志或SNMP TRAP形式发送。

【配置举例】

# 配置安装有特性VSD的临时授权的友好警告时间为100天。

Hostname> enable

Hostname# license grace-period LIC-VSD 100

Success to set alarm starting point of license LIC-VSD

【提示信息】

# 设置成功。

Success to set alarm starting point of license LIC-VSD.

# 系统中不存在指定授权。

There's no license abc in the system.

【常见错误】

l  系统中不存在指定授权。

【平台说明】

【相关命令】

1.6   license install

【命令功能】

license install命令用来安装一个授权。

【命令格式】

license install { flash: | usb0: } filename

【参数说明】

flash::指定授权文件在内部Flash文件系统的位置。

usb0::指定授权文件在USB文件系统的位置。

filename:指定授权文件名字。

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

授权文件名可修改。

在VSU环境下,主设备上使用license install命令时则其他各设备成员也会安装该授权;在非主设备上使用license install命令时,只在自己本地安装该授权。

【配置举例】

# 安装VSD功能授权文件。

Hostname> enable

Hostname# license install usb0:vsd.lic

License file install success, service name: LIC-VSD

【提示信息】

# 授权文件不存在。

Install failed: no such file or directory.

# 授权文件检查不合法。

Install failed: the install license may be wrong.

# 系统内已存在一个比要安装的授权文件更新的授权。

Install failed: the system already has a same license which is newer.

# 重复安装授权文件。

Install failed: the license has been installed before.

# 该授权是临时授权,系统中已存在相同的永久授权。

Install failed: The system already has a same permanent license.

# 授权文件安装成功(本例中例举特性VSD的授权)。

License file install success, service name: LIC-VSD.

# 授权安装成功,该授权转换为永久授权(本例中例举特性VSD的授权)。

License file install success, service name: LIC-VSD.

The license turns to be permanent.

# 授权安装成功,该授权临近失效期(少于30天)(本例中例举特性VSD的授权)。

License file install success, service name: LIC-VSD.;

The installed license is approaching deadline, less than 30 days.

【常见错误】

l  不存在指定的授权文件。

l  授权文件不合法。

l  授权文件sn码与设备不匹配。

l  预安装的授权比系统已有的更旧。

l  重复安装同一个授权文件。

l  预安装临时授权,而系统已安装有永久授权。

【平台说明】

【相关命令】

1.7   license unbind

【命令功能】

license unbind命令用来解除绑定一个授权。

【命令格式】

license unbind pak

【参数说明】

pak:指定授权码。

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

本命令的作用就是解除某个授权文件和对应设备的绑定关系。用户在网页上解除绑定之前,必须先在要设备上用本命令解除绑定。

成功解除绑定之后,会获得一串验证码。该验证码在网页上解除绑定时需要。

【配置举例】

# 解除绑定授权码为LIC-FCOE00000012268888的授权。

Hostname> enable

Hostname# license unbind LIC-FCOE00000012268888

Success to unbind license LIC-FCOE00000012268888

The verification string is 775719468737BA269825589557F558657575B5D5D5D5D785782598859765A8355855

【提示信息】

# 系统中不存在匹配的授权。

Unbind failed: not match license found.

【常见错误】

l  系统中不存在匹配的授权。

【平台说明】

【相关命令】

1.8   license uninstall

【命令功能】

license uninstall命令用来卸载授权。

【命令格式】

license uninstall { license [ filename ] | all }

【参数说明】

license:要卸载的授权名。

filename:要卸载的文件名。

all:卸载系统内所有授权文件。

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

当授权相关的特性正在运行时,授权卸载后不会立即生效

授权卸载后不能恢复,建议卸载前先备份授权文件

【配置举例】

# 卸载系统上的VSD授权。

Hostname> enable

Hostname# license uninstall LIC-VSD

Uninstall LIC-VSD success

【提示信息】

# 错误提示:设备上没有指定授权(本例中指定授权名为defd)。

Uninstall failed: there's no license defd in the system.

# 错误提示:设备上没有指定特性的指定授权文件(本例中指定特性为LIC-WLAN-AP-32,指定授权文件名为123.lic)。

Uninstall failed: there's no license 123.lic of service LIC-WLAN-AP-32 in the system..

# 错误提示:卸载单实例授权特性的单个授权文件。

Uninstall failed: single instance license does not support license based uninstalling.

# 授权卸载成功(本例中例举特性VSD)。

Uninstall LIC-VSD success.

# 某授权中单个文件卸载成功(本例中LIC-WLAN-AP-32为授权特性名,AP32_1.lic为单个授权文件)。

Uninstall license AP32_1.lic of service LIC-WLAN-AP-32 success.

【常见错误】

l  设备上还未安装指定授权特性的授权。

l  设备上指定授权特性下不存在指定的授权文件。

l  预卸载单实例特性下的某个授权文件(单实例授权不支持单个文件的卸载)。

【平台说明】

【相关命令】

1.9   license update

【命令功能】

license update命令用来更新一个授权。

【命令格式】

license update { flash| usb0: } filename

【参数说明】

flash::指定授权文件在内部Flash文件系统的位置。

usb0::指定授权文件在USB文件系统的位置。

filename:指定授权文件名字。

【命令模式】

特权模式

【缺省级别】

14

【使用指导】

【配置举例】

# 将系统上VSD的临时授权更新为永久授权。

Hostname> enable

Hostname# license update usb0:vsd_perm.lic

License file update success, temporary license LIC-VSD changes into permanent

【提示信息】

# 授权文件不存在。

Update failed: No such file or directory.

# 授权文件检查不合法。

Update failed: the update license may be wrong.

# 预安装的授权文件比系统中存在的更旧。

Update failed: the new installed license is older than the system one

# 该授权之前已被安装过。

Update failed: the license has been installed before.

# 临时授权不能代替永久授权。

Update failed: the period license cannot replace permanent license.

# 预安装授权对应的授权特性之前未安装任何授权,请先安装:。

Update failed: now the system does not have the license.

Try "license install" instead.

# 更新成功,某评估授权转换为永久授权(本例中例举特性VSD的授权):。

Update success, temporary license LIC-VSD changes into permanent.

【常见错误】

l  授权文件不是本设备的。

l  预用较旧的授权替代较新的授权。

l  更新的授权就之前已经安装过。

l  预用临时授权代替永久授权。

l  更新授权时,对应的授权特性未安装任何授权。

【平台说明】

【相关命令】

1.10   show license all-license

【命令功能】

show license all-license命令用来查看设备中所有已安装的授权文件列表。

【命令格式】

show license all-license

【参数说明】

【命令模式】

除用户模式以外的所有模式

【缺省级别】

14

【使用指导】

【配置举例】

# 查看系统里所有已安装的授权信息。

Hostname> enable

Hostname# show  license all-license

Searching license in the system

  1. Service name: LIC-AP-64

Attribute: Releasable

[Permanent licenses]   [Licensed serial number]

19880966.lic             LIC-AP-6400000012264966

19880988.lic             LIC-AP-6400000012264988

[Temporary license]    [Licensed serial number]

19880900.lic             LIC-AP-6400000012264900

(63 days left)

  1. Service name: LIC-VSD

Attribute: Temporary, Releasable

Left days: 362

Licensed serial number: LIC-VSD00000012268888

表1-1   show license all-license命令输出信息描述表

字段 描述
Service name 授权的特性名称
Attribute 该授权的属性
Permanent licenses 该授权的永久许可证
Licensed serial number 许可证对应的许可序列号
Temporary license 该授权的临时许可证
Left days 授权期限剩余天数
Licensed serial number 授权码

 

【提示信息】

【常见错误】

【平台说明】

【相关命令】

1.11   show license dev-hostid

【命令功能】

show license dev-hostid命令用来查看用于安装授权文件的所有设备的主机号。

【命令格式】

show license dev-hostid

【参数说明】

【命令模式】

除用户模式以外的所有模式

【缺省级别】

14

【使用指导】

【配置举例】

# 查看环境中所有设备的主机号。

Hostname> enable

Hostname# show license dev-hostid

Dev 1: 8708EH5F00042

Dev 2: GH3002893D300

表1-2   show license dev-hostid命令输出信息描述表

字段 描述
Dev dev-iddev-hostid 显示对应设备序号的主机号,参数含义为:

●    dev-id:设备序号

●    dev-hostid:设备的主机号

 

【提示信息】

【常见错误】

【平台说明】

【相关命令】

1.12   show license dev-license

【命令功能】

show license dev-license命令用来查看系统中各个设备上的授权文件列表。

【命令格式】

show license dev-license

【参数说明】

【命令模式】

除用户模式以外的所有模式

【缺省级别】

14

【使用指导】

【配置举例】

# 查看系统里各个设备上已安装的授权文件列表。

Hostname> enable

Hostname# show license dev-license

Searching license in the system

Dev 1:

  1. Service name: LIC-AP-64

Attribute: Releasable

[Permanent licenses]   [Licensed serial number]

19880966.lic             LIC-AP-6400000012264966

19880988.lic             LIC-AP-6400000012264988

[Temporary license]    [Licensed serial number]

19880900.lic             LIC-AP-6400000012264900

(63 days left)

  1. Service name: LIC-VSD

Attribute: Temporary, Releasable

Left days: 362

Licensed serial number: LIC-VSD00000012268888

Dev 2:

  1. Service name: LIC-FC-BLADE-S

Attribute: Temporary, Releasable

Left days: 99

Licensed serial number: LIC-FC-BLADE-S 00000001884686

  1. Service name: LIC-AP

Attribute: Permanent, Releasable

[Installed licenses]   [Licensed serial number]

19880921.lic             LIC-AP00000012265001

19880922.lic             LIC-AP00000012265002

表1-3   show license dev-license命令输出信息描述表

字段 描述
Dev dev-id 对应设备序号
Service name 授权的特性名称
Attribute 该授权的属性
Permanent licenses 该授权的永久许可证
Licensed serial number 许可证对应的许可序列号
Temporary license 该授权的临时许可证
Left days 授权期限剩余天数
Installed license 已安装的授权文件
Licensed serial number 授权码

 

【提示信息】

【常见错误】

【平台说明】

【相关命令】

1.13   show license dev-unbind-code

【命令功能】

show license dev-unbind-code命令用来查看系统中各个设备已解除绑定授权的验证码。

【命令格式】

show license dev-unbind-code

【参数说明】

【命令模式】

除用户模式以外的所有模式

【缺省级别】

14

【使用指导】

【配置举例】

# 查看系统中各个设备已解除绑定授权的验证码信息。

Hostname> enable

Hostname# show license dev-unbind-code

Searching unbound license in the system

Dev 1:

LICENSE                 UNBINDING-CODE                                                            LIC-FCOE00000012265013  57771FF68737BFF69FF55FF557F55FF57575B5A5556587857FF59FF59765AFF55FF5      LIC-VSD00000012265011   57771FF68737BFF69FF55FF557F55FF57575B5A5556567857FF59FF59765AFF55FF5      Dev 2:

LICENSE                 UNBINDING-CODE                                                            LIC-VSD00000012264933   77571FF68737BFF69FF55FF557F55FF57575B595E58587857FF59FF59765AFF55FF5      LIC-TRILL00000012264966 77571FF68737BFF69FF55FF557F55FF57575B595E5B5B7857FF59FF59765AFF55FF5      LIC-FCOE00000012264988  77571FF68737BFF69FF55FF557F55FF57575B595E5D5D7857FF59FF59765AFF55FF5

表1-4   show license dev-unbind-code命令输出信息描述表

字段 描述
Dev dev-id 对应设备序号
LICENSE 已解除绑定的授权码
UNBINDING-CODE 解除绑定的验证码

 

【提示信息】

【常见错误】

【平台说明】

【相关命令】

1.14   show license file

【命令功能】

show license file命令用来查看设备上指定授权文件的信息。

【命令格式】

show license file file-license

【参数说明】

file-license:授权文件名称。

【命令模式】

除用户模式以外的所有模式

【缺省级别】

14

【使用指导】

【配置举例】

# 查看一个VSD授权信息。

Hostname# show license file LIC-VSD

Service name: LIC-VSD

Attribute: Temporary, Releasable

Left days: 362

Licensed serial number: LIC-VSD00000012268888

表1-5   show license file命令输出信息描述表

字段 描述
Service name 授权的特性名称
Attribute 该授权的属性
Left days 授权期限剩余天数
Licensed serial number 授权码

 

【提示信息】

【常见错误】

【平台说明】

【相关命令】

1.15   show license hostid

【命令功能】

show license hostid命令用来查看本设备的主机号。

【命令格式】

show license hostid

【参数说明】

【命令模式】

除用户模式以外的所有模式

【缺省级别】

14

【使用指导】

【配置举例】

# 查看本设备的主机号。

Hostname> enable

Hostname# show license hostid

1234942570021

表1-6   show license hostid命令输出信息描述表

字段 描述
dev-hostid 本设备的主机号

 

【提示信息】

【常见错误】

【平台说明】

【相关命令】

1.16   show license unbind-code

【命令功能】

show license unbind-code命令用来查看本设备已解除绑定授权的验证码。

【命令格式】

show license unbind-code

【参数说明】

【命令模式】

除用户模式以外的所有模式

【缺省级别】

14

【使用指导】

【配置举例】

# 查看本设备已解除绑定授权的验证码信息。

Hostname> enable

Hostname# show license unbind-code

LICENSE                 UNBINDING-CODE

LIC-VSD00000012264933   77571FF68737BFF69FF55FF557F55FF57575B595E58587857FF59FF59765AFF55FF5

LIC-FCOE00000012264966   77571FF68737BFF69FF55FF557F55FF57575B595E5B5B7857FF59FF59765AFF55FF5

LIC-TRILL00000012264988   77571FF68737BFF69FF55FF557F55FF57575B595E5D5D7857FF59FF59765AFF55FF5

表1-7   show license unbind-code命令输出信息描述表

字段 描述
LICENSE 已解除绑定的授权码
UNBINDING-CODE 解除绑定的验证码

 

【提示信息】

【常见错误】

【平台说明】

【相关命令】

1.17   show license usage

【命令功能】

show license usage命令用来查看系统当前授权使用情况。

【命令格式】

show license usage

【参数说明】

【命令模式】

除用户模式以外的所有模式

【缺省级别】

14

【使用指导】

【配置举例】

# 查看授权信息。

Hostname> enable

Hostname# show license usage

Searching license in the system...

  1. Service name: LIC-AP-64

Attribute: Releasable

[Permanent licenses]   [Licensed serial number]

19880966.lic             LIC-AP-6400000012264966

19880988.lic             LIC-AP-6400000012264988

[Temporary license]    [Licensed serial number]

19880900.lic             LIC-AP-6400000012264900

(63 days left)

  1. Service name: LIC-VSD

Attribute: Temporary, Releasable

Left days: 362

Licensed serial number: LIC-VSD00000012268888

表1-8   show license usage命令输出信息描述表

字段 描述
Service name 授权的特性名称
Attribute 该授权的属性
Permanent licenses 该授权的永久许可证
Licensed serial number 许可证对应的许可序列号
Temporary license 该授权的临时许可证
Left days 授权期限剩余天数
Licensed serial number 授权码

 

【提示信息】

【常见错误】

【平台说明】

【相关命令】

上一篇 华为防火墙-CLI举例:虚拟系统双机热备(负载分担),防火墙上行连接路由器,下行多个虚拟系统连接不同子网,上行共用根系统出口
下一篇 Ubuntu下TFTP与FTP服务详解