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

01-基础配置命令参考

目录

13-License管理命令

本章节下载 13-License管理命令  (230.56 KB)

docurl=/cn/Service/Document_Software/Document_Center/Home/Switches/00-Public/Command/Command_Manual/H3C_S6520X_S5560X-HI_S5000-EI_MS4600_CR-R65xx-1362/01/202201/1529048_30005_0.htm

13-License管理命令


1 License管理

1.1  License管理命令

1.1.1  display license

display license命令用来显示License的详细信息。

【命令】

display license [ activation-file ] [ slot slot-number ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

activation-file:显示设备上激活文件对应的License的相关信息。目前设备仅支持通过激活文件来安装License,所以,不需要使用该参数。不管是否选择该参数,显示结果相同。

slot slot-number:显示指定成员设备上安装的License信息。slot-number表示设备在IRF中的成员编号。不指定该参数时,显示所有成员设备上的License信息。

【使用指导】

如果不指定activation-file参数,则显示所有类型License的详细信息。

【举例】

# 显示设备上所有License的详细信息。

<Sysname> display license

Slot 1:                                                                        

flash:/license/210235A1XE01234567892017050317574882633.ak                      

Feature: APMGR                                                                  

Product Description: Enhanced Access Controller License,128 APs,for Verticals,fo

r V7                                                                           

Registered at: 2013-01-01 09:26:52                                             

License Type: Trial (days restricted)                                          

Trial Time Left (days): 30                                                     

Current State: In use

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

字段

描述

Feature

特性名称

Feature Description

特性的相关描述

Product Description

License的描述信息

Registered at

在设备上的安装时间

License Type

License的类型,取值为:

·     NA:无法获取License的类型

·     Permanent:永久类型,表示该License永远有效,不会过期

·     Trial (days restricted):相对时间类型的试用License,表示该License是相对时间类型的、非正式发布的License

Trial Time Left (days)

临时授权相对时间类型剩余时间

Current State

License当前状态取值为:

·     In use:当前License正在使用

·     Usable:当前License正在等待使用(当设备同时安装了多个相对时间License,且多个License均支持某一特性时,则只有一个License中的该特性处于In use状态,其它License中的该特性会处于Usable状态。绝对时间License,此状态表示未到启用时间)

·     Expired:当前License已过期

·     Uninstalled:当前License已卸载

·     Unusable:当前License无法使用

·     Invalid:不合法的数据,无法使用

Uninstall Key

卸载码。卸载激活文件,会生成卸载文件,卸载文件中包含卸载码。卸载码用于授权变更

Uninstall Date

卸载日期

1.1.2  display license device-id

display license device-id命令用来显示SN和DID信息。

【命令】

display license device-id slot slot-number

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

slot slot-number:表示设备在IRF中的成员编号。

【使用指导】

生成License激活文件需要使用DID和SN,用来表示激活文件和设备的绑定关系。

DID在执行压缩命令的时候会发生变化。因此,请在申请激活文件前,查询设备的DID信息。

DID以文件形式存储在设备中。在申请激活文件时,需通过申请页面上传该文件。

【举例】

# 显示指定slot的SN和DID信息。

<Sysname> display license device-id slot 1

SN: 210235A045B05B0004350                                                      

Device ID: flash:/license/210235A045B05B0004350.did

表1-2 display license device-id命令显示信息描述表

字段

描述

SN

序列号信息,用于申请License

Device ID

设备编号信息,用于申请License

 

1.1.3  display license feature

display license feature命令用来显示特性的License摘要信息。

【命令】

display license feature

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【举例】

# 显示License摘要信息。

<Sysname> display license feature

Slot 1:

Slot 1:                                                                        

Total: 64  Usage: 0                                                            

Feature                         Licensed        State                          

APMGR                           N               -  

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

字段

描述

Total

设备上一共可安装License的总数目

Usage

设备上已经安装的License总数

Feature

需要License授权才能使用的业务特性的名称

Licensed

是否已经授权

·     N表示未授权

·     Y表示已授权

State

License的当前状态:

·     Formal表示当前已经为该特性安装了正式License,License处于有效状态

·     Trial表示当前已经为该特性安装了临时License,License处于有效状态

·     -表示当前无有效License,用户如需使用该特性,请安装对应的License

 

1.1.4  license activation-file install

license activation-file install命令用来安装激活文件。

【命令】

license activation-file install file-name slot slot-number

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

file-name:激活文件的全路径,为1~127个字符的字符串,区分大小写。激活文件必须合法、有效,并且保存在设备存储介质上。

slot slot-number:表示给成员设备安装激活文件。slot-number表示设备在IRF中的成员编号。

【使用指导】

用户需要为每台成员设备安装激活文件。

用户使用指定成员设备的SN和DID申请到的激活文件只能安装在这台成员设备上。

成员设备安装激活文件后,即便加入别的IRF,也具有运行相应特性的授权。

【举例】

# 给指定slot安装激活文件20130811.ak。

<Sysname> system-view

[Sysname] license activation-file install flash:/license/20130811.ak slot 1

This operation might take some time. Do not perform any other operations until the operation is completed or a failure message is displayed. Please wait...

【相关命令】

·     display license activation-file

·     display license device-id

·     license activation-file uninstall

1.1.5  license activation-file uninstall

license activation-file uninstall命令用来卸载激活文件。

【命令】

license activation-file uninstall file-name slot slot-number

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

file-name:激活文件的全路径,为1~127个字符的字符串,区分大小写。

slot slot-number:表示给成员设备卸载激活文件。slot-number表示设备在IRF中的成员编号。

【使用指导】

当用户购买的正式激活文件还没有到期,并且当前设备不需要再使用时,可以卸载该激活文件,此时设备会产生一个卸载凭证——卸载文件。用户可以将该卸载凭证和其它设备绑定,获取一个新的激活文件,并在新设备上安装,从而将License从当前设备迁移到其它设备。

激活文件被卸载后,对应的特性将无法获得到被卸载的激活文件的信息,特性无法运行。

临时激活文件不能迁移,所以卸载临时激活文件,不会产生卸载文件。如果卸载的是正式激活文件,则会产生卸载文件。

【举例】

# 给指定slot卸载正式激活文件flash:/license/20130811.ak。

<Sysname> system-view

[Sysname] license activation-file uninstall flash:/license/20130811.ak slot 1

This operation might take some time. Do not perform any other operations until the operation is completed or a failure message is displayed. Please wait...

Uninstall file: flash:/license/20130813.uak

【相关命令】

·     display license activation-file

·     license activation-file install

1.1.6  license compress

license compress命令用来压缩License存储区。

【命令】

license compress slot slot-number

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

slot slot-number:表示对指定成员设备的License存储区进行压缩。slot-number表示设备在IRF中的成员编号。

【使用指导】

License存储区空间是有限的。执行该命令后,系统会自动判断各License的状态,将过期和卸载的License及其相关数据删除。从而释放空间,以便用户安装新的License。

用户卸载了License或者有License过期,且这个License是通过激活文件或者激活码安装的,再执行压缩操作,系统会自动变更DID。因此,在压缩License存储区前,请确保使用旧DID申请的License已经安装完毕,否则,License存储区压缩后,使用旧DID申请的License将无法继续安装。

请在执行该命令前,保存各卸载License的卸载码。因为执行该命令后,卸载码会被删除。

【举例】

# 给指定slot压缩License存储区。

<Sysname> system-view

[Sysname] license compress slot 1

This command will delete all data relevant to uninstalled and expired keys/licenses, including Uninstall keys, and create a new device ID for activation keys/files. Make sure you have saved the Uninstall keys so you can apply for a new activation key/file for the unexpired licenses that were covered by the uninstalled activation keys/files.

Are you sure you want to continue? [Y/N]: Y

 

This operation might take some time. Do not perform any other operations until the operation is completed or a failure message is displayed. Please wait...

 


2 License Client

说明

仅R6515P06及以上版本支持License client

 

2.1  License Client配置命令

2.1.1  display license client

display license client命令用来显示设备作为License Client时的配置信息和获取到的授权信息。

【命令】

display license client

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【举例】

# 显示设备作为License Client时的配置信息和获取到的授权信息。

<Sysname> display license client

Username: user      

Ciphertext password: ******

License server's IPv6 address: 2008::1, port: 2000

License server's IPv4 address: 1.1.1.1, port: 1000, vpn-instance: test

License client: Enabled, Registering, Miss sync count 0

Cache Size:

  License name: APMGR, cache size: 64

License Count: 1

 

ID: 34153395526cf65b09000000

License Name: APMGR

Licensed Count:32

License Description: H3C WLAN AP Management, 32 licenses

Current State: In use

Get Time: 2018-11-22 16:55:01

表2-1 display license client命令显示信息描述表

字段

描述

Username

认证用户名,如未指定则显示为Not configured

Ciphertext password

认证用户密文密码,如未指定则显示为Not configured

License server's IPv4 address: 1.1.1.1, port: 1000, vpn-instance: test

License Server的IPv4地址信息和端口号

License server's IPv6 address: 2008::1, port: 2000

License Server的IPv6地址信息和端口号

License server's IPv4/IPv6 address: Not configured, port: Not configured

未配置License Server的IPv4/IPv6地址信息和端口号

License client

License Client的状态信息,取值包括:

·     Enabled:已使能

·     Disabled:未使能

·     Registering:正在注册

·     Registered:已注册

·     Miss sync count:丢失同步报文的个数

Cache Size:

  License name: APMGR, cache size: 64

License Client本地缓存的License的名称和该名称License的数量

License Count

License Client本地当前拥有的授权的个数

ID

一次授权的标识。License Client申请一次授权,License Server就会给License Client分配一个ID

License name

License的名称

Licensed Count

本License的规格参数(比如H3C WLAN AP Management, 32 licenses该字段会显示32,表示一个License允许32个AP同时上线)。对于特性类型的License,该参数的取值为1

License description

License的描述信息

Current State

当前License的状态,取值为:

·     In use:当前License正在使用

·     Unusable:当前License未被使用

·     Expired (will be reclaimed in n days):当前License将在n天后失效

Get Time

License Client从License Server获取到License的时间

 

2.1.2  display license client statistics

display license client statistics命令用来显示设备通过License客户端申请到的所有授权的分类统计信息。

【命令】

display license client statistics

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【举例】

# 显示License Client从服务器申请到的所有授权的分类统计信息。

<Sysname> display license client statistics

Name    Type       Total

APMGR   UINT32     64

表2-2 display license client statistics命令显示信息描述表

字段

描述

Name

授权名称

Type

授权的数据类型,取值包括:

·     UINT32:数量类型

·     BOOL:功能类型,数量值为用户数量

·     STRING:字符串类型,数量值为用户数量

Total

如果授权是数量类型,显示为已经申请的授权总数量;

如果授权是功能或字符串类型,显示为已经申请的授权用户总数量

 

【相关命令】

·     display license client

2.1.3  license client config cache

license client config cache命令用来配置License Client本地可缓存的License的个数。

undo license client config cache命令用来禁止缓存License。

【命令】

license client config cache license-name license-name size cache-size

undo license client config cache license-name license-name

【缺省情况】

本地不允许缓存License。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

license-name:License的名称,目前取值只能为APMGR。该参数要求全大写完整输入,否则,命令行执行失败。

cache-size:本地可缓存的License的数量。

【举例】

# 允许License Client本地缓存名称为APMGR的License 64个。

<Sysname> system-view

[Sysname] license client config cache license-name APMGR size 64

2.1.4  license client enable

license client enable命令用来开启License Client功能。

undo license client enable命令用来关闭License Client功能。

【命令】

license client enable

undo license client enable

【缺省情况】

License Client功能处于关闭状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

请先配置License Server的IP地址和用户名、密码,再开启License Client功能。否则,配置失败。

配置该命令后,设备会自动向License Server发起连接,License Server会对设备进行身份认证。如果用户名和密码正确,则认证成功,License Server将为设备授权。设备获得授权后,可以使用授权对应的特性。

【举例】

# 开启License Client功能。

<Sysname> system-view

[Sysname] license client enable

【相关命令】

·     license server

·     license client username

2.1.5  license client username

license client username命令用来配置设备连接License Server时使用的用户名和密码。

undo license client username命令用来恢复缺省情况。

【命令】

license client username username password { cipher | simple } password

undo license client username

【缺省情况】

未配置连接License Server时使用的用户名和密码。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

username:认证用户名,为1~31个字符的字符串,区分大小写。

cipher:以密文方式设置密码。

simple:以明文方式设置密码,该密码将以密文形式存储。

password:设置的明文或密文认证密码,区分大小写。明文认证密码为1~31个字符的字符串;密文认证密码为33~73个字符的字符串。

【使用指导】

设备只能配置一个用于连接License Server的用户名和密码:

·     在开启License Client功能前,多次配置该命令,新配置生效。

·     在开启License Client功能后,需要先关闭License Client功能,才能修改用户名和密码。

【举例】

# 配置设备访问License Server时使用的用户名为test,密码为123456。

<Sysname> system-view

[Sysname] license client username test password simple 123456

【相关命令】

·     license client enable

2.1.6  license server

license server命令用来配置License Server的IP地址和端口。

undo license server命令用来取消License Server的IP地址和端口配置。

【命令】

license server { ipv4 ipv4-address | ipv6 ipv6-address } port port-number [ vpn-instance vpn-instance-name ]

undo license server { ipv4 ipv4-address | ipv6 ipv6-address } port port-number [ vpn-instance vpn-instance-name ]

【缺省情况】

未配置License Server的IP地址和端口。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

ipv4 ipv4-address:License Server的IPv4地址。

ipv6 ipv6-address:License Server的IPv6地址。

port-number:License Server的端口号,取值范围为1~65535。

vpn-instance vpn-instance-name:License Server所属的VPN实例。vpn-instance-name表示VPN实例名称,为1~31个字符的字符串,区分大小写。如果未指定本参数,则表示License Server位于公网中。

【使用指导】

多次执行本命令最多可配置四组IP地址。超过四组时,配置将失败,请删除已有配置后重新配置。

请确保同一时刻,仅有一组IP地址路由可达。否则,设备将选择最先建立连接的远端设备作为License Server。

如需修改License Server的地址和端口,请先关闭License Client功能。

【举例】

# 配置License Server的地址和端口号分别为192.168.100.1和5555。

<Sysname> system-view

[Sysname] license server ipv4 192.168.100.1 port 5555

# 配置License Server的IPv6地址和端口号分别为3001::1和5555。

<Sysname> system-view

[Sysname] license server ipv6 3001::1 port 5555

【相关命令】

·     license client enable

 

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

新华三官网
联系我们