Community discussions

MikroTik App
 
wannalearn
just joined
Topic Author
Posts: 2
Joined: Mon Mar 07, 2005 7:08 pm

not running interface

Mon Mar 07, 2005 7:11 pm

Is there a way to see if interfaces are running or not? (My AR5213s are often not running, but a disable-enable solve the problem)
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 986
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Tue Mar 08, 2005 10:39 am

 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Tue Mar 08, 2005 11:03 am

the "R" next to the wireless interface name (running) means that there is somebody connected and not that the interface has problems. JFYI
 
gapcsi
just joined
Posts: 5
Joined: Wed May 18, 2005 3:03 pm
Location: Hungary

Mon Nov 07, 2005 10:45 am

:global u
/interface wireless monitor wlan3 once do={
  :set u $status
  }
:if ($u != "running-ap") do={
  /interface wireless disable wlan3; /interface wireless enable wlan3
  }
 
gapcsi
just joined
Posts: 5
Joined: Wed May 18, 2005 3:03 pm
Location: Hungary

Mon Nov 07, 2005 11:26 am

:global u
/interface wireless monitor wlan3 once do={
  :set u $registered-clients
  }
:if ($u = "0") do={/interface wireless disable wlan3; /interface wireless enable wlan3}
 
pier4r
just joined
Posts: 9
Joined: Sun Jul 30, 2017 3:50 pm

Re: not running interface

Sat Mar 31, 2018 12:16 pm

Sorry for "gravedigging" but this post showed up quite high when searching for "wireless enabled not running".

Therefore I add my variation to the script above, running on routerOS 6.39.2 . Maybe it helps someone else other than me. And, you know, it can be even triggering Cunningham's law.
# worked
# somehow the wifi of the hAp is recently disconnecting too often. 
# I understand restarting the system after 60 days (or maybe not?)
# but restarting it because the wifi dies every other day is a no go.
# So let*s make a watchdog
# Also forum.mikrotik.com/viewtopic.php?t=2301
:global regClients;
#no underscores!

interface wireless monitor wlan-server-home once do={
  :set regClients $"registered-clients" ;
}

:if ( $regClients  = "0") do={
#disable from slave to master
  /interface wireless disable wlan-server-home; 
  /interface wireless disable wlan-server-hl;
  /interface wireless disable wlan-main-server;

  /delay 5s;
  
#enable from master to slave
  /interface wireless enable wlan-main-server;
  /interface wireless enable wlan-server-hl;
  /interface wireless enable wlan-server-home; 
}
also a scheduler is set to check every 12 hours. (maybe too slow)

[admin@gw1-mikrotik] > system scheduler print detail 
Flags: X - disabled 

 1   name="reboot wifi" start-date=mar/31/2018 start-time=09:18:05 interval=12h 
     on-event=reboot_wifi_if_crashed owner="admin" 
     policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon run-count=0 next-run=21:18:05 
 
radenli
just joined
Posts: 19
Joined: Tue Apr 04, 2017 10:45 am

Re:

Fri Jul 20, 2018 6:01 am

:global u
/interface wireless monitor wlan3 once do={
  :set u $status
  }
:if ($u != "running-ap") do={
  /interface wireless disable wlan3; /interface wireless enable wlan3
  }
Thank you for sharing. Your script works like a charm
 
User avatar
mohannad
Frequent Visitor
Frequent Visitor
Posts: 55
Joined: Wed May 02, 2012 2:39 am
Location: Lebanon
Contact:

Re: not running interface

Sat Jul 21, 2018 3:46 pm

add comment=etherwatch timeout=1 interval=30s host=(your ip connected on the ethernet) down-script="/interface ethernet disable ether 0"
add comment=etherwatch timeout=1 interval=30s host=(your ip connected on the ethernet) down-script="/interface ethernet enable ether 0"

Who is online

Users browsing this forum: Majestic-12 [Bot] and 59 guests