找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2442|回复: 0

测试代码功能的

[复制链接]
发表于 2011-11-13 09:25:10 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 lzw83 于 2011-11-13 09:25 编辑
  1. #  ros3.30-HTB
  2. #
  3. #  说明: 内网网卡名称改为lan  默认带宽100M, 200台客户机  请根据实际情况修改
  4. #
  5. /ip firewall mangle
  6. add action=mark-connection chain=prerouting comment="   *\B7\F0\B9\E2\B2\CB\B8\
  7.     \F9\CC\B7*    QQ:304120225     HTB + PCQ  \B6\AF\CC\AC\C1\F7\BF\D8 \$\$\$\
  8.     \$\$\$\$\$ \$\$\$\$\$\$\$\$          \CA\A5\CD\A2\B3\F6\C6\B7 \B1\D8\CA\F4\
  9.     \BE\AB\C6\B7 " disabled=no limit=10,10 new-connection-mark=icmp \
  10.     passthrough=yes protocol=icmp
  11. add action=mark-packet chain=forward comment="" connection-mark=icmp \
  12.     disabled=no in-interface=lan new-packet-mark=icmps passthrough=no
  13. add action=mark-packet chain=prerouting comment="" connection-mark=icmp \
  14.     disabled=no new-packet-mark=icmp passthrough=no
  15. add action=mark-packet chain=forward comment=ALL_UP disabled=no in-interface=\
  16.     lan new-packet-mark=lanup passthrough=no
  17. add action=mark-connection chain=prerouting comment=\
  18.     "HTTP\CF\C2\D4\D8_\C1\B4\BD\D3" connection-bytes=700000-0 disabled=no \
  19.     new-connection-mark=http passthrough=yes protocol=tcp src-port=80
  20. add action=mark-packet chain=prerouting comment="" connection-mark=http \
  21.     disabled=no new-packet-mark=http passthrough=no
  22. add action=mark-connection chain=prerouting comment=\
  23.     "WEB\CD\F8\D2\B3_\C1\B4\BD\D3" connection-bytes=0-700000 disabled=no \
  24.     new-connection-mark=web passthrough=yes protocol=tcp src-port=80
  25. add action=mark-connection chain=prerouting comment="" connection-rate=0-80k \
  26.     disabled=no new-connection-mark=web passthrough=yes protocol=udp \
  27.     src-port=53
  28. add action=mark-packet chain=prerouting comment="" connection-mark=web \
  29.     disabled=no new-packet-mark=web passthrough=no
  30. add action=mark-connection chain=prerouting comment="Games_\C1\B4\BD\D3" \
  31.     disabled=no new-connection-mark=game passthrough=yes protocol=tcp \
  32.     src-port=3724,6112,6114,1119,7777,10241,2099,5223
  33. add action=mark-connection chain=prerouting comment="" disabled=no \
  34.     new-connection-mark=game passthrough=yes protocol=tcp src-port=\
  35.     5692,7101-7103,28012,2349,8586,10001-10070,28008,31414,6299,5130
  36. add action=mark-connection chain=prerouting comment="" disabled=no \
  37.     new-connection-mark=game passthrough=yes protocol=tcp src-port=\
  38.     3110-3120,6217,2181,28880,8001,21800,8030,6020,6030,6877,4680,13000-13002
  39. add action=mark-connection chain=prerouting comment="" disabled=no \
  40.     new-connection-mark=game passthrough=yes protocol=tcp src-port=\
  41.     3110-3120,28993,29000,5816,6868,33567,39311,9600,1119,3025,31414,3470
  42. add action=mark-connection chain=prerouting comment="" disabled=no \
  43.     new-connection-mark=game passthrough=yes protocol=tcp src-port=\
  44.     6004,7004,5562,9010-9014,17703-17706,8801,1253,1346,1272,1203,3468
  45. add action=mark-connection chain=prerouting comment="" disabled=no \
  46.     new-connection-mark=game passthrough=yes protocol=tcp src-port=\
  47.     25520-25521,25511,10906,30000-30010,8445-8451,3731-3735,7449,7237
  48. add action=mark-connection chain=prerouting comment="" disabled=no \
  49.     new-connection-mark=game passthrough=yes protocol=tcp src-port=\
  50.     7100-7200,7440,7491,7204,7400-7401,7500,7300,6040,6050,6661-6663
  51. add action=mark-connection chain=prerouting comment="" disabled=no \
  52.     new-connection-mark=game passthrough=yes protocol=tcp src-port=\
  53.     27931,47611,1607,2175,6000,20002-20007,22001,13317
  54. add action=mark-connection chain=prerouting comment="" disabled=no \
  55.     new-connection-mark=game passthrough=yes protocol=tcp src-port=\
  56.     7100,7203-7204,7400,7417,6831-6832,6840-6847,8888
  57. add action=mark-connection chain=prerouting comment="" disabled=no \
  58.     new-connection-mark=game passthrough=yes protocol=tcp src-port=\
  59.     14500,8000,15000
  60. add action=mark-connection chain=prerouting comment="" disabled=no \
  61.     new-connection-mark=game passthrough=yes protocol=udp src-port=\
  62.     12000-13000,2349,5063,39311,1764,12721,3133,4550,3620
  63. add action=mark-connection chain=prerouting comment="" disabled=no \
  64.     new-connection-mark=game passthrough=yes protocol=udp src-port="8861,1932,\
  65.     2287,14531,1897,2428,13735,1039,1100,1210,1381,1473,1509,1785,18979"
  66. add action=mark-connection chain=prerouting comment="" disabled=no \
  67.     new-connection-mark=game passthrough=yes protocol=udp src-port="1140,1371,\
  68.     1510,16434,9865,2105,1497,31519,9000,1151,4311,1506,1559,55952,59823"
  69. add action=mark-connection chain=prerouting comment="" disabled=no \
  70.     new-connection-mark=game passthrough=yes protocol=udp src-port="32404,3240\
  71.     5,32406,1176,1076,1169,13791,1139,11337,9000,1511,20096,20059,27005-27030"
  72. add action=mark-connection chain=prerouting comment="" disabled=no \
  73.     new-connection-mark=game passthrough=yes protocol=udp src-port="7263,2408,\
  74.     2468,2117,1871,1429,2294,1520,57236,1429,2494,7625,1552,1842,12411"
  75. add action=mark-connection chain=prerouting comment="" disabled=no \
  76.     new-connection-mark=game passthrough=yes protocol=udp src-port="1273,1061,\
  77.     65473,1940,2882,1501,4078,8369,4861,4964,8445-8452,7081,30700-30711"
  78. add action=mark-connection chain=prerouting comment="" disabled=no \
  79.     new-connection-mark=game passthrough=yes protocol=udp src-port="32824,9646\
  80.     ,8024,15966,18997,49386,15086,22634,35339,1610,1308,6660,6600,1991,30195"
  81. add action=mark-connection chain=prerouting comment="" disabled=no \
  82.     new-connection-mark=game passthrough=yes protocol=udp src-port="12345,6660\
  83.     ,1610,6600,7002,15002-15004,3100,1059,4111,32424,32299,15101-15104,14401"
  84. add action=mark-connection chain=prerouting comment="" disabled=no \
  85.     new-connection-mark=game passthrough=yes protocol=udp src-port=\
  86.     8000-8005,32407
  87. add action=mark-packet chain=prerouting comment="" connection-mark=game \
  88.     disabled=no new-packet-mark=game passthrough=no
  89. add action=mark-connection chain=prerouting comment="Heavy_\C1\B4\BD\D3" \
  90.     connection-bytes=500000-0 connection-rate=80k-200M disabled=no \
  91.     new-connection-mark=heavy passthrough=yes protocol=tcp src-port=\
  92.     21,80,443,1024-65535
  93. add action=mark-connection chain=prerouting comment="" connection-bytes=\
  94.     500000-0 connection-rate=80k-200M disabled=no new-connection-mark=heavy \
  95.     passthrough=yes protocol=udp src-port=21,80,443,1024-65535
  96. add action=mark-packet chain=prerouting comment="" connection-mark=heavy \
  97.     disabled=no new-packet-mark=heavy passthrough=no
  98. add action=mark-connection chain=prerouting comment="Small_\C1\B4\BD\D3" \
  99.     disabled=no new-connection-mark=small passthrough=yes
  100. add action=mark-packet chain=prerouting comment="" connection-mark=small \
  101.     disabled=no new-packet-mark=small passthrough=no
  102. /queue type
  103. set default kind=pfifo name=default pfifo-limit=50
  104. set ethernet-default kind=pfifo name=ethernet-default pfifo-limit=50
  105. set wireless-default kind=sfq name=wireless-default sfq-allot=1514 \
  106.     sfq-perturb=5
  107. set synchronous-default kind=red name=synchronous-default red-avg-packet=1000 \
  108.     red-burst=20 red-limit=60 red-max-threshold=50 red-min-threshold=10
  109. set hotspot-default kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=\
  110.     5
  111. add kind=pcq name=small pcq-classifier=dst-address pcq-limit=50 pcq-rate=\
  112.     512000 pcq-total-limit=10000
  113. add kind=pcq name=0m pcq-classifier=dst-address pcq-limit=50 pcq-rate=0 \
  114.     pcq-total-limit=10000
  115. add kind=pcq name=lanup pcq-classifier=src-address pcq-limit=50 pcq-rate=\
  116.     1000000 pcq-total-limit=10000
  117. add kind=pcq name=game pcq-classifier=dst-address pcq-limit=60 pcq-rate=\
  118.     512000 pcq-total-limit=12000
  119. set default-small kind=pfifo name=default-small pfifo-limit=10
  120. /queue tree
  121. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  122.     max-limit=80M name=HTB_DOWN parent=global-in priority=6
  123. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=5M \
  124.     max-limit=70M name="1_\CD\F8\C2\E7\D3\CE\CF\B7" packet-mark=game parent=\
  125.     HTB_DOWN priority=2 queue=game
  126. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=20M \
  127.     max-limit=70M name="2_\CD\F8\D2\B3\E4\AF\C0\C0" packet-mark=web parent=\
  128.     HTB_DOWN priority=3 queue=0m
  129. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=20M \
  130.     max-limit=70M name="3_\D0\A1\B0\FC\CA\FD\BE\DD" packet-mark=small parent=\
  131.     HTB_DOWN priority=5 queue=small
  132. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
  133.     max-limit=40M name=HTB_UP packet-mark=lanup parent=global-out priority=7 \
  134.     queue=lanup
  135. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=10M \
  136.     max-limit=70M name="5_\CE\C4\BC\FE\CF\C2\D4\D8" packet-mark=heavy parent=\
  137.     HTB_DOWN priority=8 queue=0m
  138. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=10M \
  139.     max-limit=70M name="4_\D4\DA\CF\DF\CA\D3\C6\B5" packet-mark=http parent=\
  140.     HTB_DOWN priority=6 queue=0m
  141. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1M \
  142.     max-limit=1M name=ICMP_DOWN packet-mark=icmp parent=global-in priority=1 \
  143.     queue=default
  144. add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1M \
  145.     max-limit=1M name=ICMP_UP packet-mark=icmps parent=global-out priority=1 \
  146.     queue=default
复制代码
routeros
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-21 23:19 , Processed in 0.051467 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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