欢迎来到天天文库
浏览记录
ID:13090961
大小:59.00 KB
页数:21页
时间:2018-07-20
《473_ros软路由常用脚本的集合操作》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、473_ROS软路由常用脚本集合ROS软路由常用脚本集合RouterOS监控脚本,断线报警,线路恢复自动解除报警:在/systemscript里添加脚本name=你要监控的ip内容如下:seti0:while($i=0)do={:beeplength=2sfrequency=2755;:delay5;:setaabc;:foreachiin=[/toolnetwatchfindhost=你要监控的ip]do={:seta[/toolnetwatchget$istatus]};:put$a;:if($a=up)do={:seti1}}然后再在/toolnetwatch里添加监控host=你
2、要监控的ip在down里填写/systemscriptrun你要监控的ip:setshendown1[/systemclockgetdate]:setshendown2[/systemclockgettime]:setshendown("你要监控的ipdown".$shendown1."".$shendown2):logwarning$shendownROS小包策略:/ipfirewallmangleaddchain=forwardprotocol=tcptcp-flags=synaction=change-mssnew-mss=1440comment=""disabled=noaddcha
3、in=forwar**2*=all-p2paction=mark-connectionnew-connection-mark=p2p_connpassthrough=yescomment=""disabled=noaddchain=forwardconnection-mark=p2p_connaction=mark-packetnew-packet-mark=p2ppassthrough=yescomment=""disabled=noaddchain=forwardconnection-mark=!p2p_connaction=mark-packetnew-packet-mark=gene
4、ralpassthrough=yescomment=""disabled=noaddchain=forwardpacket-size=32-512action=mark-packetnew-packet-mark=smallpassthrough=yescomment=""disabled=noaddchain=forwardpacket-size=512-1200action=mark-packetnew-packet-mark=bigpassthrough=yescomment=""disabled=no/queuetreeaddname="p2p1"parent=wanpacket-m
5、ark=p2plimit-at=600000queue=defaultpriority=8max-limit=800000burst-limit=0burst-threshold=0burst-time=0sdisabled=noaddname="p2p2"parent=lanpacket-mark=p2plimit-at=800000queue=defaultpriority=8max-limit=600000burst-limit=0burst-threshold=0burst-time=0sdisabled=noaddname="ClassA"parent=lanpacket-mark
6、=""limit-at=0queue=defaultpriority=8max-limit=100000000burst-limit=0burst-threshold=0burst-time=0sdisabled=noaddname="ClassB"parent=ClassApacket-mark=""limit-at=0queue=defaultpriority=8max-limit=0burst-limit=0burst-threshold=0burst-time=0sdisabled=noaddname="Leaf1"parent=ClassApacket-mark=generalli
7、mit-at=0queue=defaultpriority=7max-limit=0burst-limit=0burst-threshold=0burst-time=0sdisabled=noaddname="Leaf2"parent=ClassBpacket-mark=smalllimit-at=0queue=defaultpriority=5max-limit=0burst-limit=0burst-th
此文档下载收益归作者所有