547602543z 发表于 2009-11-23 16:54

ROS常用命令

ROs常用命令2007-07-25 10:44RouterOS监控脚本,断线报警,线路恢复自动解除报警:

在/system script里添加脚本

name=你要监控的ip

内容如下

:set i 0

:while ($i=0) do={:beep length=2s frequency=2755;:delay 5;:set a abc;\

:foreach i in= \

do={:set a };:put $a;:if($a=up) do={:set i 1}}

然后再在/tool netwatch里添加监控

host=你要监控的ip

在down里填写

/system script run 你要监控的ip

:set shendown1

:set shendown2

:set shendown ("你要监控的ip down " . $shendown1 . " " . $shendown2)

:log warning $shendown

ROS小包策略:

/ ip firewall mangle

add chain=forward protocol=tcp tcp-flags=syn action=change-mss new-mss=1440 comment="" disabled=no

add chain=forwar* *2*=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=wan packet-mark=p2p limit-at=600000 queue=default priority=8 max-limit=800000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no

add name="p2p2" parent=lan packet-mark=p2p limit-at=800000 queue=default priority=8 max-limit=600000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no

add name="ClassA" parent=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

等下接着发!


ROS封杀常用P2P策略脚本:

/ ip firewall filter

add chain=input protocol=udp dst-port=137-138 action=drop comment="drop udp137-138"

# 讯雷

add chain=forward protocol=tcp dst-port=3076-3079 action=drop comment="downTools Xunlei" disabled=yes

add chain=forward dst-address=202.96.155.91/32 action=drop

add chain=forward dst-address=210.22.12.53/32 action=drop

add chain=forward dst-address=61.128.198.97/32 action=drop

# 电骡

add chain=forward protocol=tcp dst-port=4661 action=drop comment="downP2P VeryCD"

add chain=forward protocol=tcp dst-port=4662 action=drop

add chain=forward protocol=tcp dst-port=4242 action=drop

add chain=forward dst-address=62.241.53.15/32 action=drop

# 屁屁狗(PPGOU)

add chain=forward protocol=tcp dst-port=8505 action=drop comment="downTools PPGOU"

add chain=forward dst-address=219.153.0.152/32 action=drop

add chain=forward dst-address=61.145.116.186/32 action=drop
页: [1]
查看完整版本: ROS常用命令