Community discussions

MikroTik App
 
derr12
Member
Member
Topic Author
Posts: 411
Joined: Fri May 01, 2009 11:32 pm

Restart wlan interface in event of ping failure.

Wed Feb 06, 2013 10:36 pm

Hello, We have some P2MP links that occasionally go unresponsive or high packet loss. Rather than using a watchdog timer on an IP (Sometimes the unit will hang on restart) im monitering ive decided to try making my very first script. It works as intended:
I have a netwatch watching a local IP "10.0.0.2" If that connected client should stop being reachable it executes the following script:

:if ([/ping 10.0.0.2 interval=1 count= 45] <30) do={ log info "disabled Wlan1" ; /interface disable wlan1 ; delay 15 ; /system script run wlan1_start

}

and I made a second script to activate after the delay command in the first;

log info "startingWlan1" ; /interface enable wlan1
 
VARELA
newbie
Posts: 49
Joined: Mon Jan 14, 2008 12:39 pm

Re: Restart wlan interface in event of ping failure.

Thu Feb 07, 2013 10:49 am

Try Netwatch http://wiki.mikrotik.com/wiki/Netwatch. You can change interval and timeout.
And On Down event run
/interface disable wlan1; :delay 5; /interface enable wlan1; :log info "wlan1 restarted"
But it is temporary solution.
Set for wlan1 adaptive-noise-immunity=ap-and-client-mode.
Try Scan and Frequency usage to set optimal frequency.
Etc.
 
derr12
Member
Member
Topic Author
Posts: 411
Joined: Fri May 01, 2009 11:32 pm

Re: Restart wlan interface in event of ping failure.

Mon Feb 11, 2013 7:29 pm

I want it watching for high packet loss too, not just downtime. Likewise I dont want it pre-maturely thinking it's down just because my watch ip decides he wants to fire up a torrent and he gets a few packets dropped as a result.


This is temporary. Eventually all these subs will get migrated to our licenced 3.65 moto gear and get off this 2.4ghz poo and i wont have to worry about writing scripts for misbehaving AP's.

Who is online

Users browsing this forum: No registered users and 18 guests