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

03-安全策略配置指导

目录

05-流控管理配置指导

本章节下载 05-流控管理配置指导  (278.04 KB)

docurl=/cn/Service/Document_Software/Document_Center/Home/Security/00-Public/Configure/Operation_Manual/ACG1000_CG(R6612_E6453)/03/202104/1406829_30005_0.htm

05-流控管理配置指导


1 流控策略

1.1  流控策略简介

流控策略是通过流量分析,对各种网络流量进行精细控制和调度的一种方法。

流控策略具有如下特点:

·     使用线路和通道,实现层次化的流控策略。

·     支持保障带宽和最大带宽。

·     支持限制通道方式,不允许弹性借用带宽资源。

·     支持弹性带宽或带宽借用,充分利用网络资源。

·     支持惩罚通道方式,可被限额策略引用,不允许弹性借用带宽资源。

·     能够根据应用、服务、用户、地址对象等进行流量控制。

·     支持优先级,确保高优先级的应用能够获得带宽。

·     支持按每IP/每用户进行流量限速。

·     流控策略可以在指定的时间内生效。

流控策略涉及的概念解释:

·     线路

一般和一个物理接口对应,说明从哪个接口或者满足哪些限制,才匹配该线路。

·     通道

根据应用、服务、用户、地址对象等,虚拟的控制带宽单元的概念。

·     保障带宽

当网络繁忙的时候,需要保证使用的带宽。

·     最大带宽

当网络空闲的时候,能够最大使用的带宽。

·     默认通道

未匹配用户指定通道的流量,按照默认通道进行流量控制。

图1-1描述了流控策略的基本原理。

图1-1 流控策略工作原理示意图

 

·     ge0接口上行带宽为10M,市场部、财务部和研发部共享10M带宽,其中市场部的保障带宽为6M,研发部为4M,财务部保障带宽为0M。

·     即时聊天优先级最高,HTTP服务优先级次之,P2P服务优先级最低。

·     当研发部和市场部都在使用带宽的时候,市场部和研发部的保障带宽分别为6M和4M。

·     如果研发部和财务部不使用带宽,则市场部可以充分使用10M带宽资源。

·     即时聊天有较高优先级、P2P有较低优先级,因此即使P2P流量很大,也不会导致即时聊天丢包。

1.2  线路配置

表1-1所示步骤配置创建流控策略线路:

表1-1 线路配置

操作

命令

说明

进入系统视图

system-view

配置线路并进入线路视图

qos-profile line line-name

必选

绑定接口

match interface interface-name

必选

配置流量限制模式

limit{ egress|ingress|both }

可选

缺省情况下,仅限制egress

配置带宽

maxbandwidth{ egress|ingress } bandwidth-range

可选

缺省情况下,线路创建后的最大带宽为4000000(Kbps),取值范围为8~40000000,单位Kbps

 

注意

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

 

1.3  通道配置

表1-2所示步骤配置创建流控策略通道:

表1-2 通道配置

操作

命令

说明

进入系统视图

system-view

配置通道并进入通道视图

qos-profile channel channel-name parent parent-name

必选

配置限制通道并进入通道视图

qos-profile limit-channel channel-name

必选

配置惩罚通道并进入通道视图

qos-profile punish-channel channel-name

必选

配置终端型号

match  terminal  model { any | ddi }

可选
any:针对所有终端型号进行过滤

ddi:只对DDI设备同步过来的终端用户ip,进行策略匹配。

缺省情况下,默认是any。

配置通道的最大带宽

maxbandwidth{ egress|ingress }bandwidth-range

可选

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

配置通道的保证带宽

bandwidth { egress|ingress }bandwidth-range

可选

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

配置通道的优先级

priority {low| medium| high }

可选

缺省情况下,优先级是low

配置匹配规则

match { address|application|service|user }name

可选

配置按IP进行流量限制

perip{ ingress|egress } bandwidth-range

可选

配置流量限制值,取值范围为8~40000000,单位Kbps

配置通道生效时间

schedule schedule-name

可选

缺省情况下,永远生效

在相同级别通道中移动通道顺序

move {bottom|top|up|down}

可选

 

注意

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

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

·     子节点的最大带宽,不能超过父节点的最大带宽。

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

·     通道下有多个相同类型的规则,仅仅匹配一个就算匹配。

·     通道有多个不同类型的规则,必须都需要匹配。

·     如果通道下没有任何匹配规则,则该通道无法匹配。

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

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

 

1.4  配置白名单

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

表1-3所示配置流控策略白名单:

表1-3 配置流控策略白名单

操作

命令

说明

进入系统视图

system-view

配置白名单

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

必选

 

1.5  流控策略显示和维护

表1-4所示步骤显示、维护流控策略配置:

表1-4 流控策略显示和维护

操作

命令

显示配置的信息

display running-config qos-profile

显示线路和通道信息

display qos-profile

显示流量统计信息

display qos-profile statistics

 

1.6  流控策略典型配置举例

1.6.1  最大带宽限制配置举例

1. 组网需求

·     网络出口带宽为50M,A和B两个部门共用这50M。

·     限制A部门(192.168.1.0/24)使用带宽20M,B部门(192.168.2.0/24)限制使用带宽为30M。

2. 配置步骤

(1)     配置地址对象。

host# system-view

host(config)# address A部门

host(config-address)# ip range 192.168.1.0 192.168.1.255

host(config-address)# exit

host(config)# address B部门

host(config-address)# ip range 192.168.2.0 192.168.2.255

host(config-address)# exit

(2)     配置线路。

host(config)# qos-profile line test

host(config-qos-test)# limit egress

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

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

host(config-qos-test)# exit

(3)     配置A部门的限制带宽。

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

host(config-qos-A)# maxbandwidth egress 20000

host(config-qos-A)# bandwidth egress 20000

host(config-qos-A)# match address A部门

(4)     配置B部门的限制带宽。

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

host(config-qos-B)# maxbandwidth egress 30000

host(config-qos-A)# bandwidth egress 30000

host(config-qos-A)# match address B部门

3. 验证配置

配置完成后发现A部门通过的最大流量是20M,B部门通过的最大流量为30M。

1.6.2  保障带宽限制配置举例

1. 组网需求

·     某公司总带宽50Mbps,重要业务通过HTTP进行处理,同时可能存在员工使用P2P工具,大量使用带宽的情况。

·     要求保障HTTP的带宽为10Mbps,最大带宽为50Mbps。

·     当HTTP没有流量的时候,可以把HTTP的带宽给其它应用使用。

2. 配置步骤

(1)     配置线路。

host# system-view

host(config)# qos-profile line test

host(config-qos-test)# limit egress

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

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

host(config-qos-test)# exit

(2)     配置HTTP的带宽和优先级。

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

host(config-qos-http)# maxbandwidth egress 50000

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

host(config-qos- http)# priority high

host(config-qos-http)# match service http

host(config-qos-http)# match service https

3. 验证配置

在没有P2P类型流量时HTTP服务的流量最大能达到50M,在线路拥塞时HTTP服务类型的流量也能保证10M带宽。

1.6.3  按IP限制流量配置举例

1. 组网需求

限制每个用户(每个IP)的流量最大为2Mbps。

2. 配置步骤

(1)     配置线路。

host# system-view

host(config)# qos-profile line test

host(config-qos-test)# limit egress

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

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

host(config-qos-test)# exit

(2)     配置每IP的流量限制。

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

host(config-qos-channel0)# match address any

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

3. 验证配置

查看流量监控,每个IP的最大流量只能到2M。

1.6.4  限制通道配置举例

1. 组网需求

限制每个用户(每个IP)的入方向流量最大为2Mbps。

2. 配置步骤

(1)     配置通道。

host# system-view

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

host(config-qos-test)# limit egress

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

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

host(config-qos-test)# exit

(2)     配置每个用户(每个IP)的流量限制。

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

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

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

3. 验证配置

查看流量监控,每个IP从ge0入流量最大只能到2M。

1.6.5  惩罚通道配置举例

1. 组网需求

限制每个用户(每个IP)的入方向流量最大为2Mbps。

2. 配置步骤

(1)     配置通道。

host# system-view

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

host(config-qos-test)# limit egress

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

host(config-qos-test)# exit

(2)     配置每个用户(每个IP)的流量限制。

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

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

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

3. 验证配置

在限额策略中调用惩罚通道,当用户/IP的流量限额已用尽,在流量监控页面查看惩罚通道每个用户(每个IP)的入方向流量最大为2Mbps。

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

新华三官网
联系我们