Community discussions

 
efarey
just joined
Topic Author
Posts: 15
Joined: Sat Jul 14, 2012 1:01 pm

WLAN disabled if EoIP Tunnel is down

Wed Sep 18, 2013 6:22 pm

I am looking for a script that will disable the WLAN interface in a 751 if an EoIP tunnel is not running. We tunnel our wireless traffic across an EoIP tunnel and don't want the AP to broadcast an SSID it the tunnel is down. I want the script to also make sure the WLAN interface is enabled if he tunnel is up. This would make sure that the AP starts broadcasting once the tunnel comes back up.

I am very new to scripting and not sure the best way to do this. This is what I would like it to do:

1 - I would like the script to verify that the tunnel is up, if so verify WLAN is up. If both are up, stop. (Verify not enable the WLAN)
2 - If tunnel is up but WLAN is down, enable WLAN.
3 - If tunnel is down, disable WLAN.

Below is the one that I have that works. Problem is that each time it runs it seems to "mess" will the wireless clients. When I look at the clients in the wireless->registration tab they reset every time the script is run. This seems to be do to the WLAN card keep getting set to enable.

:if ([/interface eoip get [find name="EOIP_Tunnel"] running]=false) do={
/interface disable [find name="WLAN"]
} else={ :if ([/interface eoip get [find name="EOIP_Tunnel"] running]=true) do={
/interface enable [find name="WLAN"] }
}
 
User avatar
ohara
Member
Member
Posts: 371
Joined: Mon Jun 13, 2011 11:30 pm
Location: Warsaw

Re: WLAN disabled if EoIP Tunnel is down

Thu Sep 19, 2013 12:25 am

Try to add another if statement.

:if ([/interface eoip get [find name="EOIP_Tunnel"] running]=false) do={
/interface disable [find name="WLAN"]
} else={ :if ([/interface eoip get [find name="EOIP_Tunnel"] running]=true) do={

:if ([/interface wireless get [find name="WLAN"] running]=false) do={
/interface enable [find name="WLAN"]
}


}
}
 
efarey
just joined
Topic Author
Posts: 15
Joined: Sat Jul 14, 2012 1:01 pm

Re: WLAN disabled if EoIP Tunnel is down

Thu Sep 19, 2013 1:58 am

The Script runs but get the same issue with the wireless clients. The logic of the script works with regard to enabling and disabling the WLAN correctly. But if everything is up and working with clients associated to the AP when it runs their client uptime restarts in the 751 when it runs.
 
efarey
just joined
Topic Author
Posts: 15
Joined: Sat Jul 14, 2012 1:01 pm

Re: WLAN disabled if EoIP Tunnel is down

Thu Sep 19, 2013 2:06 am

Correction,

That did work. Clients are staying up when the script runs...

THanks

The Script runs but get the same issue with the wireless clients. The logic of the script works with regard to enabling and disabling the WLAN correctly. But if everything is up and working with clients associated to the AP when it runs their client uptime restarts in the 751 when it runs.

Who is online

Users browsing this forum: No registered users and 9 guests