ROS常用脚本命令分享
所属分类:
网络 / 路由器
阅读数:
2051
收藏 0赞 0分享
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,把这些策略禁止掉就行了。
怎么把两台TP LINK无线路由器中继桥接?
怎么把两台TP LINK无线路由器中继桥接?现在公司要求将两台TP-LINK无线路由器实现中继连接以实现覆盖更多区域的目的,该怎么实现呢?下面分享详细的设置方法,需要的朋友可以参考下
收藏 0赞 0分享
新入手的无线路由器该怎么设置与调节?
新入手的路由器该怎么设置与调节?刚入手一个路由器想捯饬捯饬,所以整理成了一片文章,讲述了无线路由器的安装与调试过程,需要的朋友可以参考下
收藏 0赞 0分享
路由器TL-WR842N该怎么设置连网?
路由器TL-WR842N该怎么设置连网?新入手TL-WR842N不知道该怎么设置,今天我们就来看看设置宽带账号密码登录、固定IP登录、自动获取IP地址,需要的朋友可以参考下
收藏 0赞 0分享
家用无线路由器的配置和常见问题汇总
家用无线路由器现在是很常用的东西,基本上每家有网的朋友都会需要,但是很多人不知道怎么配置路由器,在使用的时候遇到问题该怎么解决,今天我们就来看看家用无线路由器的详细配置方法,和常见的一些问题汇总,需要的朋友可以参考下
收藏 0赞 0分享
路由器wan端口网关未连接电脑无法上网该怎么办?
路由器wan端口网关未连接电脑无法上网该怎么办?出现这种问题的原因有很多,比如账号密码不对,没有设置自动湖区地址,或者是路由器的问题,今天我们就来看看怎么解决这个问题,需要的朋友可以参考下
收藏 0赞 0分享
查看更多