ROS常用脚本命令分享

摘要:这篇文章主要介绍了ROS常用脚本命令,需要的朋友可以参考下……

详情:ROS 一些常用脚本: / ip firewall connection {:foreach r in=[find] do={remove $r}} 删除所有连接 :foreach i in=[/ip firewall filter find action=drop ] do=[/ip firewall filter disable $i] disable防火墙规则 firewall connection tracking syn sendtime 设置成50 rectime 设置成30 减轻syn攻击 /system scheduler add name=reboot interval=24h start-time=06:59:00 on-event={/system reboot} disabled=no 定时重起 /ip route set [/ip route find dst-address=0.0.0.0/0] gateway=xxx.xxx.xxx.xxx 改变默认网关 /queue simple remove [find] 删除所有Simple Queues :foreach i in=[/ip arp find dynamic=yes ] do={/ip arp add copy-from=$i} ARP绑定(静态ARP) 每个IP加一个simple queue的脚本 :foreach i in [/queue simple find] \ do {:put (deleting . … . [/queue simple get $i name]); queue simple remove $i;} for i from 1 to 254 \ do { \ :if ($i!=100) \ do {/queue simple add \ 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-选择要运行的脚本-Run Script 集体绑定ARP :foreach i in=[/ip arp find dynamic=yes ] do={/ip arp add copy-from=$i} 集体帮定ARP,这样方便了很多,但是值得注意的是,用这命令绑定之后,要把外网的ARP解除了,要不然会出奇怪问题,反正我是遇见了! 限速脚本: :for aaa from 2 to 254 do={/queue simple add name=(queue . $aaa) dst-address=(192.168.0. . $aaa) limit-at=0/0 max-limit=2000000/2000000} 说明: aaa是变量 2 to 254是2~254 192.168.0. . $aaa是IP 上两句加起来是192.168.0.2~192.168.0.254 max-limit=2000000/2000000是上行/下行 删除所有连接 / ip firewall connection {:foreach r in=[find] do={remove $r}} disable防火墙规则 :foreach i in=[/ip firewall filter find action=drop ] do=[/ip firewall filter disable $i] 定时重起 /system scheduler add name=reboot interval=24h start-time=11:59:00 on-event={/system reboot} disabled=no 改变默认网关 /ip route set [/ip route find dst-address=0.0.0.0/0] gateway=xxx.xxx.xxx.xxx 定时重起 /system scheduler add name=reboot interval=24h start-time=11:59:00 on-event={/system reboot} disabled=no /sy reset 恢复路由原始状态 /sy reboot 重启路由 /sy showdown 关机 /sy ide set name=机器名 设置机器名 /export 查看配置 /ip export 查看IP配置 /sy backup 回车 save name=你要设置文件名 LOAD NAME=你要设置文件名 备份路由 /inte***ce print 查看网卡状态 0 X ether1 ether 1500 这个是网卡没有开启 0 R ether1 ether 1500 这个是正常状态 /int en 0 激活0网卡 /int di 0 激活0网卡 /ip fir con print 查看当前所有网络边接 /ip service set www port=81 改变www服务端口为81 /ip hotspot user add name=user1 password=1 增加用户 ROUTERos改本机网卡MAC的方法: interface ethernet> set (网卡名) mac-address=(你想要的MAC) 机房经常提出这种要求,这节课要求上网,下节课就要求断网。以前就是拨网线,后来用了这个就不用了。并且可以上网时,也能控制学生上联众或者QQ。课后机房开放时即要能上网,还要能上QQ,把这些策略禁止掉就行了。

ROS常用脚本命令分享

以上内容由WiFi之家网整理收藏!

原创文章,作者:路由器,如若转载,请注明出处:https://www.224m.com/227792.html

(0)
路由器路由器
上一篇 2022年12月2日
下一篇 2022年12月2日

相关推荐