ROS常用脚本命令分享ros脚本怎么使用




ROS常用脚本命令分享ros脚本怎么使用

2022-07-21 2:00:01 网络知识 官方管理员
ROS一些常用脚本
/ipfirewallconnection{:foreachrin=[find]do={remove$r}}删除所有连接

:foreachiin=[/ipfirewallfilterfindaction=drop]do=[/ipfirewallfilterdisable$i]disable防火墙规则

firewallconnectiontrackingsynsendtime设置成50rectime设置成30减轻syn攻击

/systemscheduleraddname=rebootinterval=24hstart-time=06:59:00on-event={/systemreboot}disabled=no定时重起

/iprouteset[/iproutefinddst-address=0.0.0.0/0]gateway=xxx.xxx.xxx.xxx改变默认网关

/queuesimpleremove[find]删除所有SimpleQueues

:foreachiin=[/iparpfinddynamic=yes]do={/iparpaddcopy-from=$i}ARP绑定(静态ARP)


每个IP加一个simplequeue的脚本

:foreachiin[/queuesimplefind]\
do{:put(deleting.....[/queuesimpleget$iname]);
queuesimpleremove$i;}

forifrom1to254\
do{\
:if($i!=100)\
do{/queuesimpleadd\
name=(queue.$i)\
limit-at=128000/128000\
burst-threshold=384000/192000\
max-limit=512000/256000\
burst-limit=2000000/512000\
burst-time=16s/8s\
dst-address=(192.168.0..$i);\
:put(192.168.0..$i.....added)}\
}
ROS其他参数:

使用:
WinBox-System-Scripts-+
Name(脚本名程)
Source(脚本)
OK-选择要运行的脚本-RunScript

集体绑定ARP
:foreachiin=[/iparpfinddynamic=yes]do={/iparpaddcopy-from=$i}
集体帮定ARP,这样方便了很多,但是值得注意的是,用这命令绑定之后,要把外网的ARP解除了,要不然会出奇怪问题,反正我是遇见了!

限速脚本:
:foraaafrom2to254do={/queuesimpleaddname=(queue.$aaa)dst-address=(192.168.0..$aaa)limit-at=0/0max-limit=2000000/2000000}

说明:
aaa是变量
2to254是2~254
192.168.0..$aaa是IP
上两句加起来是192.168.0.2~192.168.0.254
max-limit=2000000/2000000是上行/下行


删除所有连接
/ipfirewallconnection{:foreachrin=[find]do={remove$r}}

disable防火墙规则
:foreachiin=[/ipfirewallfilterfindaction=drop]do=[/ipfirewallfilterdisable$i]


定时重起
/systemscheduleraddname=rebootinterval=24hstart-time=11:59:00on-event={/systemreboot}disabled=no

改变默认网关
/iprouteset[/iproutefinddst-address=0.0.0.0/0]gateway=xxx.xxx.xxx.xxx

定时重起
/systemscheduleraddname=rebootinterval=24hstart-time=11:59:00on-event={/systemreboot}disabled=no


/syreset恢复路由原始状态

/syreboot重启路由

/syshowdown关机

/syidesetname=机器名设置机器名

/export查看配置

/ipexport查看IP配置

/sybackup回车savename=你要设置文件名LOADNAME=你要设置文件名备份路由

/inte***ceprint查看网卡状态
0Xether1ether1500这个是网卡没有开启
0Rether1ether1500这个是正常状态

/inten0激活0网卡

/intdi0激活0网卡

/ipfirconprint查看当前所有网络边接

/ipservicesetwwwport=81改变www服务端口为81

/iphotspotuseraddname=user1password=1增加用户
ROUTERos改本机网卡MAC的方法:
interfaceethernet>set(网卡名)mac-address=(你想要的MAC)

机房经常提出这种要求,这节课要求上网,下节课就要求断网。以前就是拨网线,后来用了这个就不用了。并且可以上网时,也能控制学生上联众或者QQ。课后机房开放时即要能上网,还要能上QQ,把这些策略禁止掉就行了。

发表评论:

最近发表
网站分类
标签列表