Community discussions

MikroTik App
 
IntraLink
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri May 28, 2004 5:44 pm
Location: Utah Valley
Contact:

Need quick script to bounce Interface

Fri Mar 09, 2007 9:46 pm

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!
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Fri Mar 09, 2007 11:23 pm

/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
 
IntraLink
Member Candidate
Member Candidate
Topic Author
Posts: 113
Joined: Fri May 28, 2004 5:44 pm
Location: Utah Valley
Contact:

Fri Mar 09, 2007 11:55 pm

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?
 
User avatar
mneumark
Member
Member
Posts: 370
Joined: Thu Jun 08, 2006 7:20 am
Location: Escalon, CA
Contact:

Sat Mar 10, 2007 9:16 am

Have you tried running torch to see if there is any traffic that sticks out?
 
dawam
Trainer
Trainer
Posts: 134
Joined: Wed May 31, 2006 1:40 pm
Location: Malaysia

Sat Mar 10, 2007 2:50 pm

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 "]
 
voip4life
Frequent Visitor
Frequent Visitor
Posts: 52
Joined: Fri Dec 16, 2005 11:52 pm
Location: US

Mon Apr 09, 2007 12:47 am

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
 
luka5z
just joined
Posts: 12
Joined: Sat Aug 26, 2006 11:50 pm

Sat Apr 14, 2007 11:49 pm

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.
 
luka5z
just joined
Posts: 12
Joined: Sat Aug 26, 2006 11:50 pm

Sun Apr 15, 2007 12:27 pm

Ok, done...

Who is online

Users browsing this forum: No registered users and 11 guests