Advertisement
niammuddin

cek koneksi mikrotik

Aug 31st, 2022
1,260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. {
  2.     :local pingit "103.170.100.1"
  3.     :local avgRtt 0
  4.     :local comm "via_metro"
  5.     :local status [/ip route get [find comment=$comm] active]
  6.     :if ($status = false) do={
  7.         /tool flood-ping $pingit count=20 do={
  8.             :set avgRtt $"avg-rtt"
  9.             # jika avgRtt lebih besar dari 30ms maka
  10.             :if ($avgRtt > 30) do={
  11.                 :delay 1s
  12.                 /ip route disable [find comment=$comm]
  13.             }
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement