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

03-安全策略命令参考

16-流量管理命令

本章节下载 16-流量管理命令  (194.34 KB)

docurl=/cn/Service/Document_Software/Document_Center/IP_Security/ACG/H3C_SecPath_ACG1000/Command/Command_Manual/H3C_ACG1000_CR(E6411_R6609)-800/03/202112/1510257_30005_0.htm

16-流量管理命令


1 流量管理

1.1  线路配置命令

1.1.1  enable(disable)

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

【命令】

enable 使能

disable 禁用

【缺省情况】

缺省情况下为enable。

【视图】

线路配置节点视图

【使用指导】

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

【举例】

# 禁用线路规则test。

host# system-view

host(config)# qos-profile line test

host(config-qos-test)# disable

1.1.2  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.3  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.4  maxbandwidth

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

【命令】

maxbandwidth { egress | ingress } bandwidth-range

【缺省情况】

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

【视图】

线路配置节点视图

【参数】

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

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

bandwidth-range:最大带宽值,范围是8~1000000,单位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.1.5  qos-profile line

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

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

【命令】

qos-profile line line-name

no qos-profile line line-name

【视图】

系统视图

【参数】

line-name:线路的名称,取值最大27个字符,且不能包含“%!"#$&`*+,/:;<=>?\^'{}!”。

【举例】

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

host# system-view

host(config)# qos-profile line test

1.2  管道配置命令

1.2.1  bandwidth

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

【命令】

bandwidth { egress | ingress } bandwidth-range

【缺省情况】

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

【视图】

管道配置节点视图

【参数】

egress:指定下行流量。

ingress:指定上行流量。

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

【使用指导】

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

【举例】

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

host# system-view

host(config)# qos-profile channel channel0

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

1.2.2  enable(disable)

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

【命令】

enable使能

disable禁用

【缺省情况】

缺省情况下为enable。

【视图】

管道配置节点视图

【使用指导】

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

【举例】

# 禁用管道规则channel0。

host# system-view

host(config)# qos-profile channel channel0

host(config-qos-channel0)# dissable

1.2.3  match

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

【命令】

match { address | application | service | user } name

【视图】

管道配置节点视图

【参数】

address:地址或地址组对象。

application:应用对象。

service:服务对象。

user:用户或用户组对象。

name:对象的名称。

【使用指导】

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

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

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

【举例】

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

host# system-view

host(config)# qos-profile channel channel0

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

1.2.4  maxbandwidth

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

【命令】

maxbandwidth { egress | ingress } bandwidth-range

【缺省情况】

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

【视图】

管道配置节点视图

【参数】

egress:指定下行流量。

ingress:指定上行流量。

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

【举例】

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

host# system-view

host(config)# qos-profile channel channel0

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

1.2.5  move

move命令用来在相同级别的管道中,移动管道顺序。

【命令】

move { bottom | top | up | down }

【视图】

管道配置节点视图

【参数】

bottom:移动到底部,但是在缺省管道之前。

top:移动到顶部。

up:向上移动。

donw:向下移动。

【使用指导】

·     在相同级别的管道中,移动管道顺序。

·     管道匹配按照管道配置顺序进行匹配,如果某个管道的顺序不合理,可以移动管道顺序。

【举例】

# 把管道channel0移动到顶部。

host# system-view

host(config)# qos-profile channel channel0

host(config-qos-channel0)# move top

1.2.6  perip mode

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

【命令】

perip mode{ ip | user }

【缺省情况】

默认为ip限速模式。

【视图】

管道配置节点视图

【参数】

ip:每ip限速模式。

user:每用户限速模式。

【举例】

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

host# system-view

host(config)# qos-profile channel channel0

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

1.2.7  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

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

1.2.8  priority

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

【命令】

priority { low | medium | high }

【视图】

管道配置节点视图

【参数】

low:低优先级。

medium:中优先级。

high:高优先级。

【使用指导】

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

【举例】

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

host# system-view

host(config)# qos-profile channel channel0

host(config-qos-channel0)# priority high

1.2.9  qos-profile channel

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

no qos-profile channe命令用来删除管道。

【命令】

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.2.10  schedule

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

【命令】

schedule schedule-name

【缺省情况】

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

【视图】

管道配置节点视图

【参数】

schedule-name:时间对象名称。

【举例】

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

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

host(config-qos-channel0)# schedule worktime

1.3  白名单配置命令

1.3.1  qos-profile white-list

qos-profile white-list命令用来配置流量限制白名单。

no qos-profile white-list命令用来删除流量限制白名单。

【命令】

qos-profile white-list any any address-name any user-name any

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

【视图】

系统视图

【参数】

address-name:地址对象名称。

user-name:用户对象名称。

【使用指导】

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

【举例】

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

host# system-view

host(config)# qos-profile white-list any any addr1 any any any

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

新华三官网
联系我们