33-流量监管典型配置举例
本章节下载: 33-流量监管典型配置举例 (393.69 KB)
H3C S6805&S6825&S6850&S9850&S9820 流量监管配置举例
Copyright © 2020-2023 新华三技术有限公司 版权所有,保留一切权利。
非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。
除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。
本文档中的信息可能变动,恕不另行通知。
目 录
本文档介绍了流量监管的配置举例。
流量监管就是对流量进行控制,通过监督进入网络的流量速率,对超出部分的流量进行“惩罚”,使进入的流量被限制在一个合理的范围之内,以保护网络资源和运营商的利益。
流量监管分为:聚合CAR和普通CAR。聚合CAR是指能够对多个端口上的业务流使用同一个CAR进行流量监管,即如果多个端口应用同一聚合CAR,则这些端口的流量之和必须在此聚合CAR设定的流量监管范围之内。普通CAR与聚合CAR不同,在端口上应用的普通CAR无法实现对多个端口的流量之和进行流量监管,不同端口上应用的普通CAR需要单独配置。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解流量监管特性。
如图1所示,某公司网络通过专线接入Internet,上行带宽为60Mbps,所有终端设备均以防火墙作为网关设备。现要求使用流量监管功能,对上行至Internet的流量进行分类限速:
· HTTP流量:总上行限速为40Mbps,其中研发部25台主机分配15Mbps上行带宽;市场部40台主机分配25Mbps上行带宽。
· 邮件服务器代理所有客户端向外网发送电子邮件,限制上行带宽为2Mbps。
· 远端分支机构可以通过Internet访问FTP服务器,限制上行的FTP的数据流量不超过10Mbps。
图1 基于IP地址和协议类型进行流量监管配置组网图
要实现对不同特征数据流的流量监管,主要是明确匹配各业务数据的类规则。在本例中,需要使用ACL来匹配各种协议或来源的IP报文,并将这些分类规则与不同的流量监管动作进行绑定,即可实现对不同特征的数据进行不同的速率限制。
产品 |
软件版本 |
S6805系列 |
Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S6825系列 |
Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S6850系列 S9850系列 |
Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S9820-64H |
Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S9820-8C |
Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
在一个流行为中,流量监管动作不能与重标记优先级(包括本地优先级、丢弃优先级、802.1p优先级、DSCP优先级、IP优先级)的动作同时配置,否则会导致该流行为不能被正常应用。
(1) 配置对研发部HTTP上行流量的限制
# 创建高级IPv4 ACL 3000,匹配研发部发送的HTTP流量(目的TCP端口80)。
<Device> system-view
[Device] acl advanced 3000
[Device-acl-ipv4-adv-3000] rule permit tcp destination-port eq 80 source 192.168.1.0 0.0.0.255
[Device-acl-ipv4-adv-3000] quit
# 创建类rd_http,匹配规则为IPv4 ACL 3000。
[Device] traffic classifier rd_http
[Device-classifier-rd_http] if-match acl 3000
[Device-classifier-rd_http] quit
# 创建流行为rd_http,动作为流量监管,承诺速率15Mbps。
[Device] traffic behavior rd_http
[Device-behavior-rd_http] car cir 15360
[Device-behavior-rd_http] quit
# 创建QoS策略rd_http。
[Device] qos policy rd_http
[Device-qospolicy-rd_http] classifier rd_http behavior rd_http
[Device-qospolicy-rd_http] quit
# 将策略应用到HundredGigE1/0/3端口的入方向。
[Device] interface hundredgige 1/0/3
[Device-HundredGigE1/0/3] qos apply policy rd_http inbound
[Device-HundredGigE1/0/3] quit
(2) 配置对市场部HTTP上行流量的限制
# 创建高级IPv4 ACL3001,匹配市场部发送的HTTP流量。
[Device] acl advanced 3001
[Device-acl-ipv4-adv-3001] rule permit tcp destination-port eq 80 source 192.168.2.0 0.0.0.255
[Device-acl-ipv4-adv-3001] quit
# 创建类mkt_http,匹配规则为IPv4 ACL 3001。
[Device] traffic classifier mkt_http
[Device-classifier-mkt_http] if-match acl 3001
[Device-classifier-mkt_http] quit
# 创建流行为mkt_http,动作为流量监管,承诺速率为25Mbps。
[Device] traffic behavior mkt_http
[Device-behavior-mkt_http] car cir 25600
[Device-behavior-mkt_http] quit
# 创建QoS策略mkt_http。
[Device] qos policy mkt_http
[Device-qospolicy-mkt_http] classifier mkt_http behavior mkt_http
[Device-qospolicy-mkt_http] quit
# 将策略应用到HundredGigE1/0/4端口的入方向。
[Device] interface hundredgige 1/0/4
[Device-HundredGigE1/0/4] qos apply policy mkt_http inbound
[Device-HundredGigE1/0/4] quit
(3) 配置对邮件服务器发送电子邮件流量的限制
# 创建高级IPv4 ACL 3002,匹配邮件服务器向外发送邮件的数据。
[Device] acl advanced 3002
[Device-acl-ipv4-adv-3002] rule permit tcp destination-port eq smtp source 192.168.10.1 0.0.0.0
[Device-acl-ipv4-adv-3002] quit
# 创建类email,匹配规则为IPv4 ACL 3002。
[Device] traffic classifier email
[Device-classifier-email] if-match acl 3002
[Device-classifier-email] quit
# 创建流行为email,动作为流量监管,承诺速率为2Mbps。
[Device] traffic behavior email
[Device-behavior-email] car cir 2048
[Device-behavior-email] quit
# 创建QoS策略email&ftp。
[Device] qos policy email&ftp
[Device-qospolicy-email&ftp] classifier email behavior email
[Device-qospolicy-email&ftp] quit
(4) 配置对分支机构的FTP流量的限制
# 创建基本IPv4 ACL 2001,匹配FTP服务器发送的报文。
[Device] acl basic 2001
[Device-acl-ipv4-basic-2001] rule permit source 192.168.10.2 0.0.0.0
[Device-acl-ipv4-basic-2001] quit
# 创建类ftp,匹配规则为IPv4 ACL 2001。
[Device] traffic classifier ftp
[Device-classifier-ftp] if-match acl 2001
[Device-classifier-ftp] quit
# 创建流行为ftp,动作为流量监管,承诺速率为10Mbps。
[Device] traffic behavior ftp
[Device-behavior-ftp] car cir 10240
[Device-behavior-ftp] quit
# 在QoS策略email&ftp中为类ftp指定流行为ftp。
[Device] qos policy email&ftp
[Device-qospolicy-email&ftp] classifier ftp behavior ftp
[Device-qospolicy-email&ftp] quit
# 将策略应用到HundredGigE1/0/2端口的入方向。
[Device] interface hundredgige 1/0/2
[Device-HundredGigE1/0/2] qos apply policy email&ftp inbound
[Device-HundredGigE1/0/2] quit
# 执行display qos policy interface命令查看端口上QoS策略的应用状态。
[Device] display qos policy interface
Interface: HundredGigE1/0/2
Direction: Inbound
Policy: email&ftp
Classifier: email
Operator: AND
Rule(s) :
If-match acl 3002
Behavior: email
Committed Access Rate:
CIR 2048 (kbps), CBS 128000 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
Classifier: ftp
Operator: AND
Rule(s) :
If-match acl 2001
Behavior: ftp
Committed Access Rate:
CIR 10240 (kbps), CBS 640000 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
Interface: HundredGigE1/0/3
Direction: Inbound
Policy: rd_http
Classifier: rd_http
Operator: AND
Rule(s) :
If-match acl 3000
Behavior: rd_http
Committed Access Rate:
CIR 15360 (kbps), CBS 960000 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
Interface: HundredGigE1/0/4
Direction: Inbound
Policy: mkt_http
Classifier: mkt_http
Operator: AND
Rule(s) :
If-match acl 3001
Behavior: mkt_http
Committed Access Rate:
CIR 25600 (kbps), CBS 1600000 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
#
traffic classifier email operator and
if-match acl 3002
#
traffic classifier ftp operator and
if-match acl 2001
#
traffic classifier mkt_http operator and
if-match acl 3001
#
traffic classifier rd_http operator and
if-match acl 3000
#
traffic behavior email
car cir 2048 cbs 128000 ebs 0 green pass red discard yellow pass
#
traffic behavior ftp
car cir 10240 cbs 640000 ebs 0 green pass red discard yellow pass
#
traffic behavior mkt_http
car cir 25600 cbs 1600000 ebs 0 green pass red discard yellow pass
#
traffic behavior rd_http
car cir 15360 cbs 960000 ebs 0 green pass red discard yellow pass
#
qos policy email&ftp
classifier email behavior email
classifier ftp behavior ftp
#
qos policy mkt_http
classifier mkt_http behavior mkt_http
#
qos policy rd_http
classifier rd_http behavior rd_http
#
interface HundredGigE1/0/2
port link-mode bridge
qos apply policy email&ftp inbound
#
interface HundredGigE1/0/3
port link-mode bridge
qos apply policy rd_http inbound
#
interface HundredGigE1/0/4
port link-mode bridge
qos apply policy mkt_http inbound
#
acl basic 2001
rule 0 permit source 192.168.10.2 0
#
acl advanced 3000
rule 0 permit tcp source 192.168.1.0 0.0.0.255 destination-port eq www
#
acl advanced 3001
rule 0 permit tcp source 192.168.2.0 0.0.0.255 destination-port eq www
#
acl advanced 3002
rule 0 permit tcp source 192.168.10.1 0 destination-port eq smtp
如图2所示,某公司各分支机构通过交换机将数据上行至Device,再由Device通过专线将数据传输至公司骨干网。
各分支机构内通过VLAN来标识不同的业务数据,在Device的HundredGigE1/0/1和HundredGigE1/0/2端口上配置了1:1 VLAN Mapping功能,按图中所示对业务VLAN进行了重新映射,以满足骨干网中的传输策略要求。
根据线路带宽状况,现要求使用流量监管功能,实现对不同业务类型的数据进行如下的带宽分配:
· 在Device连接分支机构A和分支机构B的链路上,要求对上行至Device的各业务数据速率分别限制为:VLAN1001为400Mbps,VLAN1002为200Mbps,VLAN1003为200Mbps。对Device下行方向的业务数据同样根据以上数值进行限速。
· 在Device连接分支机构C的链路上,要求对上行至Device的各业务数据速率分别限制为:VLAN201为400Mbps,VLAN202为200Mbps,VLAN203为200Mbps。对Device下行方向的业务数据同样根据以上数值进行限速。
· 在Device连接公司骨干网的联路上,要求对上行至骨干网的各业务数据限速为:VLAN201为100Mbps,VLAN202为60Mbps,VLAN203为40Mbps。对下行方向数据同样根据以上数值进行限速。
图2 基于VLAN的带宽分配配置组网图
为实现基于VLAN的带宽分配,需要将QoS策略中流分类匹配规则定义为匹配指定的VLAN,同时创建动作为流量监管的流行为,并将二者进行配对关联。通过创建多个这样的配对关系并将对应的QoS策略进行应用,便可以对不同VLAN的数据进行不同的速率限制,达到带宽分配的效果。
表2 适用产品及版本
产品 |
软件版本 |
S6805系列 |
Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S6825系列 |
Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S6850系列 S9850系列 |
Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S9820-64H |
Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S9820-8C |
Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
在一个流行为中,流量监管动作不能与重标记优先级(包括本地优先级、丢弃优先级、802.1p优先级、DSCP优先级、IP优先级)的动作同时配置,否则会导致该流行为不能被正常应用。
# 配置端口HundredGigE1/0/1和HundredGigE1/0/2为Trunk端口,允许VLAN1001、VLAN1002、VLAN1003、VLAN201、VLAN202、VLAN203通过,取消允许VLAN1通过,并配置1:1 VLAN Mapping。
<Device> system-view
[Device] interface hundredgige 1/0/1
[Device-HundredGigE1/0/1] port link-type trunk
[Device-HundredGigE1/0/1] port trunk permit vlan 1001 to 1003 201 to 203
[Device-HundredGigE1/0/1] undo port trunk permit vlan 1
[Device-HundredGigE1/0/1] vlan mapping 1001 translated-vlan 201
[Device-HundredGigE1/0/1] vlan mapping 1002 translated-vlan 202
[Device-HundredGigE1/0/1] vlan mapping 1003 translated-vlan 203
[Device-HundredGigE1/0/1] quit
[Device] interface hundredgige 1/0/2
[Device-HundredGigE1/0/2] port link-type trunk
[Device-HundredGigE1/0/2] port trunk permit vlan 1001 to 1003 201 to 203
[Device-HundredGigE1/0/2] undo port trunk permit vlan 1
[Device-HundredGigE1/0/2] vlan mapping 1001 translated-vlan 201
[Device-HundredGigE1/0/2] vlan mapping 1002 translated-vlan 202
[Device-HundredGigE1/0/2] vlan mapping 1003 translated-vlan 203
[Device-HundredGigE1/0/2] quit
# 配置端口HundredGigE1/0/3和HundredGigE1/0/10为Trunk端口,并允许VLAN201、VLAN202、VLAN203通过,取消允许VLAN1通过。
[Device] interface hundredgige 1/0/3
[Device-HundredGigE1/0/3] port link-type trunk
[Device-HundredGigE1/0/3] port trunk permit vlan 201 to 203
[Device-HundredGigE1/0/3] undo port trunk permit vlan 1
[Device-HundredGigE1/0/3] quit
[Device] interface hundredgige 1/0/10
[Device-HundredGigE1/0/10] port link-type trunk
[Device-HundredGigE1/0/10] port trunk permit vlan 201 to 203
[Device-HundredGigE1/0/10] undo port trunk permit vlan 1
[Device-HundredGigE1/0/10] quit
(1) 对接收和发送分支机构A、B、C的报文进行流量监管。
# 创建流分类vlan201,匹配规则为匹配customer-vlan-id为201。
[Device] traffic classifier vlan201
[Device-classifier-vlan201] if-match customer-vlan-id 201
[Device-classifier-vlan201] quit
# 创建流分类vlan202,匹配规则为匹配customer-vlan-id为202。
[Device] traffic classifier vlan202
[Device-classifier-vlan202] if-match customer-vlan-id 202
[Device-classifier-vlan202] quit
# 创建流分类vlan203,匹配规则为匹配customer-vlan-id为203。
[Device] traffic classifier vlan203
[Device-classifier-vlan203] if-match customer-vlan-id 203
[Device-classifier-vlan203] quit
# 创建流行为car400,并配置流量监管的动作,承诺速率为400Mbps。
[Device] traffic behavior car400
[Device-behavior-car400] car cir 409600
[Device-behavior-car400] quit
# 创建流行为car200,并配置流量监管的动作,承诺速率为200Mbps。
[Device] traffic behavior car200
[Device-behavior-car200] car cir 204800
[Device-behavior-car200] quit
# 创建QoS策略ABCupdown,并将流分类与流行为进行配对。
[Device] qos policy ABCupdown
[Device-qospolicy-ABCupdown] classifier vlan201 behavior car400
[Device-qospolicy-ABCupdown] classifier vlan202 behavior car200
[Device-qospolicy-ABCupdown] classifier vlan203 behavior car200
[Device-qospolicy-ABCupdown] quit
# 在端口HundredGigE1/0/1、HundredGigE1/0/2和HundredGigE1/0/3的入方向和出方向分别应用QoS策略ABCupdown。
[Device] interface hundredgige 1/0/1
[Device-HundredGigE1/0/1] qos apply policy ABCupdown inbound
[Device-HundredGigE1/0/1] qos apply policy ABCupdown outbound
[Device-HundredGigE1/0/1] quit
[Device] interface hundredgige 1/0/2
[Device-HundredGigE1/0/2] qos apply policy ABCupdown inbound
[Device-HundredGigE1/0/2] qos apply policy ABCupdown outbound
[Device-HundredGigE1/0/2] quit
[Device] interface hundredgige 1/0/3
[Device-HundredGigE1/0/3] qos apply policy ABCupdown inbound
[Device-HundredGigE1/0/3] qos apply policy ABCupdown outbound
[Device-HundredGigE1/0/3] quit
(2) 对接收和发送公司骨干网的报文进行流量监管。
# 创建流行为car100,并配置流量监管的动作,承诺速率为100Mbps。
[Device] traffic behavior car100
[Device-behavior-car100] car cir 102400
[Device-behavior-car100] quit
# 创建流行为car60,并配置流量监管的动作,承诺速率为60Mbps。
[Device] traffic behavior car60
[Device-behavior-car60] car cir 61440
[Device-behavior-car60] quit
# 创建流行为car40,并配置流量监管的动作,承诺速率为40Mbps。
[Device] traffic behavior car40
[Device-behavior-car40] car cir 40960
[Device-behavior-car40] quit
# 创建QoS策略ABCupdown,并将流分类与流行为进行配对。
[Device] qos policy BONEupdown
[Device-qospolicy-BONEupdown] classifier vlan201 behavior car100
[Device-qospolicy-BONEupdown] classifier vlan202 behavior car60
[Device-qospolicy-BONEupdown] classifier vlan203 behavior car40
[Device-qospolicy-BONEupdown] quit
# 在端口GigabitEthernet1/0/10的入方向和出方向分别应用QoS策略BONEupdown。
[Device] interface hundredgige 1/0/10
[Device-HundredGigE1/0/10] qos apply policy BONEupdown inbound
[Device-HundredGigE1/0/10] qos apply policy BONEupdown outbound
[Device-HundredGigE1/0/10] quit
在处理由分支机构上行至骨干网的报文时,交换机将按下图顺序执行动作。
图3 上行方向报文处理流程示意图(以VLAN1001为例)
在处理在由骨干网下行至分支机构的报文时,交换机将按下图顺序执行动作。
图4 下行方向报文处理流程示意图(以VLAN201为例)
# 执行display qos policy interface命令查看端口上QoS策略的应用状态。此处以HundredGigE1/0/10为例。
[Device] display qos policy interface hundredgige 1/0/10
Interface: HundredGigE1/0/10
Direction: Inbound
Policy: BONEupdown
Classifier: vlan201
Operator: AND
Rule(s) :
If-match customer-vlan-id 201
Behavior: car100
Committed Access Rate:
CIR 102400 (kbps), CBS 6400000 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
Classifier: vlan202
Operator: AND
Rule(s) :
If-match customer-vlan-id 202
Behavior: car60
Committed Access Rate:
CIR 61440 (kbps), CBS 3840000 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
Classifier: vlan203
Operator: AND
Rule(s) :
If-match customer-vlan-id 203
Behavior: car40
Committed Access Rate:
CIR 40960 (kbps), CBS 2560000 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
Interface: HundredGigE1/0/10
Direction: Outbound
Policy: BONEupdown
Classifier: vlan201
Operator: AND
Rule(s) :
If-match customer-vlan-id 201
Behavior: car100
Committed Access Rate:
CIR 102400 (kbps), CBS 6400000 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
Classifier: vlan202
Operator: AND
Rule(s) :
If-match customer-vlan-id 202
Behavior: car60
Committed Access Rate:
CIR 61440 (kbps), CBS 3840000 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
Classifier: vlan203
Operator: AND
Rule(s) :
If-match customer-vlan-id 203
Behavior: car40
Committed Access Rate:
CIR 40960 (kbps), CBS 2560000 (Bytes), EBS 0 (Bytes)
Green action : pass
Yellow action : pass
Red action : discard
Green packets : 0 (Packets)
Red packets : 0 (Packets)
#
traffic classifier vlan201 operator and
if-match customer-vlan-id 201
#
traffic classifier vlan202 operator and
if-match customer-vlan-id 202
#
traffic classifier vlan203 operator and
if-match customer-vlan-id 203
#
traffic behavior car40
car cir 40960 cbs 2560000 ebs 0 green pass red discard yellow pass
#
traffic behavior car60
car cir 61440 cbs 3840000 ebs 0 green pass red discard yellow pass
#
traffic behavior car100
car cir 102400 cbs 6400000 ebs 0 green pass red discard yellow pass
#
traffic behavior car200
car cir 204800 cbs 12800000 ebs 0 green pass red discard yellow pass
#
traffic behavior car400
car cir 409600 cbs 25600000 ebs 0 green pass red discard yellow pass
#
qos policy ABCupdown
classifier vlan201 behavior car400
classifier vlan202 behavior car200
classifier vlan203 behavior car200
#
qos policy BONEupdown
classifier vlan201 behavior car100
classifier vlan202 behavior car60
classifier vlan203 behavior car40
#
interface HundredGigE1/0/10
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 201 to 203
qos apply policy BONEupdown inbound
qos apply policy BONEupdown outbound
#
interface HundredGigE1/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 201 to 203 1001 to 1003
vlan mapping 1001 translated-vlan 201
vlan mapping 1002 translated-vlan 202
vlan mapping 1003 translated-vlan 203
qos apply policy ABCupdown inbound
qos apply policy ABCupdown outbound
#
interface HundredGigE1/0/2
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 201 to 203 1001 to 1003
vlan mapping 1001 translated-vlan 201
vlan mapping 1002 translated-vlan 202
vlan mapping 1003 translated-vlan 203
qos apply policy ABCupdown inbound
qos apply policy ABCupdown outbound
#
interface HundredGigE1/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 201 to 203
qos apply policy ABCupdown inbound
qos apply policy ABCupdown outbound
#
图5 聚合CAR配置组网示意图
现有组网如图5所示,要求通过配置聚合CAR功能,对端口HundredGigE1/0/1接收的VLAN10和VLAN100的报文流量之和进行限制,限制速率为200M,对超出流量限制的报文采取丢弃策略。
表3 适用产品及版本
产品 |
软件版本 |
S6805系列 |
Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S6825系列 |
Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S6850系列 S9850系列 |
Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S9820-64H |
Release 6555P01版本、Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
S9820-8C |
Release 6607版本、Release 6616版本、Release 6616P01版本、Release 6635及以上版本 |
在一个流行为中,引用聚合CAR的动作不能与重标记优先级(包括本地优先级、丢弃优先级、802.1p优先级、DSCP优先级、IP优先级)的动作同时配置,否则会导致该流行为不能被正常应用。
在执行以下配置步骤前,请先配置接入层设备为VLAN10和VLAN100的流量添加VLAN标签,并上行发送至设备Device。
# 配置端口HundredGigE1/0/1为Trunk端口,允许VLAN10和VLAN100通过,取消允许VLAN1通过。
<Device> system-view
[Device] interface hundredgige 1/0/1
[Device-HundredGigE1/0/1] port link-type trunk
[Device-HundredGigE1/0/1] port trunk permit vlan 10 100
[Device-HundredGigE1/0/1] undo port trunk permit vlan 1
[Device-HundredGigE1/0/1] quit
# 按流量限制需求配置聚合CAR。
[Device] qos car aggcar-1 aggregative cir 204800
# 配置流分类和流行为,对VLAN10的报文采用聚合CAR的限速配置。
[Device] traffic classifier 1
[Device-classifier-1] if-match service-vlan-id 10
[Device-classifier-1] quit
[Device] traffic behavior 1
[Device-behavior-1] car name aggcar-1
[Device-behavior-1] quit
# 配置流分类和流行为,对VLAN100的报文采用聚合CAR的限速配置。
[Device] traffic classifier 2
[Device-classifier-2] if-match service-vlan-id 100
[Device-classifier-2] quit
[Device] traffic behavior 2
[Device-behavior-2] car name aggcar-1
[Device-behavior-2] quit
# 配置QoS策略car,将流分类与流行为进行绑定。
[Device] qos policy car
[Device-qospolicy-car] classifier 1 behavior 1
[Device-qospolicy-car] classifier 2 behavior 2
[Device-qospolicy-car] quit
# 将QoS策略car应用到端口HundredGigE1/0/1的入方向。
[Device] interface hundredgige 1/0/1
[Device-HundredGigE1/0/1] qos apply policy car inbound
# 执行display qos policy interface命令查看端口上QoS策略的应用状态。此处以HundredGigE1/0/1为例。
[Device]display qos policy interface hundredgige 1/0/1
Interface: HundredGigE1/0/1
Direction: Inbound
Policy: car
Classifier: 1
Operator: AND
Rule(s) :
If-match service-vlan-id 10
Behavior: 1
Committed Access Rate:
Car name: aggcar-1
Classifier: 2
Operator: AND
Rule(s) :
If-match service-vlan-id 100
Behavior: 2
Committed Access Rate:
Car name: aggcar-1
#
qos car aggcar-1 aggregative cir 204800 cbs 12800000 ebs 0 green pass yellow pass red discard
#
traffic classifier 1 operator and
if-match service-vlan-id 10
traffic classifier 2 operator and
if-match service-vlan-id 100
#
traffic behavior 1
car name aggcar-1
traffic behavior 2
car name aggcar-1
#
qos policy car
classifier 1 behavior 1
classifier 2 behavior 2
#
interface HundredGigE1/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10 100
qos apply policy car inbound
请参考对应产品和版本的如下手册:
· ACL和QoS配置指导
· ACL和QoS命令参考
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!