資源描述:
《ros軟路由常用腳本集合》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在應用文檔-天天文庫。
1、ROS軟路由常用腳本集合轉載自:創(chuàng)意安天論壇看完請指出錯誤??以及自己感想??如果自己有什么好的想法不妨說出來RouterOS監(jiān)控腳本,斷線報警,線路恢復自動解除報警:在/systemscript里添加腳本name=你要監(jiān)控的ip內(nèi)容如下:seti0:while($i=0)do={:beeplength=2sfrequency=2755;:delay5;:setaabc;:foreachiin=[/toolnetwatchfindhost=你要監(jiān)控的ip]do={:seta[/toolnetwatchget$i
2、status]};:put$a;:if($a=up)do={:seti1}}然后再在/toolnetwatch里添加監(jiān)控host=你要監(jiān)控的ip在down里填寫/systemscriptrun你要監(jiān)控的ip:setshendown1[/systemclockgetdate]:setshendown2[/systemclockgettime]:setshendown("你要監(jiān)控的ipdown".$shendown1."".$shendown2):logwarning$shendownROS小包策略:/ipfirewa
3、llmangleaddchain=forwardprotocol=tcptcp-flags=synaction=change-mssnew-mss=1440??comment=""disabled=noaddchain=forwar**2*=all-p2paction=mark-connection??new-connection-mark=p2p_connpassthrough=yescomment=""disabled=noaddchain=forwardconnection-mark=p2p_connacti
4、on=mark-packet??new-packet-mark=p2ppassthrough=yescomment=""disabled=noaddchain=forwardconnection-mark=!p2p_connaction=mark-packet??new-packet-mark=generalpassthrough=yescomment=""disabled=noaddchain=forwardpacket-size=32-512action=mark-packetnew-packet-mark=s
5、mall??passthrough=yescomment=""disabled=noaddchain=forwardpacket-size=512-1200action=mark-packetnew-packet-mark=big??passthrough=yescomment=""disabled=no/queuetreeaddname="p2p1"parent=wanpacket-mark=p2plimit-at=600000queue=default??priority=8max-limit=800000bu
6、rst-limit=0burst-threshold=0burst-time=0s??disabled=noaddname="p2p2"parent=lanpacket-mark=p2plimit-at=800000queue=default??priority=8max-limit=600000burst-limit=0burst-threshold=0burst-time=0s??disabled=noaddname="ClassA"parent=lanpacket-mark=""limit-at=0queue
7、=default??priority=8max-limit=100000000burst-limit=0burst-threshold=0??burst-time=0sdisabled=noaddname="ClassB"parent=ClassApacket-mark=""limit-at=0queue=default??priority=8max-limit=0burst-limit=0burst-threshold=0burst-time=0s??disabled=noaddname="Leaf1"paren
8、t=ClassApacket-mark=generallimit-at=0queue=default??priority=7max-limit=0burst-limit=0burst-threshold=0burst-time=0s??disabled=noaddname="Leaf2"parent=ClassBpacket-mark=smalllimit-