找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 30535|回复: 38

[限速] 智能限速 RouterOS 最新ROS3.30脚本

  [复制链接]
发表于 2012-2-3 09:09:08 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
本帖最后由 oО.﹏壊尐孩 于 2012-2-3 09:30 编辑
将脚本上传到你的ros3.30,脚本导入命令,在命令窗口输入im qos_htb.rsc然后调试。

这脚本是昨天找作者要的,用了7个小时,感觉很好。。。看了一下脚本,标的很好,,大包是大包,小包是小包,然后在线电影也限死了,,大家都知道,,现在网吧在线看电视的太多了。我用海蜘蛛10M光纤带40台,每台上传128K,下载158K,可只要别人下载或看在网页上电视,鸡巴都用了350K了,一到满载的时候卡的一B,海蜘蛛根本限不死,,后来没办法又换ROS了。。看见佛光的脚本很出名,叫加他QQ让他发个脚本我,,用了七个小时,,感觉很好。。。用海蜘蛛下载158K,看电视有时候还缓冲。用这脚本根本没有缓冲。。听QQ音乐也是。。智能的就是爽歪歪。。。我把脚本也发给大家吧。。大家自己修改。。。很好用。。
忘记是在那里下载的了,发表上来共享下,不是我原创

qos_htb.rar (2.17 KB, 下载次数: 210, 售价: 2 铜板)





routeros
发表于 2012-2-3 09:27:17 | 显示全部楼层
如果知道是佛光的 我根本不会去浪费这4个铜板

还以为别人有什么新意的思路想看下,4个啊
routeros
回复

使用道具 举报

发表于 2012-2-3 09:39:40 | 显示全部楼层
这个很不错啊~~~ 谢谢楼主了~~
routeros
回复

使用道具 举报

发表于 2012-2-3 09:40:06 | 显示全部楼层
郁闷啊,铜板不够~~~~~·
routeros
回复

使用道具 举报

发表于 2012-3-17 10:11:43 | 显示全部楼层
请问一下,有没有PCC限速的,这个我不会
routeros
回复

使用道具 举报

发表于 2012-3-17 11:10:57 | 显示全部楼层
太贵了啊 我没铜币  哎 又 出了2个铜币
routeros
回复

使用道具 举报

发表于 2012-3-17 23:31:56 | 显示全部楼层
支持一下。。。出两个铜板
routeros
回复

使用道具 举报

发表于 2012-3-19 08:19:32 | 显示全部楼层
下来看看。。谢谢
routeros
回复

使用道具 举报

发表于 2012-3-22 17:31:26 | 显示全部楼层
下载了试试看!
routeros
回复

使用道具 举报

发表于 2012-3-22 18:20:33 | 显示全部楼层
下载了试试看!
routeros
回复

使用道具 举报

发表于 2012-3-22 22:04:31 | 显示全部楼层
已经完全下载了,安装版本3.20 ,现在导入脚本,楼主帮助看看!
  1. #  ros3.30-HTB流控 By:佛光菜根谭  QQ:304120225
  2. #               
  3. #   
  4. #
  5. #  说明: 网段为 192.168.11.0/24  默认带宽100M, 200台客户机  请根据实际情况修改
  6. #
  7. /ip firewall address-list
  8. add address=192.168.1.0/24 comment="内网机1" disabled=no list=wks
  9. add address=192.168.10.0/24 comment="内网机1" disabled=no list=wks
  10. add address=192.168.20.0/24 comment="内网机1" disabled=no list=wks
  11. add address=192.168.30.0/24 comment="内网机1" disabled=no list=wks
  12. add address=192.168.40.0/24 comment="内网机1" disabled=no list=wks
  13. add address=192.168.50.0/24 comment="内网机1" disabled=no list=wks
  14. /ip firewall mangle
  15. add action=mark-connection chain=prerouting comment="   *\B7\F0\B9\E2\B2\CB\B8\
  16.     \F9\CC\B7*    QQ:304120225     HTB + PCQ  \B6\AF\CC\AC\C1\F7\BF\D8 \$\$\$\
  17.     \$\$\$\$\$<   \B4\FA\BA\C5:\B2\BB\B6\AE\CE\C2\C8\E1   > \$\$\$\$\$\$\$\$  \
  18.     \_       \CA\A5\CD\A2\B3\F6\C6\B7 \B1\D8\CA\F4\BE\AB\C6\B7 " disabled=no \
  19.     limit=5,5 new-connection-mark=icmp passthrough=yes protocol=icmp
  20. add action=mark-packet chain=postrouting comment="" connection-mark=icmp \
  21.     disabled=no limit=5,5 new-packet-mark=icmps passthrough=no \
  22.     src-address-list=wks
  23. add action=mark-packet chain=prerouting comment="" connection-mark=icmp \
  24.     disabled=no limit=5,5 new-packet-mark=icmp passthrough=no
  25. add action=mark-packet chain=postrouting comment=ALL_UP disabled=no \
  26.     new-packet-mark=lanup passthrough=no src-address-list=wks
  27. add action=mark-connection chain=prerouting comment="HTTP_\C1\B4\BD\D3" \
  28.     connection-bytes=700000-0 disabled=no new-connection-mark=http \
  29.     passthrough=yes protocol=tcp src-port=80
  30. add action=mark-packet chain=prerouting comment="" connection-mark=http \
  31.     disabled=no new-packet-mark=http passthrough=no
  32. add action=mark-connection chain=prerouting comment="WEB_\C1\B4\BD\D3" \
  33.     connection-bytes=0-700000 disabled=no new-connection-mark=web \
  34.     passthrough=yes protocol=tcp src-port=80
  35. add action=mark-connection chain=prerouting comment="" connection-rate=0-80k \
  36.     disabled=no new-connection-mark=web passthrough=yes protocol=udp \
  37.     src-port=53
  38. add action=mark-packet chain=prerouting comment="" connection-mark=web \
  39.     disabled=no new-packet-mark=web passthrough=no
  40. add action=mark-connection chain=prerouting comment="Games_\C1\B4\BD\D3" \
  41.     connection-rate=0-80k disabled=no new-connection-mark=game passthrough=\
  42.     yes protocol=tcp src-port=3724,6112,6114,1119,7777,10241
  43. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  44.     disabled=no new-connection-mark=game passthrough=yes protocol=tcp \
  45.     src-port=5692,7101-7103,28012,2349,8586,10001-10070,28008,31414,6299,5130
  46. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  47.     disabled=no new-connection-mark=game passthrough=yes protocol=tcp \
  48.     src-port=\
  49.     3110-3120,6217,2181,28880,8001,21800,8030,6020,6030,6877,4680,13000-13002
  50. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  51.     disabled=no new-connection-mark=game passthrough=yes protocol=tcp \
  52.     src-port=\
  53.     3110-3120,28993,29000,5816,6868,33567,39311,9600,1119,3025,31414,3470
  54. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  55.     disabled=no new-connection-mark=game passthrough=yes protocol=tcp \
  56.     src-port=\
  57.     6004,7004,5562,9010-9014,17703-17706,8801,1253,1346,1272,1203,3468
  58. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  59.     disabled=no new-connection-mark=game passthrough=yes protocol=tcp \
  60.     src-port=\
  61.     25520-25521,25511,10906,30000-30010,8445-8451,3731-3735,7449,7237
  62. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  63.     disabled=no new-connection-mark=game passthrough=yes protocol=tcp \
  64.     src-port=7100-7200,7440,7491,7204,7400-7401,7500,7300,6040,6050,6661-6663
  65. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  66.     disabled=no new-connection-mark=game passthrough=yes protocol=tcp \
  67.     src-port=27931,47611,1607,2175,6000,20002-20007,22001,13317
  68. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  69.     disabled=no new-connection-mark=game passthrough=yes protocol=tcp \
  70.     src-port=7100,7203-7204,7400,7417,6831-6832,6840-6847,8888
  71. add action=mark-connection chain=prerouting comment="" connection-rate=0-10k \
  72.     disabled=no new-connection-mark=game passthrough=yes protocol=tcp \
  73.     src-port=14500,8000,15000
  74. add action=mark-connection chain=prerouting comment="" connection-rate=0-59k \
  75.     disabled=no new-connection-mark=game passthrough=yes protocol=udp \
  76.     src-port=12000-13000,2349,5063,39311,1764,12721,3133,4550,3620
  77. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  78.     disabled=no new-connection-mark=game passthrough=yes protocol=udp \
  79.     src-port="8861,1932,2287,14531,1897,2428,13735,1039,1100,1210,1381,1473,15\
  80.     09,1785,18979"
  81. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  82.     disabled=no new-connection-mark=game passthrough=yes protocol=udp \
  83.     src-port="1140,1371,1510,16434,9865,2105,1497,31519,9000,1151,4311,1506,15\
  84.     59,55952,59823"
  85. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  86.     disabled=no new-connection-mark=game passthrough=yes protocol=udp \
  87.     src-port="32404,32405,32406,1176,1076,1169,13791,1139,11337,9000,1511,2009\
  88.     6,20059,27005-27030"
  89. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  90.     disabled=no new-connection-mark=game passthrough=yes protocol=udp \
  91.     src-port="7263,2408,2468,2117,1871,1429,2294,1520,57236,1429,2494,7625,155\
  92.     2,1842,12411"
  93. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  94.     disabled=no new-connection-mark=game passthrough=yes protocol=udp \
  95.     src-port="1273,1061,65473,1940,2882,1501,4078,8369,4861,4964,8445-8452,708\
  96.     1,30700-30711"
  97. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  98.     disabled=no new-connection-mark=game passthrough=yes protocol=udp \
  99.     src-port="32824,9646,8024,15966,18997,49386,15086,22634,35339,1610,1308,66\
  100.     60,6600,1991,30195"
  101. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  102.     disabled=no new-connection-mark=game passthrough=yes protocol=udp \
  103.     src-port="12345,6660,1610,6600,7002,15002-15004,3100,1059,4111,32424,32299\
  104.     ,15101-15104,14401"
  105. add action=mark-connection chain=prerouting comment="" connection-rate=0-20k \
  106.     disabled=no new-connection-mark=game passthrough=yes protocol=udp \
  107.     src-port=8000-8005,32407
  108. add action=mark-packet chain=prerouting comment="" connection-mark=game \
  109.     disabled=no new-packet-mark=game passthrough=no
  110. add action=mark-connection chain=prerouting comment="Heavy_\C1\B4\BD\D3" \
  111.     connection-bytes=200000-0 connection-rate=160k-200M disabled=no \
  112.     new-connection-mark=heavy passthrough=yes protocol=tcp
  113. add action=mark-connection chain=prerouting comment="" connection-bytes=\
  114.     100000-0 connection-rate=100k-200M disabled=no new-connection-mark=heavy \
  115.     passthrough=yes protocol=udp
  116. add action=mark-packet chain=prerouting comment="" connection-mark=heavy \
  117.     disabled=no new-packet-mark=heavy passthrough=no
  118. add action=mark-connection chain=prerouting comment="Small_\C1\B4\BD\D3" \
  119.     disabled=no new-connection-mark=small passthrough=yes
  120. add action=mark-packet chain=prerouting comment="" connection-mark=small \
  121.     disabled=no new-packet-mark=small passthrough=no
  122. /queue type
  123. set default kind=pfifo name=default pfifo-limit=50
  124. set ethernet-default kind=pfifo name=ethernet-default pfifo-limit=50
  125. set wireless-default kind=sfq name=wireless-default sfq-allot=1514 \
  126.     sfq-perturb=5
  127. set synchronous-default kind=red name=synchronous-default red-avg-packet=1000 \
  128.     red-burst=20 red-limit=60 red-max-threshold=50 red-min-threshold=10
  129. set hotspot-default kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=\
  130.     5
  131. add kind=pcq name=1m_down pcq-classifier=dst-address pcq-limit=50 pcq-rate=\
  132.     1000000 pcq-total-limit=10000
  133. add kind=pcq name=0m_down pcq-classifier=dst-address pcq-limit=50 pcq-rate=0 \
  134.     pcq-total-limit=10000
  135. add kind=pcq name=512k_up pcq-classifier=src-address pcq-limit=50 pcq-rate=\
  136.     512000 pcq-total-limit=10000
  137. set default-small kind=pfifo name=default-small pfifo-limit=10
  138. /queue tree
  139. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  140.     max-limit=80M name=HTB_DOWN parent=global-in priority=1
  141. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=5M \
  142.     max-limit=70M name="1_\CD\F8\C2\E7\D3\CE\CF\B7" packet-mark=game parent=\
  143.     HTB_DOWN priority=2 queue=1m_down
  144. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=20M \
  145.     max-limit=70M name="2_\CD\F8\D2\B3\E4\AF\C0\C0" packet-mark=web parent=\
  146.     HTB_DOWN priority=3 queue=0m_down
  147. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=20M \
  148.     max-limit=70M name="3_\D0\A1\B0\FC\CA\FD\BE\DD" packet-mark=small parent=\
  149.     HTB_DOWN priority=6 queue=1m_down
  150. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  151.     max-limit=40M name=HTB_UP packet-mark=lanup parent=global-out priority=7 \
  152.     queue=512k_up
  153. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=10M \
  154.     max-limit=70M name="5_\CE\C4\BC\FE\CF\C2\D4\D8" packet-mark=heavy parent=\
  155.     HTB_DOWN priority=8 queue=0m_down
  156. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=10M \
  157.     max-limit=70M name="4_\D4\DA\CF\DF\CA\D3\C6\B5" packet-mark=http parent=\
  158.     HTB_DOWN priority=7 queue=0m_down
  159. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1M \
  160.     max-limit=1M name=ICMP_DOWN packet-mark=icmp parent=global-in priority=1 \
  161.     queue=default
  162. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1M \
  163.     max-limit=1M name=ICMP_UP packet-mark=icmps parent=global-out priority=1 \
  164.     queue=default
复制代码
我的是多网段接入,修改版本:
  1. /ip firewall address-list> print
  2. Flags: X - disabled, D - dynamic
  3. #   LIST                                                                   ADDRESS                        
  4. 0   ;;;     1
  5.      wks                                                                    192.168.1.0/24                 
  6. 1   ;;;     2
  7.      wks                                                                    192.168.10.0/24               
  8. 2   ;;;     3
  9.      wks                                                                    192.168.20.0/24               
  10. 3   ;;;     4
  11.      wks                                                                    192.168.30.0/24               
  12. 4   ;;;     5
  13.      wks                                                                    192.168.40.0/24               
  14. 5   ;;;     6
  15.      wks                                                                    192.168.50.0/24               
复制代码
内网基本上都是网络办公,删除游戏部分:
  1. /ip firewall mangle> pr
  2. Flags: X - disabled, I - invalid, D - dynamic
  3. 0   ;;; HTB + PCQ           
  4.      chain=prerouting action=mark-connection new-connection-mark=icmp passthrough=yes protocol=icmp limit=5,5

  5. 1   chain=postrouting action=mark-packet new-packet-mark=icmps passthrough=no src-address-list=wks connection-mark=icmp limit=5,5

  6. 2   chain=prerouting action=mark-packet new-packet-mark=icmp passthrough=no connection-mark=icmp limit=5,5

  7. 3   ;;; ALL_UP
  8.      chain=postrouting action=mark-packet new-packet-mark=lanup passthrough=no src-address-list=wks

  9. 4   ;;; HTTP_   
  10.      chain=prerouting action=mark-connection new-connection-mark=http passthrough=yes protocol=tcp src-port=80 connection-bytes=700000-0

  11. 5   chain=prerouting action=mark-packet new-packet-mark=http passthrough=no connection-mark=http

  12. 6   ;;; WEB_   
  13.      chain=prerouting action=mark-connection new-connection-mark=web passthrough=yes protocol=tcp src-port=80 connection-bytes=0-700000

  14. 7   chain=prerouting action=mark-connection new-connection-mark=web passthrough=yes protocol=udp src-port=53

  15. 8   chain=prerouting action=mark-packet new-packet-mark=web passthrough=no connection-mark=web

  16. 9   ;;; Heavy_   
  17.      chain=prerouting action=mark-connection new-connection-mark=heavy passthrough=yes protocol=tcp connection-bytes=200000-0

  18. 10   chain=prerouting action=mark-connection new-connection-mark=heavy passthrough=yes protocol=udp connection-bytes=100000-0

  19. 11   chain=prerouting action=mark-packet new-packet-mark=heavy passthrough=no connection-mark=heavy

  20. 12   ;;;  Small_   
  21.      chain=prerouting action=mark-packet new-packet-mark=small passthrough=yes

  22. 13   chain=prerouting action=mark-packet new-packet-mark=small passthrough=no connection-mark=small
复制代码
限速规则没有任何改变:
  1. /queue type> print
  2. 0 name="default" kind=pfifo pfifo-limit=50

  3. 1 name="ethernet-default" kind=pfifo pfifo-limit=50

  4. 2 name="wireless-default" kind=sfq sfq-perturb=5 sfq-allot=1514

  5. 3 name="synchronous-default" kind=red red-limit=60 red-min-threshold=10 red-max-threshold=50 red-burst=20 red-avg-packet=1000

  6. 4 name="hotspot-default" kind=sfq sfq-perturb=5 sfq-allot=1514

  7. 5 name="1m_down" kind=pcq pcq-rate=1000000 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=10000

  8. 6 name="0m_down" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=10000

  9. 7 name="512k_up" kind=pcq pcq-rate=512000 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=10000

  10. 8 name="default-small" kind=pfifo pfifo-limit=10
复制代码
限速脚本
  1. /queue tree> print
  2. Flags: X - disabled, I - invalid
  3. 0   name="HTB_DOWN" parent=global-in packet-mark="" limit-at=0 queue=default priority=1 max-limit=80000000 burst-limit=0 burst-threshold=0 burst-time=0s

  4. 1   name="1_\CD\F8\C2\E7\D3\CE\CF\B7" parent=HTB_DOWN packet-mark=game limit-at=5000000 queue=1m_down priority=2 max-limit=70000000 burst-limit=0 burst-threshold=0
  5.      burst-time=0s

  6. 2   name="2_\CD\F8\D2\B3\E4\AF\C0\C0" parent=HTB_DOWN packet-mark=web limit-at=20000000 queue=0m_down priority=3 max-limit=70000000 burst-limit=0 burst-threshold=0
  7.      burst-time=0s

  8. 3   name="3_\D0\A1\B0\FC\CA\FD\BE\DD" parent=HTB_DOWN packet-mark=small limit-at=20000000 queue=1m_down priority=6 max-limit=70000000 burst-limit=0 burst-threshold=0
  9.      burst-time=0s

  10. 4   name="HTB_UP" parent=global-out packet-mark=lanup limit-at=0 queue=512k_up priority=7 max-limit=40000000 burst-limit=0 burst-threshold=0 burst-time=0s

  11. 5   name="5_\CE\C4\BC\FE\CF\C2\D4\D8" parent=HTB_DOWN packet-mark=heavy limit-at=10000000 queue=0m_down priority=8 max-limit=70000000 burst-limit=0 burst-threshold=0
  12.      burst-time=0s

  13. 6   name="4_\D4\DA\CF\DF\CA\D3\C6\B5" parent=HTB_DOWN packet-mark=http limit-at=10000000 queue=0m_down priority=7 max-limit=70000000 burst-limit=0 burst-threshold=0
  14.      burst-time=0s

  15. 7   name="ICMP_DOWN" parent=global-in packet-mark=icmps limit-at=1000000 queue=default priority=1 max-limit=1000000 burst-limit=0 burst-threshold=0 burst-time=0s

  16. 8   name="ICMP_UP" parent=global-out packet-mark=icmps limit-at=1000000 queue=default priority=1 max-limit=1000000 burst-limit=0 burst-threshold=0 burst-time=0s
复制代码
3.20和3.30之间所有的  connection-rate=0-20k 都没有导入,发现3.20没有 connection-rate 选项!
routeros
回复

使用道具 举报

发表于 2012-6-12 09:32:06 | 显示全部楼层
要钱啊··
routeros
回复

使用道具 举报

发表于 2012-6-12 17:10:27 | 显示全部楼层
太多了!!!!!!!!!!!!!!!!!!!
routeros
回复

使用道具 举报

发表于 2012-6-12 17:32:00 | 显示全部楼层
貌似是以前的
routeros
回复

使用道具 举报

发表于 2012-6-29 10:11:01 | 显示全部楼层
看看值不值得,呵呵
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-11-23 09:39 , Processed in 0.298138 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表