Need quick script to bounce Interface

My external interface named EXTERNAL sometimes has problems where I need to disable it and re-enable to get it working again.

I was thinking of using Netwatch on an external IP, but need a quick simple script to disable this interface, wait 5 seconds then re-enable it.

Any help is appreciated!

/interface ethernet set [/interface ethernet find name=INTERFACE] disabled=yes
:delay 5
/interface ethernet set [/interface ethernet find name=INTERFACE] disabled=no

I would probably figure out why it stops working rather than bandaid it : )

Sam

Thanks a ton for the quick response.

I’ve tried figuring out why it is doing this, but have no earthly idea.

Doesn’t seem to cause any errors in MT in the logs.

I’m guessing something internal to MT.

Or the router facing me from my provider.

It simple stops receiving on that interface out of the blue. Then I bounce it and it’s back running at 20Mbps…

Maybe ARP poisoning?

Have you tried running torch to see if there is any traffic that sticks out?

I got the same problem as you Intralink.

Its RB532 on ether2, everytime after every reboot or power outage. Ether1 works find, backhaul thru wlan.

RB is 400km away,
might just replace the RB on my next visit

using this script( found it somewhere in the forum)

check if no-link and enable

tested working

:global g1 “na”
/interface ethernet monitor [find name=local] once do={:set g1 $status}
:if ($g1=“no-link”) do=[/int ether disable local;/int ether enable local]
#/log info "interface local is no-link "]

I’ve seen the same problem on one of our links happening about once a month. Both sides running 2.9.40, local RB532 (1) feeds backhaul to remote RB532 (2) then ethernet to RB532 (3) which connects to other AP’s on the tower and to PC Mikrotik router at the base of the tower (4). When the whole tower site goes down, I can log into (2) and disable the interfaces to (3) and (4) and then re-enable them, it all comes back up.

Maybe an ARP or STP problem? No info in logs

It is possible to make script like that:

:if ( /interface wireless registration-table find signal-strength=-69dBm@24Mbps  interface=wlan2-5GHz ) do= { system reboot }

I want try to set the scheduler to check the wlan signal strenght on reg-table and if it bad - like -80 do… something.

Sor for ENG.

Ok, done…