流量监管典型配置

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

流量监管典型配置

1.配置需求

设备 Device A通过端口 GigabitEthernet1/0/3和设备 Device B的端口 GigabitEthernet1/0/1

互连

Server、Host A、Host B可经由 Device A和 Device B访问 Internet

要求在设备 Device A上对端口 GigabitEthernet1/0/1接收到的源自 Server和 Host A的报文流分别实施流量控制如下:

来自 Server的报文流量约束为 1024kbps,流量小于 1024kbps时可以正常发送,流量超过

1024kbps时则将违规报文的 DSCP优先级设置为 0后进行发送;

来自 Host A的报文流量约束为 256kbps,流量小于 256kbps时可以正常发送,流量超过

256kbps时则丢弃违规报文;

对设备 Device B的 GigabitEthernet1/0/1和 GigabitEthernet1/0/2接口收发报文有如下要求:Device B的 GigabitEthernet1/0/1端口接收报文的总流量限制为 2048kbps,如果超过流量限

制则将违规报文丢弃;

经由 Device B的 GigabitEthernet1/0/2端口进入 Internet的 HTTP报文流量限制为 1024kbps,

如果超过流量限制则将违规报文丢弃。

2.组网图

3.配置步骤

(1)配置设备 Device A:

#配置 ACL2001和 2002,分别匹配来源于 Server和 Host A的报文流。

system-view

[DeviceA] acl number 2001

[DeviceA-acl-basic-2001] rule permit source 1.1.1.1 0

[DeviceA-acl-basic-2001] quit

[DeviceA] acl number 2002

[DeviceA-acl-basic-2002] rule permit source 1.1.1.2 0

[DeviceA-acl-basic-2002] quit

#创建流分类 server,匹配规则为 ACL 2001;创建流分类 host,匹配规则为 ACL 2002。[DeviceA] traffic classifier server

[DeviceA-classifier-server] if-match acl 2001

[DeviceA-classifier-server] quit

[DeviceA] traffic classifier host

[DeviceA-classifier-host] if-match acl 2002

[DeviceA-classifier-host] quit

#创建流行为 server,动作为流量监管,cir为 1024kbps,对超出限制的报文(红色报文)将其 DSCP

优先级设置为 0后发送。

[DeviceA] traffic behavior server

[DeviceA-behavior-server] car cir 1024 red remark-dscp-pass 0

[DeviceA-behavior-server] quit

#创建流行为 host,动作为流量监管,cir为 256kbps,由于默认对红色报文的处理方式就是丢弃,

因此无需配置。

[DeviceA] traffic behavior host

[DeviceA-behavior-host] car cir 256

[DeviceA-behavior-host] quit

#创建 QoS策略,命名为 car,将流分类 server和流行为 server进行关联;将流分类 host 和流行

为 host进行关联。

[DeviceA] qos policy car

[DeviceA-qospolicy-car] classifier server behavior server

[DeviceA-qospolicy-car] classifier host behavior host

(2)配置设备 Device B:

[DeviceA-qospolicy-car] quit

#将 QoS策略 car应用到端口 GigabitEthernet1/0/1的入方向上。

[DeviceA] interface GigabitEthernet 1/0/1

[DeviceA-GigabitEthernet1/0/1] qos apply policy car inbound

#配置高级 ACL3001,匹配 HTTP报文。

system-view

[DeviceB] acl number 3001

[DeviceB-acl-adv-3001] rule permit tcp destination-port eq 80

[DeviceB-acl-adv-3001] quit

#创建流分类 http,匹配 ACL 3001。

[DeviceB] traffic classifier http

[DeviceB-classifier-http] if-match acl 3001

[DeviceB-classifier-http] quit

#创建流分类 class,匹配所有报文。

[DeviceB] traffic classifier class

[DeviceB-classifier-class] if-match any

[DeviceB-classifier-class] quit

#创建流行为 car_inbound,动作为流量监管,cir为 2048kbps,由于默认对红色报文的处理方式

就是丢弃,因此无需配置。

[DeviceB] traffic behavior car_inbound

相关文档
最新文档