《ROS最完美限速-根据带宽进行限速(共2页).doc》由会员分享,可在线阅读,更多相关《ROS最完美限速-根据带宽进行限速(共2页).doc(2页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、精选优质文档-倾情为你奉上ROS最完美限速-根据带宽进行限速在用脚本之前我们都是使用Simple Queue简单限速来进行客户机的限速,他的缺点是固定了每台客户机的最大上传下载速度,这样在人比较少,带宽占用不高的情况下,客人还是只能按高峰期的最大上传下载速度来上网,体现不了我们光纤极速上网的优势。 今天看了一天的资料 看的我是头昏脑胀看什么都模糊了最后看好这个脚本最重要的 不浪费我们的一点带宽 以下脚本,是网通百兆 电信10M的双线 的带宽带了256台客户机 进行智能pcq限速。 现在 暂时上传脚本 不会的朋友 等我到时候发个教程帖子 给出详细设置 具体设置 1、总下载带宽高于85M时,启动限
2、速,每台机设置下载限速为4.5M。 2、总下载带宽低于40M时,取消限速。 3、总上传带宽高于60M时,启动限速,每台机设置上传限速为6M。 4、总上传带宽低于25M时,取消限速。 使用前,请先将原来的 Simple Queue 中设定的限速指令删除。 同时,外网连接的名称要为 wan /ip firewall mangle add chain=prerouting action=mark-packet new-packet-mark=all passthrough=no /queue type add name=PCQ_download kind=pcq pcq-rate= pcq-clas
3、sifier=dst-address /queue type add name=PCQ_upload kind=pcq pcq-rate= pcq-classifier=src-address /queue tree add name=PCQdown parent=global-in queue=PCQ_download packet-mark=all /queue tree add name=PCQup parent=global-out queue=PCQ_upload packet-mark=all / tool traffic-monitor add name=PCQdownon in
4、terface=wan traffic=received trigger=above threshold= on-event=downon comment= disabled=no / tool traffic-monitor add name=PCQdownoff interface=wan traffic=received trigger=below threshold= on-event=downoff comment= disabled=no / tool traffic-monitor add name=PCQupon interface=wan traffic=transmitte
5、d trigger=above threshold= on-event=upon comment= disabled=no / tool traffic-monitor add name=PCQupoff interface=wan traffic=transmitted trigger=below threshold= on-event=upoff comment= disabled=no / system script add name=upon source=:if ( /queue tree get /queue tree find name=PCQup disable =true )
6、 do=/queue tree enable PCQup policy=password,read,reboot,write,policy,test / system script add name=upoff source=:if (/queue tree get /queue tree find name=PCQup disable =false ) do=/queue tree disable PCQup policy=password,read,reboot,write,policy,test / system script add name=downon source=:if (/q
7、ueue tree get /queue tree find name=PCQdown disable =true ) do=/queue tree enable PCQdown policy=password,read,reboot,write,policy,test / system script add name=downoff source=:if (/queue tree get /queue tree find name=PCQdown disable =false ) do=/queue tree disable PCQdown policy=password,read,reboot,write,policy,test 其中的最大带宽触发数量,每台机触发后限制的带宽;以及最小带宽触发数量,这些需要根据实际运用中不断调整,才能达到最佳的效果。专心-专注-专业