beberapa script mikrotik & fungsi’nya :
Mengirimkan pesan log ke mikrotik :
/log info message=mikrotik UP;
atau
:log info "111";
Restart mikrotik :
/system reboot;
menampilkan informasi tertentu di log
:log info ("Halo Admin, konfig berhasil");
:log info ("----------------->>>> Halo Admin, konfig berhasil<<<<-----------------");
delay / nunggu script jalan lagi
:delay 10000ms; #untuk menunggu 10detik
:delay 60000ms; #untuk menunggu 60detik
contoh script unt menyalakan & mematikan Netwatch, interval 1jam,
Contoh Script “pemilihan”
/ip route set [/ip route find where dst-address=0.0.0.0/0] disabled=yes
/ip route set [/ip route find where dst-address=0.0.0.0/0 distance=6] disabled=yes
/ip route set [/ip route find where dst-address=0.0.0.0/0 di
stance=4 gateway=192.168.6.2] disabled=yes
/ip route set [/ip route find where gateway=8.8.4.4] distance=2
/ip route set [/ip route find where gateway=8.8.8.8] distance=1
/tool netwatch enable numbers=3
Merubah Loop Protection
inter ethernet edit ether2 loop-protect
default / on / off
Scheduler otomatis disable enable interface mikrotik
Contoh scheduler Script men-disable-enable interface sfp, tiap 20menit sekali
Script'nya =
/interface disable sfp1;
/delay 2000ms;
/interface enable sfp1;