找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 7560|回复: 12

[限速] 也晒晒我的PCD限速,看了几位的PCQ理论,学着组装了下面的脚本, 各位多指教

  [复制链接]
发表于 2010-10-26 15:40:23 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 239300 于 2010-10-26 15:42 编辑

看了几位的PCQ理论,学着组装了下面的脚本, 各位多指教
  1. # oct/26/2010 15:31:12 by routeros 3.22
  2. # software id = HU6I-XPT
  3. #
  4. /ip firewall mangle
  5. add action=mark-connection chain=forward comment="P2P\CF\DE\D6\C6" disabled=\
  6.     no new-connection-mark=p2pCOM p2p=all-p2p passthrough=yes
  7. add action=mark-packet chain=forward comment="P2P\CF\DE\D6\C6" \
  8.     connection-mark=p2pCOM disabled=no new-packet-mark=p2p passthrough=yes
  9. add action=mark-packet chain=prerouting comment=\
  10.     "\B1\EA\BC\C7\CB\F9\D3\D0\CA\FD\BE\DD\B0\FC" disabled=no new-packet-mark=\
  11.     all-mark passthrough=yes
  12. add action=mark-connection chain=prerouting comment="\D0\A1\B0\FC" disabled=\
  13.     no new-connection-mark=all_icmp_con passthrough=yes protocol=icmp
  14. add action=mark-packet chain=prerouting comment="" connection-mark=\
  15.     all_icmp_con disabled=no new-packet-mark=all_icmp_pack passthrough=no
  16. add action=mark-connection chain=prerouting comment="\CD\F8\D2\B3\B0\FC" \
  17.     disabled=no dst-port=80 new-connection-mark=all_80_con passthrough=yes \
  18.     protocol=tcp
  19. add action=mark-packet chain=prerouting comment="" connection-mark=all_80_con \
  20.     disabled=no new-packet-mark=all_80_small_pack packet-size=0-512 \
  21.     passthrough=no
  22. add action=mark-packet chain=prerouting comment="" connection-mark=all_80_con \
  23.     disabled=no new-packet-mark=all_80_big_pack passthrough=no
  24. add action=mark-connection chain=prerouting comment="\C6\E4\CB\FC\B0\FC" \
  25.     disabled=no new-connection-mark=all_other_con passthrough=yes
  26. add action=mark-packet chain=prerouting comment="" connection-mark=\
  27.     all_other_con disabled=no new-packet-mark=all_other_small_pack \
  28.     packet-size=0-512 passthrough=no
  29. add action=mark-packet chain=prerouting comment="" connection-mark=\
  30.     all_other_con disabled=no new-packet-mark=all_other_big_pack passthrough=\
  31.     no

  32. /queue type
  33. add kind=pcq name=PCQ_up pcq-classifier=src-address pcq-limit=50 pcq-rate=\
  34.     1000000 pcq-total-limit=2000
  35. add kind=pcq name=PCQ_down pcq-classifier=dst-address pcq-limit=50 pcq-rate=\
  36.     3000000 pcq-total-limit=2000
  37. add kind=pcq name=PCQ_limit pcq-classifier=dst-address pcq-limit=50 pcq-rate=\
  38.     10 pcq-total-limit=2000

  39. /queue tree
  40. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  41.     max-limit=0 name=Down packet-mark="" parent=ether1 priority=8 queue=\
  42.     PCQ_down
  43. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  44.     max-limit=0 name=icmp_d packet-mark=all_icmp_pack parent=Down priority=1 \
  45.     queue=PCQ_down
  46. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  47.     max-limit=0 name=80_small_d packet-mark=all_80_small_pack parent=Down \
  48.     priority=2 queue=PCQ_down
  49. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  50.     max-limit=0 name=80_big_d packet-mark=all_80_big_pack parent=Down \
  51.     priority=3 queue=PCQ_down
  52. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  53.     max-limit=0 name=other_small_d packet-mark=all_other_small_pack parent=\
  54.     Down priority=4 queue=PCQ_down
  55. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  56.     max-limit=0 name=other_big_d packet-mark=all_other_big_pack parent=Down \
  57.     priority=5 queue=PCQ_down
  58. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  59.     max-limit=0 name=Up packet-mark="" parent=ether1 priority=8 queue=PCQ_up
  60. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  61.     max-limit=0 name=icmp_u packet-mark=all_icmp_pack parent=Up priority=1 \
  62.     queue=PCQ_up
  63. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  64.     max-limit=0 name=80_small_u packet-mark=all_80_small_pack parent=Up \
  65.     priority=2 queue=PCQ_up
  66. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  67.     max-limit=0 name=80_big_u packet-mark=all_80_big_pack parent=Up priority=\
  68.     3 queue=PCQ_up
  69. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  70.     max-limit=0 name=other_small_u packet-mark=all_other_small_pack parent=Up \
  71.     priority=4 queue=PCQ_up
  72. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  73.     max-limit=0 name=other_big_u packet-mark=all_other_big_pack parent=Up \
  74.     priority=5 queue=PCQ_up
  75. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=\
  76.     2000000 max-limit=2000000 name=p2pW packet-mark=p2p parent=ether1 \
  77.     priority=8 queue=PCQ_down
  78. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=\
  79.     2000000 max-limit=2000000 name=p2pL packet-mark=p2p parent=ether2 \
  80.     priority=8 queue=PCQ_up

  81. /tool traffic-monitor
  82. add comment="" disabled=no interface=ether1 name=hight on-event="/queue type s\
  83.     et [find name=PCQ_down] pcq-rate=7000000\r\
  84.     \n/queue type set [find name=PCQ_up] pcq-rate=3000000\r\
  85.     \n:log info "\A1\BC\D2\D1\C7\D0\BB\BB\B3\C9 \B6\AF\CC\AC\CF\C2\D4\D8 \B8\
  86.     \DF\CB\D9\A1\BD"" threshold=5000000 traffic=received trigger=below
  87. add comment="" disabled=no interface=ether1 name=mid on-event="/queue type set\
  88.      [find name=PCQ_down] pcq-rate=3000000\r\
  89.     \n/queue type set [find name=PCQ_up] pcq-rate=1000000\r\
  90.     \n:log info "\A1\BC\D2\D1\C7\D0\BB\BB\B3\C9 \B6\AF\CC\AC\CF\C2\D4\D8 \D6\
  91.     \D0\CB\D9\A1\BD"" threshold=9000000 traffic=received trigger=above
  92. add comment="" disabled=no interface=ether1 name=low on-event="/queue type set\
  93.      [find name=PCQ_down] pcq-rate=1000000\r\
  94.     \n/queue type set [find name=PCQ_up] pcq-rate=500000\r\
  95.     \n:log info "\A1\BC\D2\D1\C7\D0\BB\BB\B3\C9 \B6\AF\CC\AC\CF\C2\D4\D8 \B5\
  96.     \CD\CB\D9\A1\BD"" threshold=14000000 traffic=received trigger=above
复制代码
routeros
发表于 2010-10-26 20:29:57 | 显示全部楼层
给点注释吧,不然很多新手(我算一个)读不懂。
routeros
回复

使用道具 举报

发表于 2010-10-27 16:37:39 | 显示全部楼层
收起來!以後當做參考!
routeros
回复

使用道具 举报

发表于 2010-10-27 20:00:32 | 显示全部楼层
PCD限速原来是这样的?比PCQ高级?学习了。
routeros
回复

使用道具 举报

发表于 2010-10-27 20:02:28 | 显示全部楼层
routeros
回复

使用道具 举报

发表于 2010-12-29 21:16:33 | 显示全部楼层
这个好像不对吧?导不进去的?
routeros
回复

使用道具 举报

发表于 2010-12-30 12:23:29 | 显示全部楼层
学习了
routeros
回复

使用道具 举报

发表于 2010-12-31 00:16:10 | 显示全部楼层
支持晒东西
routeros
回复

使用道具 举报

发表于 2011-1-6 22:09:26 | 显示全部楼层
支持晒东西
routeros
回复

使用道具 举报

发表于 2011-1-8 13:07:24 | 显示全部楼层
给点注释吧,看不懂
routeros
回复

使用道具 举报

发表于 2011-3-28 16:14:54 | 显示全部楼层
给点注释吧,看不懂
routeros
回复

使用道具 举报

发表于 2011-3-29 09:45:07 | 显示全部楼层
不懂围观中!!
routeros
回复

使用道具 举报

发表于 2011-3-29 21:34:26 | 显示全部楼层
学习,分享精神
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-18 18:02 , Processed in 0.073838 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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