最小带宽保证配置举例。

该例体现了当使用CBWFQ 算法时,系统是如何保证QoS Profile 中不同class 的带宽的。在例2 中,已经将HTTP 流量标记为af11,将P2P 流量标记为cs7。该例将基于分类与标记举例[Hillstone SA QoS分类与标记举例] 的分类和标记结果进行配置。

第一步:配置名为af11 和cs7 的class:
hostname(config)# class-map af11
hostname(config-class-map)# match dscp af11
hostname(config-class-map)# exit
hostname(config)# class-map cs7
hostname(config-class-map)# match dscp cs7
hostname(config-class-map)# exit
hostname(config)#

第二步:创建名为qos-profile1 的QoS Profile,为af11 和cs7 两个class 配置最小带宽值。
hostname(config)# qos-profile qos-profile1
hostname(config-qos-profile)# class af11
hostname(config-qos-prof-cmap)# bandwidth 5000
hostname(config-qos-prof-cmap)# exit
hostname(config-qos-profile)# class cs7
hostname(config-qos-prof-cmap)# bandwidth 2500
hostname(config-qos-prof-cmap)# exit
hostname(config-qos-profile)# exit
hostname(config)#

第三步:配置ethernet0/2 的上行带宽,并且将policy1 绑定到接口ethernet0/2:
hostname(config)# interface ethernet0/2
hostname(config-if-eth0/2)# bandwidth upstream 10000000
hostname(config-if-eth0/2)# qos-profile output qos-profile1
hostname(config-if-eth0/2)# exit
hostname(config)#

如果ethernet0/2 的上行带宽为10M,完成以上配置后,class-default 将会获得2.5M(10-5-2.5)的带宽,并且class-default 的默认队列也是CBWFQ。使用以上配置处理流量时,如果到达class1 的实际流量为20M,到达class2的实际流量为15M,而class-default 没有流量,设备在处理时,会将class-default的2.5M 带宽按照比例分配给class1 和class2 使用。分配的计算方法为:

♦ calss1 能够分得的带宽:5+(5/(5+2.5)*2.5)=6.67M
♦ class2 能够分得的带宽:2.5+(2.5/(5+2.5)*2.5)=3.33M

原创文章如转载,请注明:
转载自醉生梦死的博客
原文地址:http://www.liusuping.com/post/hillstone-qos-daikuanbaozheng.html