RouterOS winbox限速详解limit-at,max-limit,burst limit
ROS常用脚本命令有哪些

2011、8、9 2011、5、28
2012、5、16 2012、2、5 女 3.2kg 顺产 40w 38w 男 3.45kg 剖腹产
流出 流出 15149525369 13848545068
2010、9、20 2011、6、27 2011、6、27 2011、1、14 2011、10、21 2011、10、7
Hale Waihona Puke 女 3.15kg 3.0kg 2.5kg 3.7kg 3.4kg 3.1kg
3.8kg 剖腹产 40w+1
女 3.85kg
40w+2 2011、8、11转出
2010、10、11 2011、7、18 2011、7、14 2010、10、27 2011、7、4 2010、10、27 2011、7、4 2010、10、18 2011、7、25 2010、10、31 2011、8、7 2010、11、23 2011、9、1 2011、3、22 2011、12、29 2011、5、29 2012、3、6
3.3kg 剖腹产 39w+3
女 3.10kg 男 3.55kg
2010、10、13 2011、7、20 2011、7、20
3.3kg 剖腹产 41w+4 3.8kg 剖腹产
托那娃斯琴 29岁
张波 陈蓉 黄玉 刘春艳
26岁 19岁 23岁 24岁
弘丰锆业 三垧梁 弘丰锆业 三垧梁
G1P0 G1P0 G1P0 G1P0
孕产妇登记本
姓名 郝巧花 张瑞芳 崔霞 尚娜 高蕊 白艳霞 何爱梅 李小蓉 何艳 马玲 蔺玉芬 田二芬 卢明英 乌日娜 王丽红 乌兰图雅 格鲁 刘玉霞 年龄 36岁 25岁 24岁 23岁 29岁 29岁 28岁 19岁 25岁 31岁 25岁 41岁 20岁 28岁 23岁 29岁 41岁 32岁 家庭住址 草原村 草原村焦家圪卜 草原村焦家圪卜 草原村秦油坊 草原村三座塔 草原村 二贵壕兴忠砖厂 三垧梁陶尔斯 草原村 草原村 三垧梁工厂 草原村三座塔 三垧梁 草原村园子塔拉 草原村释尼召 草原村三垧梁 草原村三座塔 草原村三座塔 草原村秦油坊 孕产次 G2P1 G1P0 G1P0 G1P0 G2P1 G1P0 G1P0 G1P0 G3P2 G3P2 G2P1 G3P2 G2P0 G3P2 G1P0 G3P2 G2P1 G2P1 G2P1 末次月经 预产期 分娩日期 性别 体重 分娩方式 孕周 3.2Kg 顺产 40w 40w 40w 40w 40w+1 40w 40w 40w+6 40w-3 41w+2 41w+3 40w 40w 女 男 男 女 女 男 男 男 女 女 男 3.2Kg 剖腹产 305kg 剖腹产 3.6kg 剖腹产 顺产 顺产 顺产 顺产 顺产 顺产 顺产 顺产 顺产 联系电话 13214855313 15344022110 15947736573 13848799528 13451377829 15134873730 13530230784转出 2011、7、12转出 2011、8、2转出 15047743485 13134888165 15247391163 15134806061 15847474774 15924504880 13214855313 2010、1、13 2010、10、27 2010、10、27 男 2009、12、20 2010、10、4 2010、10、4 2010、6、21 2011、3、5 2011、3、5 2010、3、2 2010、12、16 2010、12、16 女 2010、7、13 2011、4、27 2011、4、28 2010、8、16 2011、5、30 2011、5、29 2010、9、2 2010、7、26 2010、7、25 2011、6、9 2011、5、3 2011、5、2 2011、6、9 2011、5、5 2011、5、8 2011、7、1 2011、7、13 2011、8、5 2011、8、18 2011、9、1 2010、7、18 2011、4、25 2011、4、25
网吧用ROS最正确的限速

网吧用ROS最正确的限速网吧用简单队列做限速完全是扯蛋。
网吧限速最好的办法应该是带宽均分,然后在用简单队列来限制上传。
在利用小包优先来处理游戏卡的问题。
经过2个网吧,一个月的测试,完全摆脱了到处喊卡的噩梦,现在把经验发来大家分享一下。
ROS不要用简单队列来限速,什么智能动态限速也不要用。
只需要用小包优先+带宽均分+简单队列限制上传速度。
小包优先的脚本如下:1./ ip firewall mangle2.add chain=forward protocol=tcp tcp-flags=syn action=change-mss new-mss=1440 comment="" disabled=no3.add chain=forward p2p=all-p2p action=mark-connection new-connection-mark=p2p_conn passthrough=yes comment="" disabled=no4.add chain=forward connection-mark=p2p_conn action=mark-packet new-packet-mark=p2p passthrough=yes comment="" disabled=no5.add chain=forward connection-mark=!p2p_conn action=mark-packet new-packet-mark=general passthrough=yes comment=""6.7.disabled=no8.add chain=forward packet-size=32-512 action=mark-packet new-packet-mark=all passthrough=yes comment="" disabled=no9.add chain=forward packet-size=512-1200 action=mark-packet new-packet-mark=big passthrough=yes comment=""disabled=no10.11.12./ queue tree13.add name="p2p1" parent=wan packet-mark=p2p limit-at=2000000 queue=default priority=8 max-limit=6000000 burst-limit=014.15.burst-threshold=0 burst-time=0s disabled=no16.add name="p2p2" parent=lan packet-mark=p2p limit-at=2000000 queue=default priority=8 max-limit=6000000 burst-limit=017.18.burst-threshold=0 burst-time=0s disabled=no19.add name="ClassA" parent=lan packet-mark="" limit-at=0 queue=default priority=8 max-limit=100000000 burst-limit=0 burst-20.21.threshold=0 burst-time=0s disabled=no22.add name="ClassB" parent=ClassA packet-mark="" limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0 burst-23.24.threshold=0 burst-time=0s disabled=no25.add name="Leaf1" parent=ClassA packet-mark=general limit-at=0 queue=default priority=7 max-limit=0 burst-limit=0 burst-26.27.threshold=0 burst-time=0s disabled=no28.add name="Leaf2" parent=ClassB packet-mark=alllimit-at=0 queue=default priority=5 max-limit=0 burst-limit=0 burst-29.30.threshold=0 burst-time=0s disabled=no31.add name="Leaf3" parent=ClassB packet-mark=big limit-at=0 queue=default priority=6 max-limit=0 burst-limit=0 burst-32.33.threshold=0 burst-time=0s disabled=no复制代码然后是带宽均分:1./ ip firewall mangle add chain=forward src-address=192.168.0.0/24 \2.action=mark-connection new-connection-mark=users-con3./ip firewall mangle add connection-mark=users-con action=mark-packet \4.new-packet-mark=users chain=forward5./queue type add name=pcq-download kind=pcq pcq-classifier=dst-address6./queue type add name=pcq-upload kind=pcq pcq-classifier=src-address7./queue tree add name=Download parent=lan max-limit=10M8./queue tree add parent=Download queue=pcq-download packet-mark=users9./queue tree add name=Upload parent=wan max-limit=9M10./queue tree add parent=Upload queue=pcq-upload packet-mark=users复制代码请根据直接实际修改IP地址段,下载最大速度,上传最大速度,lan为我连接内网的网卡,wan是我连接外网的网卡限制上传速度的脚本:1.:for aaa from 5 to 253 do={/queue simple add name=(yp . $aaa) dst-address=(192.168.0. . $aaa) limit-at=10000000/30000002.3.max-limit=10000000/3000000}复制代码如果是3.2版本的,这个脚本自己要修改下,就用这3个部分,别的不需要的,绝对比什么智能动态限速好的多.。
ros软路由防火墙规则

ros软路由防火墙规则routeros防火墙功能非常灵活。
routeros防火墙属于包过滤防火墙,你可以定义一系列的规则过滤掉发往routeros、从routeros 发出、通过routeros转发的数据包。
在routeros防火墙中定义了三个防火墙(过滤)链(即input、forward、output),你可以在这三个链当中定义你自己的规则。
input意思是指发往routeros自己的数据(也就是目的ip是routeros接口中的一个ip地址);output意思是指从routeros发出去的数据(也就是数据包源ip 是routeros接口中的一个ip地址);forward意思是指通过routeros转发的(比如你内部计算机访问外部网络,数据需要通过你的routeros进行转发出去)。
禁止ping routeros,我们一般需要在input链中添加规则,因为数据包是发给routeros的,数据包的目标ip是routeros的一个接口ip地址。
(当然如果你硬是要在output里建立一条规则过滤掉icmp 信息也能做到ping不通,当你ping的数据包到达routeos 时,routeos能接收这个数据包并做出回应,当routeros回应给你的包要发出去的时候会检查output的规则并过滤掉回应你的包。
)在每条链中的每条规则都有目标ip,源ip,进入的接口(in interface),非常灵活的去建立规则。
比如ROS禁止PING,禁止外网ping你 routeros,只需要在in interface中选择你连外部网络的接口。
禁止内部ping的话可以选择连你内部网络的接口。
如果禁止所有的ping的话,那么接口选择all。
当然禁止ping 协议要选择icmp ,action选择drop或reject。
另外要注意的就是,icmp协议并不是就指的是ping,而是 ping 是使用icmp协议中的一种(我们ping 出去发送的数据包icmp协议的类型为8 代码为0,在routeros中写为icmp-options=8:0;而我们对ping做出回应icmp类型为0 代码为0),还有很多东西也属于icmp协议。
ROS用流量监控动态控制限速点

ROS用流量监控动态控制限速点1.gifwinbox-ip-firewall-mangle-+2.gif只标识大包3.gifpacket576-1536手工要输入,不是选的.4.gifwinbox-queues-queue types- +5.gif全部做好后,打开这窗口,可以看到rate值会自动改变.6.gifwinbox-queues-queue tree-+7.gifwinbox-system-scripts-+ source里填入本贴后面程序内容,里面数值要改,程序内有说明.8.gifwinbox-system-scheduler-+9.gifwinbox-queues-simple queues-+ 每台机做一个上行限速.######程序开始####################################################################### 程序名称:ROS用流量监控动态控制限速点# 程序版本:测试# 程序员:kuwin Email:kuwin@# 程序版权:免费软件(本程序可自由传播及修改,不必理会原创作者kuwin)# Ros版本:Ros2.8.27 Ros2.9.2 Ros2.9.7# 编写日期:2007-04-29# 修改日期:2007-05-05# 测试人员:kuwin# 测试结果:# 1.控制效果良好;# 2.程序消耗一定的cpu资源,K62-300的cpu资源要用4%-4%(暂停程序只占3%-6%),建议cpu# 要P3-500以上;(2007-05-05改动后已经大幅降低)# 3.Ros显示的流量要比下载软件(讯雷等)上显示的流量要大,原因未明.# 程序评级:无# 简要说明:# 1."预留带宽"是给网络游戏,浏览网页等一些不会抢带宽的程序突发使用,有趣的是,当这# 些程序用了"预留带宽",本程序又会从讯雷,BT等带宽大鳄那里抢回一部分带宽作"预留# 带宽",在恶劣的使用环境下(比如大家都在下载),最后的限制带宽就是"预留带宽". # 建议"预留带宽"值取256000-512000,太小影响网络游戏,浏览网页的速度,太大又会影# 响下载的速度;# 2."最大带宽"取你的路由器出口带宽值;# 3."步进带宽"是本程序自动设置限制带宽时的加减值,1兆路由器出口带宽设5000,2兆设# 10000,10兆设50000,其它按此类推.# 安装方法:# 1.首先要做好简单的PCQ限速,起名"PCQ-Download".上行PCQ限速不明显,建议不要做.# 上行要在queue simple里做单机限速.(很多网站介绍,上baidu搜pcq限速);# 2.winbox,system-scripts,按+,起名SCRIPT_PCQ_SET,source里贴入这里全部内容;# 3.winbox,system-scheduler,按+,起名"SCH_PCQ_SET",interval填00:00:01(这是秒杀,# 可设1-3秒),on event填SCRIPT_PCQ_SET;# 4.程序内字母大小写敏感,请注意;# 5.请特别注意PCQ名"PCQ-Download".还有网卡的名"public"和"local".# 更新说明:# 1.针对PCQ上行限速不明显,已去掉PCQ上行限速,请另作queue simple限速,# 如:limit-at=0/128000 max-limit=0/256000.(2007-05-05)# 2.原来每秒写硬盘一次!现在只有PCQ限速值改变时才会写硬盘.(2007-05-05)# 3.经过前两点修改,cpu使用率大幅下降.(2007-05-05)############################################################################### ######定义变量(注意在Ros2.8中可以不要后面的0):local RxCurRate 0:local RxCurSet 0:local RxResRate 0:local RxMaxRate 0:local RxStepRate 0#下行即时流量#interface monitor public once do={:set RxCurRate $received-bits-per-second}interface monitor local once do={:set RxCurRate $sent-bits-per-second}#下行当前设置:set RxCurSet [/queue type get [/queue type find name="PCQ-Download"] pcq-rate]#下行预留带宽:set RxResRate 256000#下行最大带宽:set RxMaxRate 1024000#下行步进带宽:set RxStepRate 10000#设置下行带宽:if($RxCurRate<($RxMaxRate+-$RxResRate)) do={:if($RxCurSet<$RxMaxRate) do={:set RxCurSet ($RxCurSet+$RxStepRate)/queue type set "PCQ-Download" kind=pcq pcq-rate=$RxCurSet pcq-classifier=dst-address}} else={:if($RxCurSet>$RxResRate) do={:set RxCurSet ($RxCurSet+-$RxStepRate)/queue type set "PCQ-Download" kind=pcq pcq-rate=$RxCurSet pcq-classifier=dst-address}}######程序结束#############################。
ROS限速教程全集很实用

ROS普通限速+PCQ限速+服务器不限速一. IP限速普通限速就这样:我刚刚调整的:for aPC from 1 to 239 do={/queue simple add name=(A0 . $aPC)dst-address=(192.168.0. . $aPC) interface=all priority=6max-limit=1600000/720000 burst-limit=2240000/800000burst-threshold=1024000/240000 burst-time=16s/10s }:for bPC from 1 to 239 do={/queue simple add name=(B0 . $bPC)dst-address=(192.168.1. . $bPC) interface=all priority=8max-limit=1024000/360000 burst-limit=1280000/480000burst-threshold=800000/240000 burst-time=10s/8s }二.PCQ限速1.PCQ和普通限速是没有冲突的,普通的限速基本上是大于PCQ的限速值,也就是说按10M光纤来说,已经有普通限速的基础上还是要快超过10M的,网速肯定就慢了,这时候马上使用PCQ的限速策略代替普通限速,保证带宽不超过10M。
PCQ启用后,带宽降下来后,那么就再使用普通限速,如此循环.那么有的朋友就会说有普通限速了还搞什么PCQ,直接把速度降低点不就OK了。
我们做PCQ 主要的目的是使10M的光纤得到充分利用,不浪费宝贵资源。
白了就是少人的时候带宽给他多用点,速度快点,高峰期的时候减低点,慢点,但不能离谱。
2.首先要保证你ROS是正常的能NAT,一切正常后我们开始做PCQ2.1 说明:其他设置值在最后面贴出2.2 注意:new packet mark:中的(all-mark)这个要自己打上的2.3 在QUEUE菜单里面选择Queue Types 创作PCQ限速的子项这里就决定了你的限制每个IP多少K的速度(2.9系列可以直接用K单位2.8 的不行)注意看图信息这里注意下TOTAL LIMIT 设置我这样吧--------------------------------------------------------------------------------------------------------------速度设置到底多少合适呢,如果是100M的就不搞什么PCQ了,我100M的网吧直接每台机器设置20M,用都用不完,他也很少会达到20M 哈哈10M的来说,130台这样吧,PCQ设置800K,最低的了。
ros动态限速脚本l

ros动态限速脚本l网吧因客流比较大,所以网络流量变化也很大,单纯的单机限速,会造成大量的带宽被浪费掉.所以我们现在来考虑动态限速.我们简单的分为4个限速阶段,以30M带宽为例.1 不限速2 单机2M限速3 单机1M限速4 单机512K限速一限速策略的创建需要分2步1 建立新的队列类型/queue typeadd name="down_512k" kind=pcq pcq-rate=512000 pcq-limit=50 \pcq-classifier=dst-address pcq-total-limit=2000add name="down_1M" kind=pcq pcq-rate=1000000 pcq-limit=50 \pcq-classifier=dst-address pcq-total-limit=2000add name="down_2M" kind=pcq pcq-rate=2000000 pcq-limit=50 \pcq-classifier=dst-address pcq-total-limit=2000add name="up_512K" kind=pcq pcq-rate=512000 pcq-limit=50 \pcq-classifier=src-address pcq-total-limit=2000add name="up_1M" kind=pcq pcq-rate=1000000 pcq-limit=50 \pcq-classifier=src-address pcq-total-limit=2000add name="up_2M" kind=pcq pcq-rate=2000000 pcq-limit=50 \pcq-classifier=src-address pcq-total-limit=20002 建立新的简单队列简单队列的顺序一定要注意:按照512K在上,2M在下的原则排序(先小后大).因为此队列的执行原则是,先执行最上面的,后面的将被抛弃./ queue simpleadd name="PCQ_512K" dst-address=192.168.0.0/24 interface=Lan parent=none \ direction=both priority=8 queue=down_512k/up_512K limit-at=0/0 \max-limit=0/0 total-queue=default-small disabled=yesadd name="PCQ_1M" dst-address=192.168.0.0/24 interface=Lan parent=none \ direction=both priority=8 queue=up_1M/down_1M limit-at=0/0 max-limit=0/0 \ total-queue=default-small disabled=yesadd name="PCQ_2M" dst-address=192.168.0.0/24 interface=Lan parent=none \ direction=both priority=8 queue=up_2M/up_1M limit-at=0/0 max-limit=0/0 \total-queue=default-small disabled=yes二脚本的制作实际就是简单的允许某策略或不允许某策略,类似在winbox选中某策略,并点叉号或对号.这里操作的是前面建立的简单队列.来达到限速策略的开与关./ systemadd name="off512k" source="/queue sim disable PCQ_512k" \policy=ftp,reboot,read,write,policy,test,winbox,passwordadd name="on512k" source="/queue sim enable PCQ_512k" \policy=ftp,reboot,read,write,policy,test,winbox,passwordadd name="off1m" source="/queue sim disablePCQ_1M" \policy=ftp,reboot,read,write,policy,test,winbox,passwordadd name="on1m" source="/queue sim enable PCQ_1M" \ policy=ftp,reboot,read,write,policy,test,winbox,passwordadd name="off2m" source="/queue sim disable PCQ_2M" \ policy=ftp,reboot,read,write,policy,test,winbox,passwordadd name="on2m" source="/queue sim enable PCQ_2M" \ policy=ftp,reboot,read,write,policy,test,winbox,password三流量监控我们使用ROS自带的工具"通信监控"(tool traffic-monitor)来监视我们的网络流量.当流量达到一定数值,会自动运行前面制作的脚本.请注意:接口一定要选择你的外网网卡.这里的数据可根据实际情况修改,我是以自己30M带宽为例。
RouterOS 分时限速

ROS 分时限速,和定时开关:for aaa from 1 to 254 do={/queue simple add name=(PC . $aaa) dst-address=(192.168.0. . $aaa) limit-at=500000/500000 max-limit=3000000/3000000}/ ip firewall mangle add chain=prerouting action=mark-packet new-packet-mark=all-mark \ passthrough=yes comment="" disabled=no/ queue type add name="PCQ-up" kind=pcq pcq-rate=1500000 pcq-limit=50 \ pcq-classifier=src-address pcq-total-limit=2000 add name="PCQ-down" kind=pcq pcq-rate=1500000 pcq-limit=50 \ pcq-classifier=dst-address pcq-total-limit=2000/ queue simple add name="PCQ" target-addresses=192.168.0.0/24 dst-address=0.0.0.0/0 \ interface=all parent=none packet-marks=all-mark direction=both priority=1 \ queue=PCQ-up/PCQ-down limit-at=0/0 max-limit=15000000/15000000 \ total-queue=default-small disabled=yes/ system script add name="PCQON" source=":if \(\[ /queue sim get \[/queue sim find \ name=\"PCQ\"\] disable \]=true \) do={/queue sim enable PCQ}" \ policy=ftp,reboot,read,write,policy,test,winbox,password add name="PCQOFF" source=":if \(\[ /queue sim get \[/queue sim find \ name=\"PCQ\"\] disable \]=false \) do={/queue sim disable PCQ}" \ policy=ftp,reboot,read,write,policy,test,winbox,password/ tool traffic-monitor add name="PCQON" interface=WAN traffic=received trigger=above \ threshold=14800000 on-event=PCQON comment="" disabled=no add name="PCQOFF" interface=WAN traffic=received trigger=below \ threshold=5000000 on-event=PCQOFF comment="" disabled=no==================================================上面是完整脚本,直接把每一段复制进去就可以了。
ROS简单队列限速自己理解整理

ROS 简单队列限速
limit-at--------保证限速
max-limit------最大限速我们最常用的地方,最大速度
burst-limit--------突破速度的最大值(突破最大值)
burst-thershold--------突破速度的阀值(突破阀值)
burst-time-------突破速度的时间值(突破时间)
官方例子: limit-at=1M , max-limit=2M , burst-threshold=1500k , burst-limit=4M time =16s
例子解释:在突破时间(burst-time=16秒)范围内,速度如果低于突破阀值(burst-thershold=1500K)就允许超过最大限速达到突破最大值(max-limit=4M);速度如果达到或高于突破阀值(burst-thershold=1500K)就不允许突发,限速在最大限速(max-limit =2M)
注:突破阀值(burst-thershold=1500K)在保证限速(imit-at=1M)和最大限速(max-limit =2M)之间。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
[转载]RouterOS winbox限速详解limit-at,max-limit,burst limit发表于2012 年 02 月 02 日由fang分层的令牌桶HTBHTB (Hierarchical Token Bucket) is a classful queuing discipline that is useful forapplying different handling for different kinds of traffic. Generally, we can set onlyone queue for an inte***ce, but in RouterOS queues are attached to the mainHierarchical Token Bucket (HTB) and thus have some properties derived from thatparent queue. For example, we can set a maximum data rate for a workgroup andthen distribute that amount of traffic between the members of that workgroup.HTB是用于流量分类控制的经典理论。
通常只对一个接口进行流量控制,但ROS使用了HTB理论,比如说,可以先限制一个工作组的流量然后在此工作组内部再一次细分流量。
流量控制还挺复杂的,神仙觉得。
Each class in the hierarchy can prioritize and shape traffic. There are 2 mainparameters in RouterOS :* limit-at – data rate that is guaranteed to a class (CIR)* max-limit – maximal data rate that is allowed for a class to reach (MIR)两个主要参数:limit-at : 稳定速率max-limit : 最大速率* CIR(Committed Information Rate) – the guaranteed data rate. It means that trafficrate, not exceeding this value should always be delivered* MIR(Maximal Information Rate) – the maximal data rate router will provideCIR:保底速率。
不超过这个的速率总是允许的MIR:最大速率Each HTB class can be in one of 3 states, depending on data rate that it consumes:每个HTB层级都有三种状态:绿、黄、红(winbox中queue可以看到三种颜色的图标)* green – a class the actual rate of which is equal or less than limit-at. At this state,the class is attached to self slot at the corresponding priority at its level, and isallowed to satisfy its limit-at limitation regardless of what limitations its parentshave. For example, if we have a leaf class with limit-at=512000 and its parent hasmax-limit=limit-at=128000, the class will get its 512kbps!绿色:指当前速率小于或等于稳定速率(limit-at)。
这个状态下,当前层级由自己自行控制,不受上级层级控制。
比如说,如果某个层级设定的稳定速率为512kbps,其上级层级的稳定速率设定为128kbps,那么此层级在绿色状态下享受512kbps的速率* yellow – a class the actual rate of which is greater than limit-at and equal or lessthan max-limit. At this state, the class is attached to the inner slot of thecorresponding priority of its parent’s inner feed, which, in turn, maybe attachedto either its parent’s inner slot of the same priority(in case the parent is also yellow),or to its own level self slot of the same priority (in case the parent is green). Uponthe transition to this state, the class ‘disconnects’ from self feed of its level,and ‘connects’ to its parent’s inner feed黄色:批当前速率大于稳定速率但不大于最大速率。
这个状态下,当前层级由其上级层级控制(其上级如果也处于黄色状态则继续此规则,即由上级的上级控制)。
* red – a class the actual rate of which exceeds max-limit. This class cannot borrowrate from its parent class红色:指当前速率超过了最大速率。
此层级不能从其上级层级分得任何流量Bursts突发速率Bursts are used to allow higher data rates for a short period of time. Every second,the router calculates the average data rate of each class over the last burst-timeseconds. If this average data rate is less than burst-threshold, burst is enabledand the actual data rate reaches burst-limit bps, otherwise the actual data rate fallsto max-limit or limit-at.突发速率用于短时间内的超高速率数据传送。
路由器每秒种都在计算前一时间段(burst-time)的平均速率。
如果平均速率低于设定的阀值(burst-threshold),就允许其使用突发速率(burst-limit),否则就会降低到稳定速率或最大速率Let us consider that we have a setup, where max-limit=256000, burst-time=8, burst-threshold=192000 and burst-limit=512000. When a user is starting to download afile via HTTP,we can observe such a situation: At the beginning the average datarate over the last 8 seconds is 0bps because before applying the queue rule notraffic was passed, using this rule. Since this average data rate is less than burst-threshold (192kbps), burst is allowed. After the first second, the average data rateis (0+0+0+0+0+0+0+512)/8 = 64kbps, which is under burst-threshold. After thesecond second, average data rate is (0+0+0+0+0+0+512+512)/8 = 128kbps. Afterthe third second comes the breakpoint when the average data ratebecomes largerthan burst-threshold. At this moment burst is disabled and the current data rate fallsdown to max-limit(256kbps).举例说明:假设我们设置最大速率(max-limit)为256k,时间段(burst-time)为8秒,阀值为192k,突发速率(burst-limit)为512k,当用户下载文件时可以观察到:开始下载的前8秒速率为0,小于阀值192,所以允许达到突发速率即512;1秒钟后,前8秒的平均速率为64(0+0+0+0+0+0+0+512)/8=64,仍然小于阀值192,所以继续使用突发速率512;2秒钟后,前8秒的平均速率为(0+0+0+0+0+0+512+512)/8=128;3秒钟后,再次计算平均速率为(0+0+0+0+0+512+512+512)/8=192,达到了阀值192,所以,3秒钟后此用户已不再允许使用突发速率,只能使用允许的最大速率了,即256kbps。