每隔2天,在01:30自动备份脚本:
/system scheduler
add disabled=no interval=2d name=autobak on-event=\
"/ file remove autobak.backup\r\
\n/ system backup save name=autobak" policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/04/2013 start-time=01:30:00
标签归档:优化

ROS统计在线用户数脚本
添加地址列表,多个网段添加一行
/ip firewall address-list
add address=192.168.1.0/24 disabled=no list=lan
add address=192.168.2.0/24 disabled=no list=lan
继续阅读

ROS 5.X自动备份,并将备份文件发送到邮箱

脚本-MikroTik RouterOS/ros-PCC自动纠错/自动更新
定期检查有效pppoe-out数,自动更新PCC标记
脚本:
继续阅读

ROS(MikroTik RouterOS)自动设置校准/同步系统时间
介NTP 是网络时间协议(Network Time Protocol),它用来同步网络设备【如计算机、手机】的时间的协议。为我们提供准确时间。因为我们的手表、手机、电脑等设备,经常会跑着跑着时间就出现了误差,或快或慢的少几秒,时间长了甚至误差过分钟。对于ROS来讲当你的ROS服务器主板电池没电或断电时间错误时,可能会比较需要这个脚本,用来从网络上校准系统时间。
操作菜单:system- ntp client

v6.x脚本:
/system clock set time-zone-name=Asia/Shanghai
:global ntpipnewp ([:resolve ntp.aliyun.com])
/system ntp client set primary-ntp=$ntpipnewp
:global ntpipnews ([:resolve time1.cloud.tencent.com])
/system ntp client set secondary-ntp=$ntpipnews
*阿里云的NTP服务器:
ntp1.aliyun.com
ntp2.aliyun.com
ntp3.aliyun.com
ntp4.aliyun.com
ntp5.aliyun.com
ntp6.aliyun.com
ntp7.aliyun.com
*腾讯云的NTP服务器:
time1.cloud.tencent.com
time2.cloud.tencent.com
time3.cloud.tencent.com
time4.cloud.tencent.com
time5.cloud.tencent.com
每月通过域名更新一次ntp server。v6.x用v7.x不需要
/sys scheduler remove ntp-server-update
/system scheduler
add interval=4w2d name=ntp-server-update on-event="/system clock set time-zone-name=Asia/Shanghai\r\
\n/system ntp client set enabled=yes primary-ntp=120.25.115.20 secondary-ntp=203.107.6.88\r\
\n:global ntpipnewp ([:resolve ntp.aliyun.com]) \r\
\n/system ntp client set primary-ntp=\$ntpipnewp\r\
\n:global ntpipnews ([:resolve time1.cloud.tencent.com]) \r\
\n/system ntp client set secondary-ntp=\$ntpipnews\r\
\n" start-date=jan/01/1990 \
start-time=03:00:00