00-H3C SR8800 在三层以太网子接口上配置带宽控制典型配置举例
本章节下载: 00-H3C SR8800 在三层以太网子接口上配置带宽控制典型配置举例 (182.83 KB)
H3C SR8800在三层以太网子接口上配置带宽控制典型配置举例
Copyright © 2014 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
目 录
本文档介绍了在MSTP网络中应用接口限速、CBQ队列和包过滤防火墙的配置举例。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解接口限速、CBQ队列和包过滤防火墙特性。
· 接口限速在MFR接口、链路类型为FR的POS接口和链路类型为FR的串口上不生效。
· 接口限速与qos gts any命令不能在同一接口、端口组或子接口上同时配置。
· 支持接口限速的三层以太网子接口,目前仅包括SPE单板上的三层以太网子接口、MPE单板的接口子卡MIC-GP4L上的三层以太网子接口。
· 同一流行为视图下queue ef、queue af、queue wfq命令不能同时配置。
· 同一流行为视图下queue af和wred命令不能同时配置。
· 基于CBQ队列的QoS策略只支持基于接口应用(除RPR接口),并且只能应用在接口的出方向。
· 基于CBQ队列的QoS策略与HQoS不能同时应用于同一端口。
· 在MPE单板的接口上应用基于CBQ队列的QoS策略时,该QoS策略中只允许配置一个EF队列。
当MPE单板上的POS接口加入HDLC捆绑后,该接口出方向上配置的包过滤防火墙功能不生效。
如图1所示,某公司在省内各市和省中心之间通过SR8800互连,SR8800之间的传输网络为以太网,采用MSTP协议管理冗余链路。其中省中心内网的出口路由器Router S1和Router S2分别通过其外网出接口的三层以太网子接口与各市内网建立连接(例如通过三层子接口3/1/1.10与A市内网建立连接、通过三层子接口3/1/1.60与F市内网建立连接)。
公司内网的业务可以分为以下三种:
· 视频相关业务:使用IP网段10.1.0.0/16(其中省中心内网使用IP网段10.1.1.0/24;A市内网使用IP网段10.1.2.0/24……F市内网使用IP网段10.1.7.0/24);
· 生产相关业务:使用IP网段10.2.0.0/16(其中省中心内网使用IP网段10.2.1.0/24;A市内网使用IP网段10.2.2.0/24……F市内网使用IP网段10.2.7.0/24);
· 其它办公业务:使用IP网段10.3.0.0/16(其中省中心内网使用IP网段10.3.1.0/24;A市内网使用IP网段10.3.2.0/24……F市内网使用IP网段10.3.7.0/24)。
现公司要求:
· 通过配置子接口限速实现每一条省中心和市内网之间的链路带宽不超过20M;
· 通过配置QoS策略实现对生产和视频业务提供带宽保证:视频业务为10M带宽,生产业务为4M带宽;
· 对进入公司内网的报文进行过滤,丢弃TCP端口号为4443的非法报文。
图1 在三层以太网子接口上配置带宽控制配置举例组网图
· 为了实现对视频和生产业务进行带宽保证功能,可以采用基于CBQ队列的QoS策略。在CBQ队列中,使用EF队列发送视频业务流量;使用AF队列发送生产业务流量,使用BE队列发送其它办公业务流量(BE队列为缺省队列,无需额外配置);
· 为了防止TCP端口号为4443的非法报文进入公司内网,可以在各对应的三层以太网子接口的入方向上配置包过滤防火墙过滤此类报文。
本举例是在 SR8800-CMW520-R3725版本上进行配置和验证的。
· 接口上如果配置了流量整形和队列(queue ef、queue af、queue wfq)特性的策略,会影响到CBQ队列的调度效果,不建议这样组合配置。
· MFR接口使能帧中继流量整形功能会影响到CBQ队列的调度效果,不建议这样组合配置。
· 在一个基于CBQ队列的QoS策略中,如果配置EF、AF和BE流量的总带宽超过端口的实际带宽时会导致QoS策略无法达到预期效果。
Router S2的配置和Router S1的配置相似,此处仅以Router S1的配置为例。详细配置可参见配置文件。
(1) 在外网出接口(三层以太网子接口)出方向上配置接口限速功能
# 配置与A市相连的GigabitEthernet 3/1/1.10接口的带宽为20M。
<RouterS1> system-view
[RouterS1] interface GigabitEthernet 3/1/1.10
[RouterS1-GigabitEthernet3/1/1.10] qos lr outbound cir 20000
[RouterS1-GigabitEthernet3/1/1.10] quit
# 配置与F市相连的GigabitEthernet 3/1/1.60接口的带宽为20M。
[RouterS1] interface GigabitEthernet 3/1/1.60
[RouterS1-GigabitEthernet3/1/1.60] qos lr outbound cir 20000
[RouterS1-GigabitEthernet3/1/1.60] quit
(2) 在外网出接口(三层以太网子接口)出方向上应用基于CBQ队列的QoS策略
# 将与A市之间匹配视频业务的流量入CBQ队列中的EF队列,保证带宽为10M。
[RouterS1] acl number 3000
[RouterS1-acl-adv-3000] rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255
[RouterS1-acl-adv-3000] quit
[RouterS1] traffic classifier video-A
[RouterS1-classifier-video-A] if-match acl 3000
[RouterS1-classifier-video-A] quit
[RouterS1] traffic behavior video-A
[RouterS1-behavior-video-A] queue ef bandwidth 10000
[RouterS1-behavior-video-A] quit
[RouterS1] qos policy policy-A
[RouterS1-qospolicy-policy-A] classifier video-A behavior video-A
[RouterS1-qospolicy-policy-A] quit
# 将与F市之间匹配视频业务的流量入CBQ队列中的EF队列,保证带宽为10M。
[RouterS1] acl number 3001
[RouterS1-acl-adv-3001] rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.7.0 0.0.0.255
[RouterS1-acl-adv-3001] quit
[RouterS1] traffic classifier video-F
[RouterS1-classifier-video-F] if-match acl 3001
[RouterS1-classifier-video-F] quit
[RouterS1] traffic behavior video-F
[RouterS1-behavior-video-F] queue ef bandwidth 10000
[RouterS1-behavior-video-F] quit
[RouterS1] qos policy policy-F
[RouterS1-qospolicy-policy-F] classifier video-F behavior video-F
[RouterS1-qospolicy-policy-F] quit
# 将与A市之间匹配生产业务的流量入CBQ队列中的AF队列,保证带宽为4M。
[RouterS1] acl number 3100
[RouterS1-acl-adv-3100] rule 0 permit ip source 10.2.1.0 0.0.0.255 destination 10.2.2.0 0.0.0.255
[RouterS1-acl-adv-3100] quit
[RouterS1] traffic classifier production-A
[RouterS1-classifier-production-A] if-match acl 3100
[RouterS1-classifier-production-A] quit
[RouterS1] traffic behavior production-A
[RouterS1-behavior-production-A] queue af bandwidth 4000
[RouterS1-behavior-production-A] quit
[RouterS1] qos policy policy-A
[RouterS1-qospolicy-policy-A] classifier production-A behavior production-A
[RouterS1-qospolicy-policy-A] quit
# 将与F市之间匹配生产业务的流量入CBQ队列中的AF队列,保证带宽为4M。
[RouterS1] acl number 3101
[RouterS1-acl-adv-3101] rule 0 permit ip source 10.2.1.0 0.0.0.255 destination 10.2.7.0 0.0.0.255
[RouterS1-acl-adv-3101] quit
[RouterS1] traffic classifier production-F
[RouterS1-classifier-production-F] if-match acl 3101
[RouterS1-classifier-production-F] quit
[RouterS1] traffic behavior production-F
[RouterS1-behavior-production-F] queue af bandwidth 4000
[RouterS1-behavior-production-F] quit
[RouterS1] qos policy policy-F
[RouterS1-qospolicy-policy-F] classifier production-F behavior production-F
[RouterS1-qospolicy-policy-F] quit
# 将QoS策略应用在三层以太网子接口的出方向。
[RouterS1] interface GigabitEthernet 3/1/1.10
[RouterS1-GigabitEthernet3/1/3.10] qos apply policy policy-A outbound
[RouterS1-GigabitEthernet3/1/3.10] quit
[RouterS1] interface GigabitEthernet 3/1/1.60
[RouterS1-GigabitEthernet3/1/3.60] qos apply policy policy-F outbound
[RouterS1-GigabitEthernet3/1/3.60] quit
(3) 在外网出接口(三层以太网子接口)入方向上配置包过滤防火墙
# 配置ACL规则3300匹配端口号为4443的非法报文。
[RouterS1] acl number 3300
[RouterS1-acl-adv-3300] rule 0 permit tcp destination-port eq 4443
[RouterS1-acl-adv-3300] quit
# 在三层以太网子接口的入方向上配置包过滤防火墙丢弃所匹配的报文。
[RouterS1] interface GigabitEthernet 3/1/1.10
[RouterS1-GigabitEthernet3/1/1.10] firewall packet-filter 3300 inbound
[RouterS1-GigabitEthernet3/1/1.10] quit
[RouterS1] interface GigabitEthernet 3/1/1.60
[RouterS1-GigabitEthernet3/1/1.60] firewall packet-filter 3300 inbound
[RouterS1-GigabitEthernet3/1/1.60] quit
Router A2、Router F1和Router F2的配置和Router A1的配置相似,此处仅以Router A1的配置为例。详细配置可参见配置文件。
(1) 在外网出接口(三层以太网子接口)出方向上配置接口限速功能
<RouterA1> system-view
[Router A1] interface GigabitEthernet 3/1/1.10
[RouterA1-GigabitEthernet3/1/1.10] qos lr outbound cir 20000
[RouterA1-GigabitEthernet3/1/1.10] quit
(2) 在外网出接口(三层以太网子接口)出方向上应用基于CBQ队列的QoS策略
# 将匹配视频业务的流量入CBQ队列中的EF队列,保证带宽为10M。
[RouterA1] acl number 3000
[RouterA1-acl-adv-3000] rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.0.0 0.0.0.255
[RouterA1-acl-adv-3000] quit
[RouterA1] traffic classifier video
[RouterA1-classifier-video] if-match acl 3000
[RouterA1-classifier-video] quit
[RouterA1] traffic behavior video
[RouterA1-behavior-video] queue ef bandwidth 10000
[RouterA1-behavior-video] quit
[RouterA1] qos policy policy1
[RouterA1-qospolicy-policy1] classifier video behavior video
[RouterA1-qospolicy-policy1] quit
# 将匹配生产业务的流量入CBQ队列中的AF队列,保证带宽为4M。
[RouterA1] acl number 3001
[RouterA1-acl-adv-3001] rule 0 permit ip source 10.2.1.0 0.0.0.255 destination 10.2.0.0 0.0.0.255
[RouterA1-acl-adv-3001] quit
[RouterA1] traffic classifier production
[RouterA1-classifier-production] if-match acl 3001
[RouterA1-classifier-production] quit
[RouterA1] traffic behavior production
[RouterA1-behavior-production] queue af bandwidth 4000
[RouterA1-behavior-production] quit
[RouterA1] qos policy policy1
[RouterA1-qospolicy-policy1] classifier production behavior production
[RouterA1-qospolicy-policy1] quit
# 将QoS策略应用在三层以太网子接口的出方向。
[RouterA1] interface GigabitEthernet 3/1/1.10
[RouterA1-GigabitEthernet3/1/3.10] qos apply policy policy1 outbound
[RouterA1-GigabitEthernet3/1/3.10] quit
(3) 在外网出接口(三层以太网子接口)入方向上配置包过滤防火墙
# 配置ACL规则3300匹配端口号为4443的非法报文。
[RouterA1] acl number 3300
[RouterA1-acl-adv-3300] rule 0 permit tcp destination-port eq 4443
[RouterA1-acl-adv-3300] quit
# 在三层以太网子接口的入方向上配置包过滤防火墙丢弃所匹配的报文。
[RouterA1] interface GigabitEthernet 3/1/1.10
[RouterA1-GigabitEthernet3/1/1.10] firewall packet-filter 3300 inbound
[RouterA1-GigabitEthernet3/1/1.10] quit
# 查看各路由器对应子接口上接口限速的配置信息。所有路由器上的配置显示方法相同,本处仅以Router S1为例。
[RouterS1] display qos lr interface GigabitEthernet 3/1/1.10
Interface: GigabitEthernet3/1/1.10
Direction: Outbound
CIR 20000 (kbps), CBS 1250000 (byte)
[RouterS1] display qos lr interface GigabitEthernet 3/1/1.60
Interface: GigabitEthernet3/1/1.60
Direction: Outbound
CIR 20000 (kbps), CBS 1250000 (byte)
# 查看业务流量出接口上的QoS策略的配置信息和运行情况。所有路由器上的配置显示方法相同,本处仅以Router S1为例。
[RouterS1] display qos policy interface GigabitEthernet 3/1/1.10
Interface: GigabitEthernet3/1/1.10
Direction: Outbound
Policy: policy-A
Classifier: video-A
Operator: AND
Rule(s) : If-match acl 3000
Behavior: video-A
Expedited Forwarding:
Bandwidth 10000 (kbps), CBS 250000 (Bytes)
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
Classifier: production-A
Operator: AND
Rule(s) : If-match acl 3100
Behavior: production-A
Assured Forwarding:
Bandwidth 4000 (kbps)
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
[RouterS1] display qos policy interface GigabitEthernet 3/1/1.60
Interface: GigabitEthernet3/1/1.60
Direction: Outbound
Policy: policy-F
Classifier: video-F
Operator: AND
Rule(s) : If-match acl 3001
Behavior: video-F
Expedited Forwarding:
Bandwidth 10000 (kbps), CBS 250000 (Bytes)
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
Classifier: production-F
Operator: AND
Rule(s) : If-match acl 3101
Behavior: production-F
Assured Forwarding:
Bandwidth 4000 (kbps)
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
# 查看业务流量出接口上的包过滤防火墙信息。所有路由器上的配置显示方法相同,本处仅以Router S1为例。
[RouterS1] display firewall packet-filter all
Interface: GigabitEthernet3/1/1.10
In-bound Policy:
acl 3300, Successful
Out-bound Policy:
Interface: GigabitEthernet3/1/1.60
In-bound Policy:
acl 3300, Successful
Out-bound Policy:
· Router S1
#
sysname RouterS1
#
acl number 3000
rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255
acl number 3001
rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.7.0 0.0.0.255
acl number 3100
rule 0 permit ip source 10.2.1.0 0.0.0.255 destination 10.2.2.0 0.0.0.255
acl number 3101
rule 0 permit ip source 10.2.1.0 0.0.0.255 destination 10.2.7.0 0.0.0.255
acl number 3300
rule 0 permit tcp destination-port eq 4443
#
traffic classifier video-F operator and
if-match acl 3001
traffic classifier production-A operator and
if-match acl 3100
traffic classifier production-F operator and
if-match acl 3101
traffic classifier video-A operator and
if-match acl 3000
#
traffic behavior video-F
queue ef bandwidth 10000 cbs 250000
traffic behavior production-A
queue af bandwidth 4000
traffic behavior production-F
queue af bandwidth 4000
traffic behavior video-A
queue ef bandwidth 10000 cbs 250000
#
qos policy policy-A
classifier video-A behavior video-A
classifier production-A behavior production-A
qos policy policy-F
classifier production-F behavior production-F
classifier video-F behavior video-F
#
interface GigabitEthernet3/1/1
port link-mode route
#
interface GigabitEthernet3/1/1.10
firewall packet-filter 3300 inbound
qos lr outbound cir 20000 cbs 1250000
qos apply policy policy-A outbound
#
interface GigabitEthernet3/1/1.60
firewall packet-filter 3300 inbound
qos lr outbound cir 20000 cbs 1250000
qos apply policy policy-F outbound
#
return
· Router S2
#
sysname RouterS2
#
acl number 3000
rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255
acl number 3001
rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.7.0 0.0.0.255
acl number 3100
rule 0 permit ip source 10.2.1.0 0.0.0.255 destination 10.2.2.0 0.0.0.255
acl number 3101
rule 0 permit ip source 10.2.1.0 0.0.0.255 destination 10.2.7.0 0.0.0.255
acl number 3300
rule 0 permit tcp destination-port eq 4443
#
traffic classifier video-F operator and
if-match acl 3001
traffic classifier production-A operator and
if-match acl 3100
traffic classifier production-F operator and
if-match acl 3101
traffic classifier video-A operator and
if-match acl 3000
#
traffic behavior video-F
queue ef bandwidth 10000 cbs 250000
traffic behavior production-A
queue af bandwidth 4000
traffic behavior production-F
queue af bandwidth 4000
traffic behavior video-A
queue ef bandwidth 10000 cbs 250000
#
qos policy policy-A
classifier video-A behavior video-A
classifier production-A behavior production-A
qos policy policy-F
classifier production-F behavior production-F
classifier video-F behavior video-F
#
interface GigabitEthernet3/1/1
port link-mode route
#
interface GigabitEthernet3/1/1.10
firewall packet-filter 3300 inbound
qos lr outbound cir 20000 cbs 1250000
qos apply policy policy-A outbound
#
interface GigabitEthernet3/1/1.60
firewall packet-filter 3300 inbound
qos lr outbound cir 20000 cbs 1250000
qos apply policy policy-F outbound
#
return
· Router A1
#
sysname RouterA1
#
acl number 3000
rule 0 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0 0.0.0.255
acl number 3100
rule 0 permit ip source 10.2.2.0 0.0.0.255 destination 10.2.1.0 0.0.0.255
acl number 3300
rule 0 permit tcp destination-port eq 4443
#
traffic classifier production operator and
if-match acl 3100
traffic classifier video operator and
if-match acl 3000
#
traffic behavior production
queue af bandwidth 4000
traffic behavior video
queue ef bandwidth 10000 cbs 250000
#
qos policy policy
classifier video behavior video
classifier production behavior production
#
interface GigabitEthernet3/1/1
port link-mode route
#
interface GigabitEthernet3/1/1.10
firewall packet-filter 3300 inbound
qos lr outbound cir 20000 cbs 1250000
qos apply policy policy-A outbound
#
return
· Router A2
#
sysname RouterA2
#
acl number 3000
rule 0 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0 0.0.0.255
acl number 3100
rule 0 permit ip source 10.2.2.0 0.0.0.255 destination 10.2.1.0 0.0.0.255
acl number 3300
rule 0 permit tcp destination-port eq 4443
#
traffic classifier production operator and
if-match acl 3100
traffic classifier video operator and
if-match acl 3000
#
traffic behavior production
queue af bandwidth 4000
traffic behavior video
queue ef bandwidth 10000 cbs 250000
#
qos policy policy
classifier video behavior video
classifier production behavior production
#
interface GigabitEthernet3/1/1
port link-mode route
#
interface GigabitEthernet3/1/1.10
firewall packet-filter 3300 inbound
qos lr outbound cir 20000 cbs 1250000
qos apply policy policy-A outbound
#
return
#
sysname RouterF1
#
acl number 3000
rule 0 permit ip source 10.1.7.0 0.0.0.255 destination 10.1.1.0 0.0.0.255
acl number 3100
rule 0 permit ip source 10.2.7.0 0.0.0.255 destination 10.2.1.0 0.0.0.255
acl number 3300
rule 0 permit tcp destination-port eq 4443
#
traffic classifier production operator and
if-match acl 3100
traffic classifier video operator and
if-match acl 3000
#
traffic behavior production
queue af bandwidth 4000
traffic behavior video
queue ef bandwidth 10000 cbs 250000
#
qos policy policy
classifier video behavior video
classifier production behavior production
#
interface GigabitEthernet3/1/1
port link-mode route
#
interface GigabitEthernet3/1/1.60
firewall packet-filter 3300 inbound
qos lr outbound cir 20000 cbs 1250000
qos apply policy policy-A outbound
#
return
· Router F2
#
sysname RouterF2
#
acl number 3000
rule 0 permit ip source 10.1.7.0 0.0.0.255 destination 10.1.1.0 0.0.0.255
acl number 3100
rule 0 permit ip source 10.2.7.0 0.0.0.255 destination 10.2.1.0 0.0.0.255
acl number 3300
rule 0 permit tcp destination-port eq 4443
#
traffic classifier production operator and
if-match acl 3100
traffic classifier video operator and
if-match acl 3000
#
traffic behavior production
queue af bandwidth 4000
traffic behavior video
queue ef bandwidth 10000 cbs 250000
#
qos policy policy
classifier video behavior video
classifier production behavior production
#
interface GigabitEthernet3/1/1
port link-mode route
#
interface GigabitEthernet3/1/1.60
firewall packet-filter 3300 inbound
qos lr outbound cir 20000 cbs 1250000
qos apply policy policy-A outbound
#
return
· 《H3C SR8800万兆核心路由器 ACL和QoS配置指导》中的“QoS”
· 《H3C SR8800万兆核心路由器 ACL和QoS命令参考》中的“QoS”
· 《H3C SR8800万兆核心路由器 安全配置指导》中的“包过滤防火墙”
· 《H3C SR8800万兆核心路由器 安全命令参考》中的“包过滤防火墙”
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!