网吧用ROS最确的限速.docVIP

  • 132
  • 0
  • 约1.88万字
  • 约 14页
  • 2016-10-14 发布于贵州
  • 举报
网吧用ROS最确的限速

网吧用ROS最正确的限速 一直以来,都看论坛上的达人说ROS做软路由器效果是多么的强大,于是偶也搞一个试试看。找了一个2.9.27的完全破解版,用了2块D-LINK530的网卡,装完一用还真行。比我那1000的锐捷强多了,网吧120台机器,座满的时候那个锐捷的路由器登陆界面都打不开。用上以后问题就来了,我们30M的光纤,如果不限速,那些下载狂人把带宽全部给占用了,打游戏的顾客很有意见。于是我就做了个限速,每个机器下载最大2M.平均1M。但是群众还是不满意,都所卡。我又找资料,发现原来还有个叫智能动态限速的东西,好偶照做。做好以后,平时喊卡的人没有了,人多的时候一样都喊卡。 偶傻眼了,难道只能不限速。还好天无绝人之路,还有个“小包优先”的高级货,于是照做。结果用简单队列限速后,“小包优先”也是白搭,难道天要忘我。终于经过N次测试以后,我明白了。网吧用简单队列做限速完全是扯蛋。网吧限速最好的办法应该是带宽均分,然后在用简单队列来限制上传。在利用小包优先来处理游戏卡的问题。经过2个网吧,一个月的测试,完全摆脱了到处喊卡的噩梦,现在把经验发来大家分享一下。 ROS不要用简单队列来限速,什么智能动态限速也不要用。只需要用小包优先+带宽均分+简单队列限制上传速度。 小包优先的脚本如下: ip firewall mangle add chain=forward p2p=all-p2p action=mark-connection new-connection-mark=p2p_conn passthrough=yes comment= disabled=no add chain=forward connection-mark=p2p_conn action=mark-packet new-packet-mark=p2p passthrough=yes comment= disabled=no add chain=forward connection-mark=!p2p_conn action=mark-packet new-packet-mark=general passthrough=yes comment= disabled=no add chain=forward packet-size=32-512 action=mark-packet new-packet-mark=small passthrough=yes comment= disabled=no add chain=forward packet-size=512-1200 action=mark-packet new-packet-mark=big passthrough=yes comment= disabled=no / queue tree add name=p2p1 parent=wan packet-mark=p2p limit-at=2000000 queue=default priority=8 max-limit=6000000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no add name=p2p2 parent=lan packet-mark=p2p limit-at=2000000 queue=default priority=8 max-limit=6000000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no add name=ClassA parent=lan packet-mark= limit-at=0 queue=default priority=8 max-limit=100000000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no add name=ClassB parent=ClassA packet-mark= limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no add name=Leaf1 parent=ClassA packet-mark=general limit-at=0 queue=default priority=7 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s dis

文档评论(0)

1亿VIP精品文档

相关文档