搜档网
当前位置:搜档网 › 华为路由器流量控制策略

华为路由器流量控制策略

华为路由器流量控制策略
华为路由器流量控制策略

NE20E-S 产品文档

产品版本:V800R007C10

文档版本:01

日期:2015-05-30

反馈文档的问题或需求,请?。

配置举例

目录

5.12.3.7?

5.12.3.7.1?

5.12.3.7 配置举例

从具体应用场景、配置命令等方面对流量监管、流量整形、接口限速进行了详细的描述。

以特性的流量控制场景为例,介绍如何配置流量监管、流量整形。通过在接口上配置流量监管、流量整形,实现收发报文的总流量限制、报文流限制。

父主题:?

5.12.3.7.1 配置流量监管、流量整形示例

以特性的流量控制场景为例,介绍如何配置流量监管、流量整形。通过在接口上配置流量监管、流量整形,实现收发报文的总流量限制、报文流限制。

组网需求

DeviceA通过接口GE0/3/0与DeviceB的接口GE0/1/0互连,Server、PC1、PC2可经由DeviceA和DeviceB访问Internet。

Server、PC1与DeviceA的GE0/1/0接口在同一网段,PC2与DeviceA的GE0/2/0接口在同一网段。

在DeviceA上对接口GE0/1/0接收到的源自Server和PC1的报文流分别实施流量控制如下:

来自Server的报文流量进行带宽保证,固定为5Mbit/s,最高不超过6Mbit/s,流量超过5Mbit/s且不超过6Mbit/s时,报文正常发送,超过6Mbit/s时,超过部分的流量降级为BE流进行发送。

来自PC1的报文流量约束为2Mbit/s,流量超过2Mbit/s时则丢弃超标流量。

对DeviceA和DeviceB的GE0/3/0和GE0/2/0接口收发报文有如下要求:

经由DeviceA的GE0/3/0接口进入DeviceB的EF流量限制为20Mbit/s,如果超过流量限制则将违规报文丢弃。

经由DeviceB的GE0/2/0接口进入Internet的EF流量限制为30Mbit/s,如果超过流量限制则将违规报文丢弃。

图1?流量整形配置组网图?

配置注意事项

在配置中需注意以下事项:

报文被remark为ef、be、cs6和cs7服务等级后,报文颜色只能被remark为green。

当用户需要显示流量策略的统计数据时,可配置statistics enable使能流量策略的统计功能。

配置思路

采用如下思路配置流量监管、流量整形和接口限速。

在DeviceA的入接口GE0/1/0上通过复杂流分类对来自Server和PC1的流量进行监管。

在DeviceA的出接口GE0/3/0配置流量整形,使进入DeviceB的EF流量限制为20Mbit/s。

在DeviceB的出接口GE0/2/0配置流量整形,限制DeviceB的GE0/2/0接口进入Internet的EF流量为30Mbit/s。数据准备

完成此例配置,需准备以下数据:

Server和PC1流量的ACL列表号、流分类名称、流行为名称、流量策略名称和流量策略应用的接口

流量监管的承诺信息速率、峰值信息速率、承诺突发尺寸、最大突发尺寸

流量整形的整形速率和配置流量整形的接口

操作步骤

1.配置各接口的IP地址(略)

# 配置ACL规则列表,分别匹配来源于Server和PC1的报文流。

system-view

[~DeviceA] acl number 2001

[*DeviceA-acl4-basic-2001] rule permit source 1.1.1.1 0.0.0.0

[*DeviceA-acl4-basic-2001] commit

[~DeviceA-acl4-basic-2001] quit

[~DeviceA] acl number 2002

[*DeviceA-acl4-basic-2002] rule permit source 1.1.1.2 0.0.0.0

[*DeviceA-acl4-basic-2002] commit

[~DeviceA-acl4-basic-2002] quit

# 配置流分类,并定义基于ACL的流分类匹配规则。

[~DeviceA] traffic classifier class1

[*DeviceA-classifier-class1] if-match acl 2001

[*DeviceA-classifier-class1] commit

[~DeviceA-classifier-class1] quit

[~DeviceA] traffic classifier class2

[*DeviceA-classifier-class2] if-match acl 2002

[*DeviceA-classifier-class2] commit

[~DeviceA-classifier-class2] quit

# 定义流行为,对来自Server的报文流量带宽设定为5Mbit/s,最高不超过6Mbit/s,流量超过5Mbit/s且不超过6Mbit/s时,报文正常通过,超过6Mbit/s时,超过部分的流量降级为BE流进行发送。

[~DeviceA] traffic behavior behavior1

[*DeviceA-behavior-behavior1] car cir 5000 pir 6000 green pass yellow pass red pass service-class be color green [*DeviceA-behavior-behavior1] commit

[~DeviceA-behavior-behavior1] quit

# 定义流行为,对来自PC1的报文流量约束为2Mbit/s,流量超过2Mbit/s时则丢弃超标流量。

[~DeviceA] traffic behavior behavior2

[*DeviceA-behavior-behavior2] car cir 2000 green pass yellow discard red discard

[*DeviceA-behavior-behavior2] commit

[~DeviceA-behavior-behavior2] quit

# 定义策略,将类与行为关联。

[~DeviceA] traffic policy policy1

[*DeviceA-trafficpolicy-policy1] classifier class1 behavior behavior1

[*DeviceA-trafficpolicy-policy1] classifier class2 behavior behavior2

[*DeviceA-trafficpolicy-policy1] commit

[~DeviceA-trafficpolicy-policy1] quit

# 将策略应用到GE0/1/0接口上。

[~DeviceA] interface gigabitethernet 0/1/0

[~DeviceA-GigabitEthernet0/1/0] undo shutdown

[*DeviceA-GigabitEthernet0/1/0] traffic-policy policy1 inbound

[*DeviceA-GigabitEthernet0/1/0] commit

# 在DeviceA的GE0/3/0接口上进行流量整形,对该接口发送的流量进行整形(对超过20Mbit/s的流量进行丢弃),以降低在DeviceB 接口GE0/1/0处的丢包率。

[~DeviceA] interface gigabitethernet 0/3/0

[~DeviceA-GigabitEthernet0/3/0] undo shutdown

[*DeviceA-GigabitEthernet0/3/0] port shaping 20

[*DeviceA-GigabitEthernet0/3/0] commit

3.配置DeviceB

# 在GE0/2/0接口上进行流量整形。

system-view

[~DeviceB] interface gigabitethernet0/2/0

[~DeviceB-GigabitEthernet0/2/0] undo shutdown

[*DeviceB-GigabitEthernet0/2/0] port shaping 30

[*DeviceB-GigabitEthernet0/2/0] commit

[~DeviceB-GigabitEthernet0/2/0] return

4.检查配置结果

在DeviceB上执行display interface命令,可以查看到接口上的流量信息。

相关主题