找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 10510|回复: 0

[脚本] ROS 命令行的使用详解

[复制链接]
发表于 2016-10-29 18:37:02 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
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]
改变默认网关
/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)  
routeros
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-6-18 19:25 , Processed in 0.047648 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表