• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

03-安全策略命令参考

目录

11-流控管理命令

本章节下载 11-流控管理命令  (290.87 KB)

11-流控管理命令


1 流量管理

1.1  线路配置命令

1.1.1  qos-profile line

qos-profile line命令用来创建线路,并进入线路节点视图,如果已经存在,则直接进入相应视图。

no qos-profile line命令用来删除线路。

【命令】

qos-profile line line-name

no qos-profile line line-name

【视图】

系统视图

【参数】

line-name:线路的名称,取值最大63个字符,支持中文数字字母以及“@._-=()[]|:,”。

【举例】

# 创建一条线路,名称为test。

host# system-view

host(config)# qos-profile line test

1.1.2  enable(disable)

enable(disable)命令用来使能(禁用)当前线路配置。

【命令】

enable 使能

disable 禁用

【缺省情况】

缺省情况下为enable。

【视图】

线路配置节点视图

【使用指导】

使能或者禁用某条线路规则,默认是使能的。

【举例】

# 禁用线路规则test。

host# system-view

host(config)# qos-profile line test

host(config-qos-test)# disable

1.1.3  limit

limit 命令用来对线路流量进行限制。

【命令】

limit { egress | ingress | both }

【缺省情况】

缺省情况下,仅限制egress方向。

【视图】

线路配置节点视图

【参数】

egress:对下行流量进行流量管理。

ingress:对上行流量进行流量管理。

both:对上下行流量同时进行流量管理。

【使用指导】

线路限制上行(入)、下行(出)、或者上下行同时进行流量限制,缺省情况下,仅仅限制egress。

【举例】

# 对线路test的出方向进行流量限制。

host# system-view

host(config)# qos-profile line test

host(config-qos-test)# limit egress

1.1.4  match interface

match interface命令用来绑定接口。

no match interface 命令用来取消绑定。

【命令】

match interface interface-name

no match interface

【视图】

线路配置节点视图

【参数】

interface-name:接口名称。

【使用指导】

·     线路必须和一个接口进行绑定,以便确定对哪个接口的流量进行控制。

·     取消绑定后,线路将不能进行流量管理。

【举例】

# 创建线路test,绑定ge0接口。

host# system-view

host(config)# qos-profile line test

host(config-qos-test)# match interface ge0

1.1.5  maxbandwidth

maxbandwidth命令用来设置线路的最大带宽。

【命令】

maxbandwidth { egress | ingress } bandwidth-range

【缺省情况】

缺省情况下,最大带宽为1000000(Kbps),即1Gbps。

【视图】

线路配置节点视图

【参数】

egress:指定下行流量的最大带宽。

ingress:指定上行流量的最大带宽。

bandwidth-range:最大带宽值,范围是8~40000000,单位Kbps。

【举例】

# 针对test线路配置上下行最大带宽分别为10Mbps。

host# system-view

host(config)# qos-profile line test

host(config-qos-test)# maxbandwidth egress 10000

host(config-qos-test)# maxbandwidth ingress 10000

1.2  流控通道动态开启命令

1.2.1  qos mode

monitor mode (interface | line | off命令用来开启和关闭动态流控。

【缺省情况】

monitor mode off

【命令】

monitor mode (interface | line | off

【视图】

线路配置节点视图

【参数】  

【使用指导】

【举例】

Host #configure terminal

host(config)# qos-profile line line1

host (config-qos-line1)# monitor mode line

 

【相关命令】

无。

1.2.2  monitor bandwidth

monitor bandwidth 命令用来配置出入带宽阈值。

【命令】

monitor bandwidth (ingress | egress< 0-40000000>

【视图】

线路配置节点视图

【参数】

egress:指定下行流量。

ingress:指定上行流量。

< 0-40000000>:出入带宽阈值,范围为0-40000000,单位为kbps。

【使用指导】

【举例】

host# configure terminal

host(config)# qos-profile line line1

host(config-qos-line1)# monitor bandwidth ingress 10000

【相关命令】

1.2.3  monitor hold-time

monitor hold-time 命令用来配置速率持续监控时间。

【命令】

monitor hold-time <2-30>

【视图】

线路配置节点视图

【参数】

<2-30>:速率持续监控时间,单位为秒,范围为2-30秒。

【使用指导】

默认为10秒

【举例】

host# configure terminal

host(config)# qos-profile line line1

host(config-qos-line1)# monitor holdtime 2

【相关命令】

1.3  流控策略的分级分权命令

1.3.1  qos permissions-control  

qos permissions-control 命令用来开启和关闭流控策略的分级分权。

【缺省情况】

关闭

【命令】

qos permissions-control ( enable | disable )

【视图】

配置视图

【参数】  

【使用指导】

【举例】

# 开启流控策略分级分权。

Host# configure terminal

Host(config)# qos permissions-control enable

Host(config)#

 

【相关命令】

无。

1.3.2  display running-config  qos

display running-config qos命令用来查询流控策略配置。

【命令】

display running-config qos

【视图】

用户视图

【参数】

【使用指导】

查询流控策略配置。

【举例】

# 查询流控策略配置。

#display running-config qos

qos permissions-control enable

qos-profile line line1

 maxbandwidth egress 1000000

 match interface ge7

 operator admin

!

qos-profile channel channel1 parent line1

 bandwidth egress 1000000

 maxbandwidth egress 1000000

administrator a3

 administrator a2

 administrator a1

 match service any

 match address any

 match terminal model any

 match user any

 match application any

 operator admin

!

qos-profile channel def_line1 parent line1

!

【相关命令】

·     display running-config qos

 

1.4  通道配置命令

1.4.1  qos-profile channel

qos-profile channel命令用来创建通道,并进入通道节点视图,如果通道已经存在,则直接进入相应视图。

no qos-profile channel命令用来删除通道。

【命令】

qos-profile channel channel-name parent parent-name

no qos-profile channel channel-name

【视图】

系统视图

【参数】

channel-name:通道的名称。

parent-name:父通道或线路,首次创建线路的时候必填。

【使用指导】

·     首次创建通道的时候,需要填写父通道或者线路。

·     创建后,如果进入通道节点,则只需要填写通道名称。

·     父节点自动创建默认通道。

【举例】

# 创建通道channel0。

host# system-view

host(config)# qos-profile channel channel0 parent test

1.4.2  enable(disable)

enable(disable)命令用来使能(禁用)当前通道配置。

【命令】

enable使能

disable禁用

【缺省情况】

缺省情况下为enable。

【视图】

通道配置节点视图

【使用指导】

使能或者禁用某条通道规则,默认是使能的。

【举例】

# 禁用通道规则channel0。

host# system-view

host(config)# qos-profile channel channel0 parent test

host(config-qos-channel0)# disable

1.4.3  bandwidth

bandwidth line命令用来设置通道的保障带宽。

【命令】

bandwidth { egress | ingress } bandwidth-range

【缺省情况】

缺省情况下,保障带宽为父节点保障带宽的20%。

【视图】

通道配置节点视图

【参数】

egress:指定下行流量。

ingress:指定上行流量。

bandwidth-range:通道的保证带宽。

【使用指导】

如果所有子节点的保障带宽超过了父节点的保障带宽,将依据配置值按比例进行分配,合理规划保障带宽,不超过父节点的保障带宽,否则可能起不到保障带宽的作用。

【举例】

# 配置通道channel0下行流量的保证带宽为10Mbps。

host# system-view

host(config)# qos-profile channel channel0 parent test

host(config-qos-channel0)# bandwidth egress 10000

1.4.4  maxbandwidth

maxbandwidth命令用来设置通道的最大可用带宽。

【命令】

maxbandwidth { egress | ingress } bandwidth-range

【缺省情况】

缺省情况下,最大带宽为父节点的最大带宽。

【视图】

通道配置节点视图

【参数】

egress:指定下行流量。

ingress:指定上行流量。

bandwidth-range:通道的最大带宽。

【举例】

# 配置通道channel0下行流量的最大带宽为10Mbps。

host# system-view

host(config)# qos-profile channel channel0 parent test

host(config-qos-channel0)# maxbandwidth egress 10000

1.4.5  perip mode

perip mode命令用来配置限速模式。

【命令】

perip mode{ ip | user }

【缺省情况】

默认为ip限速模式。

【视图】

通道配置节点视图

【参数】

ip:每ip限速模式。

user:每用户限速模式。

【举例】

# 配置通道channel0中perip的限速模式为每用户限速。

host# system-view

host(config)# qos-profile channel channel0 parent test

host(config-qos-channel0)# perip mode user

1.4.6  perip

perip命令用来限制每个IP的最大流量。

【命令】

perip { ingress | egress } bandwidth-range

【缺省情况】

通道中没有IP流量限制。

【视图】

通道配置节点视图

【参数】

egress:指定下行流量。

ingress:指定上行流量。

bandwidth-range:每个IP每秒能够通过的流量,单位为Kbps

【举例】

# 配置通道channel0中perip的流量为2Mbps。

host# system-view

host(config)# qos-profile channel channel0 parent test

host(config-qos-channel0)# perip egress 2000

1.4.7  match

match命令用来设置通道的匹配规则。

【命令】

match { src-address | dst-address | application | service | user } name

【视图】

通道配置节点视图

【参数】

src-address:源地址或地址组对象。

dst-address:目的地址或地址组对象。

application:应用对象。

service:服务对象。

user:用户或用户组对象。

name:对象的名称。

【使用指导】

·     相同类型的匹配,仅仅匹配一个就算匹配。

·     不同类型的匹配,必须两者都匹配,如果通道没有任何匹配规则,则该通道无法匹配。

·     如果配置通道下有子通道,则流量需要先匹配此通道的匹配规则,然后才会匹配子通道的规则。

【举例】

# 配置通道channel0匹配tcp服务。

host# system-view

host(config)# qos-profile channel channel0 parent test

host(config-qos-channel0)# match service tcp

# 配置通道channel0针对源地址进行匹配。

host(config-qos-channel0)# match src-address abc

 

1.4.8  priority

priority命令用来修改通道的优先级。

【命令】

priority { low | medium | high }

【视图】

通道配置节点视图

【参数】

low:低优先级。

medium:中优先级。

high:高优先级。

【使用指导】

设置通道的优先级。优先级高的通道,就有更多可能借用上级节点的带宽。

【举例】

# 配置通道channel0的优先级为high。

host# system-view

host(config)# qos-profile channel channel0 parent test

host(config-qos-channel0)# priority high

1.4.9  schedule

schedule命令用来配置通道的生效时间。

【命令】

schedule schedule-name

【缺省情况】

缺省情况下,为永久生效。

【视图】

通道配置节点视图

【参数】

schedule-name:时间对象名称。

【举例】

# 配置通道channel0的生效时间为每天9:00至18:00。

host# system-view

host(config)# schedule-day worktime

host(config-schedule-day)# periodic start 9:00 end 18:00

host(config)# qos-profile channel channel0 parent test

host(config-qos-channel0)# schedule worktime

1.5  限制通道配置命令

1.5.1  qos-profile limit-channel

qos-profile limit-channel命令用来配置流控限制通道。

no qos-profile limit-channel命令用来删除流控限制通道。

【命令】

qos-profile limit-channel channel-name

no qos-profile limit-channel channel-name

【视图】

系统视图

【参数】

channel-name:自定义限制通道名称

【使用指导】

限制通道只能使用该通道内的带宽资源。

【举例】

# 配置名称为test的流控限制通道。

host# system-view

host(config)# qos-profile limit-channel test

1.5.2  enable(disable)

enable(disable)命令用来使能(禁用)当前通道配置。

【命令】

enable使能

disable禁用

【缺省情况】

缺省情况下为enable。

【视图】

通道配置节点视图

【使用指导】

使能或者禁用某条通道规则,默认是使能的。

【举例】

# 禁用限制通道test。

host(config-qos-test)# disable

1.5.3  limit

limit 命令用来对通道流量方向进行限制。

【命令】

limit { egress | ingress | both }

【缺省情况】

无配置。

【视图】

通道配置节点视图

【参数】

egress:对下行流量进行流量管理。

ingress:对上行流量进行流量管理。

both:对上下行流量同时进行流量管理。

【使用指导】

通道限制上行(入)、下行(出)、或者上下行同时进行流量限制,缺省情况无配置。

【举例】

# 对通道test的出方向进行流量限制。

host# system-view

host(config)# qos-profile limit-channel test

host(config-qos-test)# limit egress

1.5.4  maxbandwidth

maxbandwidth命令用来设置通道的最大带宽。

【命令】

maxbandwidth { egress | ingress } bandwidth-range

【缺省情况】

缺省情况下,最大带宽为8-40000000 (Kbps)。

【视图】

通道配置节点视图

【参数】

egress:指定下行流量的最大带宽。

ingress:指定上行流量的最大带宽。

bandwidth-range:最大带宽值,范围是8-40000000,单位Kbps。

【举例】

# 针对test通道配置上下行最大带宽分别为10Mbps。

host# system-view

host(config)# qos-profile limit-channel test

host(config-qos-test)# maxbandwidth egress 10000

host(config-qos-test)# maxbandwidth ingress 10000

1.5.5  perip mode

perip mode命令用来配置限速模式。

【命令】

perip mode{ ip | user }

【缺省情况】

默认为ip限速模式。

【视图】

通道配置节点视图

【参数】

ip:每ip限速模式。

user:每用户限速模式。

【举例】

# 配置通道test中perip的限速模式为每用户限速。

host# system-view

host(config)# qos-profile limit-channel test

host(config-qos-test)# perip mode user

1.5.6  perip

perip命令用来限制每个IP的最大流量。

【命令】

perip { ingress | egress } bandwidth-range

【缺省情况】

通道中没有IP流量限制。

【视图】

通道配置节点视图

【参数】

egress:指定下行流量。

ingress:指定上行流量。

bandwidth-range:每个IP每秒能够通过的流量,单位为Kbps

【举例】

# 配置通道test中perip的下行流量为2Mbps。

host# system-view

host(config)# qos-profile limit-channel test

host(config-qos-test)# perip egress 2000

1.5.7  match

match命令用来设置通道的匹配规则。

【命令】

match { address | interface | service | user } name

【视图】

通道配置节点视图

【参数】

address:地址或地址组对象。

interface:接口。

service:服务对象。

user:用户或用户组对象。

name:对象的名称。

【使用指导】

·     相同类型的匹配,仅仅匹配一个就算匹配。

·     不同类型的匹配,必须两者都匹配,如果通道没有任何匹配规则,则该通道无法匹配。

【举例】

# 配置通道test匹配tcp服务。

host# system-view

host(config)# qos-profile limit-channel test

host(config-qos-channel0)# match service tcp

1.6  惩罚通道配置命令

1.6.1  qos-profile punish-channel

qos-profile punish-channel命令用来配置惩罚通道。

no qos-profile punish-channel命令用来删除惩罚通道。

【命令】

qos-profile punish-channel channel-name

no qos-profile punish-channel channel-name

【视图】

系统视图

【参数】

channel-name:自定义限制通道名称

【使用指导】

限制通道只能使用该通道内的带宽资源。

【举例】

# 配置名称为test的流控限制通道。

host# system-view

host(config)# qos-profile punish-channel test

1.6.2  limit

limit 命令用来对通道流量方向进行限制。

【命令】

limit { egress | ingress | both }

【缺省情况】

无配置。

【视图】

通道配置节点视图

【参数】

egress:对下行流量进行流量管理。

ingress:对上行流量进行流量管理。

both:对上下行流量同时进行流量管理。

【使用指导】

通道限制上行(入)、下行(出)、或者上下行同时进行流量限制,缺省情况无配置。

【举例】

# 对通道test的出方向进行流量限制。

host# system-view

host(config)# qos-profile punish-channel test

host(config-qos-test)# limit egress

1.6.3  maxbandwidth

maxbandwidth命令用来设置通道的最大带宽。

【命令】

maxbandwidth { egress | ingress } bandwidth-range

【缺省情况】

缺省情况下,最大带宽为8-40000000 (Kbps)。

【视图】

通道配置节点视图

【参数】

egress:指定下行流量的最大带宽。

ingress:指定上行流量的最大带宽。

bandwidth-range:最大带宽值,范围是8-40000000,单位Kbps。

【举例】

# 针对test通道配置上下行最大带宽分别为10Mbps。

host# system-view

host(config)# qos-profile punish-channel test

host(config-qos-test)# maxbandwidth egress 10000

host(config-qos-test)# maxbandwidth ingress 10000

1.6.4  perip mode

perip mode命令用来配置限速模式。

【命令】

perip mode{ ip | user }

【缺省情况】

默认为ip限速模式。

【视图】

通道配置节点视图

【参数】

ip:每ip限速模式。

user:每用户限速模式。

【举例】

# 配置通道test中perip的限速模式为每用户限速。

host# system-view

host(config)# qos-profile punish-channel test

host(config-qos-test)# perip mode user

1.7  排除策略配置命令

1.7.1  qos-profile white-list

qos-profile white-list命令用来配置流控策略白名单。

no qos-profile white-list命令用来删除流控策略白名单。

【命令】

qos-profile white-list any any src-address address-name dst-address address-name any user-name any <1-512>

no qos-profile white-list any any src-address address-name dst-address address-name any user-name any

 

【视图】

系统视图

【参数】

src-address:源地址。

dst-address:目的地址。

address-name:地址对象名称。

user-name:用户对象名称。

<1-512>:流控策略白名单ID,范围为1-512。

【使用指导】

白名单可以直接将某些用户或地址排除在流量控制之外。

【举例】

# 配置地址对象为addr1的流量不进行流量管理。

host# system-view

host(config)# qos-profile white-list any any src-address addr1 dst-address any any any any 1

1.8  启用流量详情统计开关命令

1.8.1  qos-profile detailed-statistics enable  

qos-profile detailed-statistics enable 命令用来开启和关闭流控通道的详情统计。

【缺省情况】

关闭。

【命令】

qos-profile detailed-statistics { enable | disable }

【视图】

配置视图

【参数】  

【使用指导】

【举例】

# 开启流控通道详情统计开关

# configure terminal

(config)# qos-profile detailed-statistics enable

(config)#

【相关命令】

无。

 

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

新华三官网
联系我们