也晒晒我的PCD限速,看了几位的PCQ理论,学着组装了下面的脚本, 各位多指教
本帖最后由 239300 于 2010-10-26 15:42 编辑看了几位的PCQ理论,学着组装了下面的脚本, 各位多指教# oct/26/2010 15:31:12 by RouterOS 3.22
# software id = HU6I-XPT
#
/ip firewall mangle
add action=mark-connection chain=forward comment="P2P\CF\DE\D6\C6" disabled=\
no new-connection-mark=p2pCOM p2p=all-p2p passthrough=yes
add action=mark-packet chain=forward comment="P2P\CF\DE\D6\C6" \
connection-mark=p2pCOM disabled=no new-packet-mark=p2p passthrough=yes
add action=mark-packet chain=prerouting comment=\
"\B1\EA\BC\C7\CB\F9\D3\D0\CA\FD\BE\DD\B0\FC" disabled=no new-packet-mark=\
all-mark passthrough=yes
add action=mark-connection chain=prerouting comment="\D0\A1\B0\FC" disabled=\
no new-connection-mark=all_icmp_con passthrough=yes protocol=icmp
add action=mark-packet chain=prerouting comment="" connection-mark=\
all_icmp_con disabled=no new-packet-mark=all_icmp_pack passthrough=no
add action=mark-connection chain=prerouting comment="\CD\F8\D2\B3\B0\FC" \
disabled=no dst-port=80 new-connection-mark=all_80_con passthrough=yes \
protocol=tcp
add action=mark-packet chain=prerouting comment="" connection-mark=all_80_con \
disabled=no new-packet-mark=all_80_small_pack packet-size=0-512 \
passthrough=no
add action=mark-packet chain=prerouting comment="" connection-mark=all_80_con \
disabled=no new-packet-mark=all_80_big_pack passthrough=no
add action=mark-connection chain=prerouting comment="\C6\E4\CB\FC\B0\FC" \
disabled=no new-connection-mark=all_other_con passthrough=yes
add action=mark-packet chain=prerouting comment="" connection-mark=\
all_other_con disabled=no new-packet-mark=all_other_small_pack \
packet-size=0-512 passthrough=no
add action=mark-packet chain=prerouting comment="" connection-mark=\
all_other_con disabled=no new-packet-mark=all_other_big_pack passthrough=\
no
/queue type
add kind=pcq name=PCQ_up pcq-classifier=src-address pcq-limit=50 pcq-rate=\
1000000 pcq-total-limit=2000
add kind=pcq name=PCQ_down pcq-classifier=dst-address pcq-limit=50 pcq-rate=\
3000000 pcq-total-limit=2000
add kind=pcq name=PCQ_limit pcq-classifier=dst-address pcq-limit=50 pcq-rate=\
10 pcq-total-limit=2000
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=Down packet-mark="" parent=ether1 priority=8 queue=\
PCQ_down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=icmp_d packet-mark=all_icmp_pack parent=Down priority=1 \
queue=PCQ_down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=80_small_d packet-mark=all_80_small_pack parent=Down \
priority=2 queue=PCQ_down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=80_big_d packet-mark=all_80_big_pack parent=Down \
priority=3 queue=PCQ_down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=other_small_d packet-mark=all_other_small_pack parent=\
Down priority=4 queue=PCQ_down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=other_big_d packet-mark=all_other_big_pack parent=Down \
priority=5 queue=PCQ_down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=Up packet-mark="" parent=ether1 priority=8 queue=PCQ_up
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=icmp_u packet-mark=all_icmp_pack parent=Up priority=1 \
queue=PCQ_up
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=80_small_u packet-mark=all_80_small_pack parent=Up \
priority=2 queue=PCQ_up
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=80_big_u packet-mark=all_80_big_pack parent=Up priority=\
3 queue=PCQ_up
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=other_small_u packet-mark=all_other_small_pack parent=Up \
priority=4 queue=PCQ_up
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=other_big_u packet-mark=all_other_big_pack parent=Up \
priority=5 queue=PCQ_up
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=\
2000000 max-limit=2000000 name=p2pW packet-mark=p2p parent=ether1 \
priority=8 queue=PCQ_down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=\
2000000 max-limit=2000000 name=p2pL packet-mark=p2p parent=ether2 \
priority=8 queue=PCQ_up
/tool traffic-monitor
add comment="" disabled=no interface=ether1 name=hight on-event="/queue type s\
et pcq-rate=7000000\r\
\n/queue type set pcq-rate=3000000\r\
\n:log info \"\A1\BC\D2\D1\C7\D0\BB\BB\B3\C9 \B6\AF\CC\AC\CF\C2\D4\D8 \B8\
\DF\CB\D9\A1\BD\"" threshold=5000000 traffic=received trigger=below
add comment="" disabled=no interface=ether1 name=mid on-event="/queue type set\
pcq-rate=3000000\r\
\n/queue type set pcq-rate=1000000\r\
\n:log info \"\A1\BC\D2\D1\C7\D0\BB\BB\B3\C9 \B6\AF\CC\AC\CF\C2\D4\D8 \D6\
\D0\CB\D9\A1\BD\"" threshold=9000000 traffic=received trigger=above
add comment="" disabled=no interface=ether1 name=low on-event="/queue type set\
pcq-rate=1000000\r\
\n/queue type set pcq-rate=500000\r\
\n:log info \"\A1\BC\D2\D1\C7\D0\BB\BB\B3\C9 \B6\AF\CC\AC\CF\C2\D4\D8 \B5\
\CD\CB\D9\A1\BD\"" threshold=14000000 traffic=received trigger=above
给点注释吧,不然很多新手(我算一个)读不懂。 收起來!以後當做參考! PCD限速原来是这样的?比PCQ高级?学习了。 :lol 这个好像不对吧?导不进去的? 学习了:) 支持晒东西 支持晒东西 给点注释吧,看不懂 给点注释吧,看不懂 不懂围观中!! 学习,分享精神
页:
[1]