Page 1 of 1

Need quick script to bounce Interface

Posted: Fri Mar 09, 2007 9:46 pm
by IntraLink
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!

Posted: Fri Mar 09, 2007 11:23 pm
by changeip
/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

Posted: Fri Mar 09, 2007 11:55 pm
by IntraLink
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?

Posted: Sat Mar 10, 2007 9:16 am
by mneumark
Have you tried running torch to see if there is any traffic that sticks out?

Posted: Sat Mar 10, 2007 2:50 pm
by dawam
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 "]

Posted: Mon Apr 09, 2007 12:47 am
by voip4life
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

Posted: Sat Apr 14, 2007 11:49 pm
by luka5z
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.

Posted: Sun Apr 15, 2007 12:27 pm
by luka5z
Ok, done...