RouterOS最佳化

denniswwh發表於2011-03-10

Web 80埠優先
/ip firewall mangle
add chain=prerouting protocol=tcp dst-port=80 action=mark-packet new-packet-mark=web passthrough=yes comment="web" disabled=no

/queue tree
add name="web" parent=ether1-WAN packet-mark="web" limit-at=0 queue=default priority=3 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no

小包優先
/ ip firewall mangle
add chain=forward protocol=tcp tcp-flags=syn action=change-mss new-mss=1440 comment="" disabled=no
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=ether1-WAN packet-mark=p2p limit-at=2000000 queue=default priority=8 max-limit=2000000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="p2p2" parent=ether2-LAN packet-mark=p2p limit-at=2000000 queue=default priority=8 max-limit=2000000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="ClassA" parent=ether2-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 disabled=no
add name="Leaf2" parent=ClassB packet-mark=small limit-at=0 queue=default priority=5 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="Leaf3" parent=ClassB packet-mark=big limit-at=0 queue=default priority=6 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no


1-8級優先順序控制,數字越小優先順序越高

LAN 內網介面
WAN 外網介面
SMALL 小包 32-512位元組 5級優先順序
BIG 大包 512-1200位元組 6級優先順序
general 其它包 1200-1500位元組 7級優先順序
P2P類 8級優先,全侷限速 200KB/S下載
Leaf 子類

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/124805/viewspace-1047087/,如需轉載,請註明出處,否則將追究法律責任。

相關文章