QoS CBWFQ
基于类别的加权公平排队,通常使用ACL定义数据流类别,并将注入宽带和队列限制等参数应用于这些类别.
CBWFQ特点:
1)能够给不同的类保障一定的带宽
2)对传统的WFQ作了扩展支持用户自己定义流量的分类:
3)队列的个数和类别是一一对应,给每个class 保留带宽< BR>CBWFQ与WFQ的区别:
WFQ: 用户无法控制分类,由HASH算法自己决定
CBWFQ:让用户对流量自己来分类
WFQ 对正常流量 处理没问题,但是对语音流量显得”太公平”(语音要求低延迟)
CBWFQ:考虑到公平特性,并没有考虑到语音的应用
CBWFQ Configuration:
CBWFQ(config)#
CBWFQ(config)#class-map match-any CBWFQ1
CBWFQ(config-cmap)#match dscp6
CBWFQ(config-cmap)#match protocol http //两个条件,满足其中一个就可以匹配CBWFQ1//
CBWFQ(config-cmap)#exit
CBWFQ(config)#
CBWFQ(config)#class-map match-all CBWFQ2
CBWFQ(config-cmap)#match precedence 3
CBWFQ(config-cmap)#match protocol telnet //两个条件必须全部满足才能匹配CBWFQ2//
CBWFQ(config-cmap)#exit
CBWFQ(config)#
CBWFQ(config)#policy-map CBWFQ
CBWFQ(config-pmap)#class CBWFQ1 //调用class-map CBWFQ1//
CBWFQ(config-pmap-c)#bandwidth 60
CBWFQ(config-pmap)#
CBWFQ(config-pmap)#class CBWFQ2
CBWFQ(config-pmap-c)#bandwidth 30
CBWFQ(config)#
CBWFQ(config)#int s0/0
CBWFQ(config-if)#service-policy output CBWFQ  //CBWFQ只能在出方向上调用//
CBWFQ#
查看:
CBWFQ#
CBWFQ#show class-map
Class Map match-any class-default (id 0)
Match any
Class Map match-any CBWFQ1 (id 1)
Match dscp 6
Match protocol http
Class Map match-all CBWFQ2 (id 2)
Match precedence 3
CBWFQ#
CBWFQ#
CBWFQ#show policy-map
Policy Map CBWFQ
Class CBWFQ1
Bandwidth 60 (kbps) MaxThreshold 64 (packets)
Class CBWFQ2
Bandwidth 30 (kbps) Max Threshold 64 (packets)
CBWFQ#
CBWFQ#
CBWFQ(config)#
CBWFQ(config)#policy-map CBWFQ
CBWFQ(config-pmap)#class CBWFQ1
CBWFQ(config-pmap-c)#queue-limit 30 //定义每个队能存放的报文数量,超过后丢包方式:Tail drop//
CBWFQ#
CBWFQ#
CBWFQ#show policy-map
Policy Map CBWFQ
Class CBWFQ1
Bandwidth 60 (kbps) Max Threshold 30(packets)
Class CBWFQ2
Bandwidth 30 (kbps) Max Threshold 64 (packets)
CBWFQ#