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”] }
}