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

13-安全命令参考

02-User Profile命令

本章节下载  (189.68 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/CR/CR19000/Command/Command_Manual/H3C_CR19000_E3551-5389/13/202208/1672646_30005_0.htm

02-User Profile命令


1 User Profile

1.1  User Profile配置命令

1.1.1  display user-profile

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

      Committed Access Rate:

        CIR 30000 (kbps), CBS 1875000 (Bytes), EBS 0 (Bytes), PIR 888 (kbps)

    Direction: Outbound

      Committed Access Rate:

        CIR 32 (kbps), CBS 2048 (Bytes), EBS 0 (Bytes), PIR 888 (kbps)

      User queue:

        Limit Rate:

          CIR 30000 (kbps), CBS 1875000 (Bytes), EBS 0 (Bytes), PIR 888 (kbps)

        QMProfile:

          qm1

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

字段

描述

User Profile

User Profile名称

Direction

User Profile中的Direction表示该Profile中相关配置的方向,取值为:

·     Inbound:表示入方向

·     Outbound:表示出方向

CIR

承诺信息速率,单位为kbps

CBS

承诺突发尺寸,也就是容纳突发流量的令牌桶深度,单位为byte

EBS

超出突发尺寸,在双令牌桶算法中超出突发流量超过承诺突发流量的部分,单位为byte

PIR

峰值信息速率

User queue

用户队列

Limit Rate

限速

QMProfile

队列调度策略

 

1.1.2  display user-profile interface

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的配置情况和配置状态。

【使用指导】

如果不指定inboundoutbound参数,则显示接口任意方向上应用的User Profile的配置情况、配置状态和流量监管统计信息。

如果指定inboundoutbound参数,则仅显示以指定方向方式应用的User Profile的配置情况、配置状态和流量监管统计信息,不会显示以无方向方式应用的User Profile的配置情况、配置状态和流量监管统计信息。

【举例】

# 显示设备所有接口上以入方向方式应用的User Profile中的配置情况和配置状态。

<Sysname> display user-profile interface inbound

Interface: GigabitEthernet1/2/0/1

  Direction: Inbound

    User Profile: u1

      Committed Access Rate(active):

        CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

Interface: GigabitEthernet1/2/0/2

  Direction: Inbound

    User Profile: u2

      Committed Access Rate(active):

        CIR 128 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

# 显示接口GigabitEthernet1/2/0/1任意方向上应用的User Profile的配置情况和配置状态。

<Sysname> display user-profile interface gigabitethernet 1/2/0/1

Interface: GigabitEthernet1/2/0/1

  Direction: Inbound

    User Profile: test

      Committed Access Rate(active):

        CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

  Direction: Outbound

    User Profile: test

      Committed Access Rate(active):

        CIR 112 (kbps), CBS 5120 (Bytes), EBS 512 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

# 显示聚合接口Route-Aggregation 1任意方向上应用的User Profile的配置情况和其在slot 1上配置状态。

<Sysname> display user-profile interface route-aggregation 1 slot 1

Interface: Route-Aggregation 1

  User Profile: u2

    Direction: Inbound

      Committed Access Rate(inactive):

        CIR 128 (kbps), CBS 8000 (Bytes), EBS 0 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

    Direction: Outbound

      Committed Access Rate(inactive):

        CIR 128 (kbps), CBS 8000 (Bytes), EBS 0 (Bytes)

        Green action  : pass

        Yellow action : pass

        Red action    : discard

      User queue:

        Limit Rate(active):

          CIR 32 (kbps), CBS 2048 (Bytes), EBS 0 (Bytes), PIR 888 (kbps)

        QMProfile(active):

          qm1

表1-2 display user-profile interface命令显示信息描述表

字段

描述

Direction

User Profile应用在接口的方向,取值为:

·     Inbound:表示接口入方向

·     Outbound:表示接口出方向

User Profile

接口上应用的User Profile的名称

Committed Access Rate

流量监管的配置信息和统计信息

active

表示该配置下发成功,已生效

inactive

表示该配置下发失败,未生效

CIR

承诺信息速率,单位为kbps

CBS

承诺突发尺寸,单位为byte

EBS

超出突发尺寸,单位为byte

PIR

峰值信息速率,单位为kbps

Green action  : pass

绿色报文的执行动作:允许通过

Yellow action  : pass

黄色报文的执行动作:允许通过

Red action  : discard

红色报文的执行动作:丢弃

User queue

用户队列

Limit Rate

限速

QMProfile

队列调度策略

 

【相关命令】

·     qos apply user-profile

1.1.3  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时:

·     如果指定了inboundoutbound参数,且User Profile中的配置本身也含有方向属性,则只有二者的方向属性一致时,该配置才会生效。

·     如果未指定inboundoutbound参数,则表示应用了一个无方向的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

1.1.4  qos user-queue

qos user-queue命令用来配置用户队列调度参数。

undo qos user-queue命令用来恢复缺省情况。

【命令】

qos user-queue { cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] | qmprofile qmprofile-name } * outbound

qos user-queue { cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] | qmprofile qmprofile-name } * outbound

qos user-queue { { cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] | qmprofile qmprofile-name } * } inbound

qos user-queue { { cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] | qmprofile qmprofile-name } * } inbound

undo qos user-queue { inbound | outbound }

【缺省情况】

未配置用户队列调度参数。

【视图】

User Profile视图

【缺省用户角色】

network-admin

mdc-admin

【参数】

cir committed-information-rate:承诺信息速率,单位为kbps。取值范围为300~4294967294。

cbs committed-burst-size:承诺突发尺寸,单位为byte。取值范围为4096-1341128704。

ebs excess-burst-size:超出突发尺寸,在双令牌桶算法中超出承诺突发流量的部分,单位为byte。取值范围为0-4294967294。

pir peak-information-rate:峰值速率,单位为kbps。取值范围为300-4294967294。

qmprofile qmprofile-name:队列调度策略名称,指定的队列调度策略必须已存在。

inbound:在User Profile的入方向配置用户队列调度参数,即针对接口接收的流量做调度。

outbound:在User Profile的出方向配置用户队列调度参数,即针对接口发送的流量做调度。

【使用指导】

通过本命令,可以对同一User Profile下的所有用户的队列调度参数做如下统一配置:

·     配置限速相关参数;

·     用户报文缓存队列使用统一的队列调度策略;

对于已经授权的User Profile:

·     如果已关联队列调度策略,可以修改队列调度策略中的相关参数;

·     不可以新增、修改或删除已配置的任何参数,如需修改,请先使用undo qos user-queue命令删除,再配置所需参数。

若要删除已被关联的队列调度策略,请先通过undo qos user-queue命令删除关联关系。

【举例】

# 在名称为u1的User Profile中配置用户队列限速的承诺信息速率为512kbps,报文缓存队列使用统一的名称为qm1的队列调度策略。

<Sysname> system-view

[Sysname] user-profile u1

[Sysname-user-profile-u1] qos user-queue cir 512 qmprofile qm1

【相关命令】

·     qos qmprofile(ACL和QoS命令参考/QoS)

1.1.5  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

[Sysname-user-profile-a123]

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

新华三官网
联系我们