02-User Profile命令
本章节下载 (180.67 KB)
display user-profile用来显示User Profile的配置信息。
【命令】
display user-profile [ name profile-name ] [ chassis chassis-number slot slot-number [ cpu cpu-number ] ]
【视图】
任意视图
【缺省用户角色】
network-admin
network-operator
mdc-admin
mdc-operator
【参数】
name profile-name:表示User Profile的名称。如果未指定本参数,将显示所有User Profile的配置信息和在线用户信息。
chassis chassis-number slot slot-number:指定单板。chassis-number表示设备在集群中的成员编号,slot-number表示单板所在的槽位号。如果不指定本参数,则表示指定所有单板。
cpu cpu-number:指定CPU。cpu-number表示单板上CPU的编号。只有指定的slot支持多CPU时,才能配置该参数。
【举例】
# 显示名称为aaa的User Profile配置信息及被授权该User Profile的在线用户信息。
<Sysname> display user-profile name aaa
User Profile: aaa
Direction: Inbound
General Traffic Shaping:
If-match any:
CIR 30000 (kbps), CBS 1875000 (Bytes)
Direction: Outbound
QMProfile: qm
General Traffic Shaping:
If-match any:
CIR 4000 (kbps), CBS 250000 (Bytes)
User user_1:
Direction: Inbound
User ID: 0x00000001
User type: Dot1X
Network attributes:
Interface : GigabitEthernet1/2/0/1
MAC address : 0000-1111-2222
Failed action list:
Direction: Inbound
Committed Access Rate:
CIR 30000 (kbps), CBS 1875000 (Bytes)
Policy: p1
User user_2:
Direction: Outbound
User ID: 0x00000002
User type: Dot1X
Network attributes:
Interface : GigabitEthernet1/2/0/3
IP address : 172.16.187.16
VPN : N/A
Service VLAN : 100
表1-1 display user-profile 命令显示信息描述表
字段 |
描述 |
User Profile |
User Profile名称 |
Direction |
策略应用的方向,取值为: · Inbound:表示入方向 · Outbound:表示出方向 |
Generic Traffic Shaping |
流量整形 |
If-match any |
匹配所有报文,即流量整形对该用户的所有报文生效 |
CIR |
承诺信息速率,单位为kbps |
CBS |
承诺突发尺寸,也就是容纳突发流量的令牌桶深度,单位为byte |
QMProfile |
队列调度策略 |
User user_1 |
与User Profile关联的用户信息 |
Network attributes |
用户特征信息: · Interface:上线用户的上线接口 · MAC address:上线用户的MAC地址 · IP address:上线用户的IP地址 · VPN:上线用户所属VPN实例 · Service VLAN:上线用户的外层VLAN · Customer VLAN:上线用户的内层VLAN |
Failed action list |
在该用户上应用失败的动作 |
display user-profile interface命令用来显示接口上应用的User Profile的配置情况、配置状态和流量监管统计信息。
【命令】
display user-profile interface [ interface-type interface-number ] [ chassis chassis-number slot slot-number [ cpu cpu-number ] ] [ inbound | outbound ]
【视图】
任意视图
【缺省用户角色】
network-admin
network-operator
mdc-admin
mdc-operator
【参数】
interface-type interface-number:指定接口类型和接口编号。如果未指定本参数,将显示所有接口上应用的User Profile的配置情况、配置状态和流量监管统计信息。
chassis chassis-number slot slot-number:显示接口上应用的User Profile的配置情况、指定成员设备指定单板接口上的配置状态和流量监管统计信息。只有指定的接口为聚合接口时才支持指定本参数。chassis-number表示设备在集群中的成员编号,slot-number表示单板所在的槽位号。如果不指定本参数,将显示接口上应用的User Profile的配置情况、全局主用主控板接口上的配置状态和流量监管统计信息。
cpu cpu-number:指定CPU。cpu-number表示单板上CPU的编号。只有指定的slot支持多CPU时,才能配置该参数。
inbound:显示入方向应用的User Profile的配置情况、配置状态和流量监管统计信息。
outbound:显示出方向应用的User Profile的配置情况、配置状态和流量监管统计信息。
【使用指导】
如果不指定inbound和outbound参数,则显示接口任意方向上应用的User Profile的配置情况、配置状态和流量监管统计信息。
如果指定inbound或outbound参数,则仅显示以指定方向方式应用的User Profile的配置情况、配置状态和流量监管统计信息,不会显示以无方向方式应用的User Profile的配置情况、配置状态和流量监管统计信息。
【举例】
# 显示设备所有接口上以入方向方式应用的User Profile中的配置情况、配置状态和流量监管统计信息。
<Sysname> display user-profile interface inbound
Interface: GigabitEthernet1/2/0/1
User Profile: a456
Direction: Inbound
Generic Traffic Shaping(active):
If-match any:
CIR 30000 (kbps), CBS 1875000 (Bytes)
Direction: Outbound
QMProfile(active): qm
Generic Traffic Shaping(active):
If-match any:
CIR 4000 (kbps), CBS 250000 (Bytes)
# 显示接口GigabitEthernet1/2/0/1任意方向上应用的User Profile的配置情况、配置状态和流量监管统计信息。
<Sysname> display user-profile interface gigabitethernet 1/2/0/1
Interface: GigabitEthernet1/2/0/1
User Profile: a456
Direction: Inbound
Generic Traffic Shaping(active):
If-match any:
CIR 30000 (kbps), CBS 1875000 (Bytes)
Direction: Outbound
QMProfile(active): qm
Generic Traffic Shaping(active):
If-match any:
CIR 4000 (kbps), CBS 250000 (Bytes)
# 显示聚合接口Route-Aggregation 1任意方向上应用的User Profile的配置情况和其在slot 2上配置状态和流量监管统计信息。
<Sysname> display user-profile interface route-aggregation 1 slot 2
Interface: Route-Aggregation 1
User Profile: a456
Direction: Inbound
Generic Traffic Shaping(active):
If-match any:
CIR 30000 (kbps), CBS 1875000 (Bytes)
Direction: Outbound
QMProfile(active): qm
Generic Traffic Shaping(active):
If-match any:
CIR 4000 (kbps), CBS 250000 (Bytes)
表1-2 display user-profile interface命令显示信息描述表
字段 |
描述 |
Direction |
User Profile应用在接口的方向,取值为: · Inbound:表示接口入方向 · Outbound:表示接口出方向 |
User Profile |
接口上应用的User Profile的名称 |
Generic Traffic Shaping |
流量整形的配置信息 |
If-match any |
匹配所有报文,即流量整形对上线用户的所有流量生效。具体对何种方式上线的用户流量生效与设备的型号有关,请以设备的实际情况为准 |
active |
表示该配置下发成功,已生效 |
inactive |
表示该配置下发失败,未生效 |
CIR |
承诺信息速率,单位为kbps |
CBS |
承诺突发尺寸,单位为byte |
QMProfile |
队列调度策略 |
【相关命令】
· qos apply user-profile
qos apply user-profile命令用来在接口上应用User Profile。
undo qos apply user-profile命令用来取消在接口上应用User Profile。
【命令】
qos apply user-profile profile-name [ inbound | outbound ]
undo qos apply user-profile [ inbound | outbound ]
【缺省情况】
接口上未应用User Profile。
【视图】
接口视图
【缺省用户角色】
network-admin
mdc-admin
【参数】
profile-name:User Profile的名称,为1~31个字符的字符串,只能包含英文字母(a-z,A-Z)、数字(0-9)、下划线(_)、连字符(-)和英文句号(.),支持以字母或数字开头,但不能为纯数字,区分大小写。
inbound:在入方向应用User Profile。
outbound:在出方向应用User Profile。
【使用指导】
通过本命令在接口上应用User Profile时:
· 如果指定了inbound或outbound参数,且User Profile中的配置本身也含有方向属性,则只有二者的方向属性一致时,该配置才会生效。
· 如果未指定inbound或outbound参数,则表示应用了一个无方向的User Profile,此时User Profile中的相关配置是否生效将不再受User Profile的应用方向的限制。
接口同一个方向上只能应用一个User Profile,以名称为abc和xyz的两个User Profile为例:
· 如下两个User Profile分别应用在入方向和出方向,在方向属性上无重叠,可以同时应用:
¡ qos apply user-profile abc inbound
¡ qos apply user-profile xyz outbound
· 如下两个User Profile分别应用在入方向和无方向,在方向属性上有重叠,不可以同时应用:
¡ qos apply user-profile abc inbound
¡ qos apply user-profile xyz
取消接口上应用的User Profile时,只会根据所指定的方向(入方向、出方向或无方向)删除对应方向上所应用的User Profile。
【举例】
# 在接口上以无方向方式应用名称为u1的User Profile。
<Sysname> system-view
[Sysname] interface gigabitethernet 1/2/0/1
[Sysname-GigabitEthernet1/2/0/1] qos apply user-profile u1
# 在接口入方向上应用名称为u1的User Profile。
<Sysname> system-view
[Sysname] interface gigabitethernet 1/2/0/1
[Sysname-GigabitEthernet1/2/0/1] qos apply user-profile u1 inbound
【相关命令】
· display user-profile interface
· user-profile
user-profile命令用来创建User Profile,并进入User Profile视图。如果指定的User Profile已经存在,则直接进入User Profile视图。
undo user-profile命令用来删除指定的User Profile。
【命令】
user-profile profile-name
undo user-profile profile-name
【缺省情况】
不存在User Profile。
【视图】
系统视图
【缺省用户角色】
network-admin
mdc-admin
【参数】
profile-name:表示User Profile的名称,为1~31个字符的字符串,只能包含英文字母(a-z,A-Z)、数字(0-9)、下划线(_)、连字符(-)和英文句号(.),支持以字母或数字开头,但不能为纯数字,区分大小写。User Profile的名称必须全局唯一。
【使用指导】
User Profile的名称必须全局唯一。
【举例】
# 创建名称为a123的User Profile,并进入其视图。
<Sysname> system-view
[Sysname] user-profile a123
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!