S
S
Sergey2015-03-06 17:37:36
Mikrotik
Sergey, 2015-03-06 17:37:36

Need help writing script for Mikrotik. What is the best way to implement the task?

Situevina next. We have one state institution for children. The installation of the network around the building was completed and at the same time the wafer was installed. Since children spend most of their lives there. BUT! For a number of reasons, the director wants to remove her. Motivating that let them put it at home when they leave this place. I disagree (not discussed). Children will be provided with a 100 megabit home channel. Which is paid by me. Due to the fact that there is only one gateway ... respectively, the institution itself is sitting on this channel (although they have their own, but this has nothing to do with the case). The task is the following ... you need a script that will monitor the Wi-Fi access point ... in the event of the disappearance of one of them (the management of the institution will be twisted stupidly) ... to check for the presence of a switch ... if the switch is on the network, then turn off the external channel by sending a letter to the soap about which point was lost sight of. And turn on the external l2tp connection after the access point returns to its place. Anyone who can help with the writing... or has more interesting ideas, I'm open to hearing.
the script should run in cycles.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Armenian Radio, 2015-03-06
@gbg

The general algorithm is this - we start via cron, ping the points. If the ping returned 0 - success, the point answered. If we got zero from all points, we do ifup to the interface (it doesn’t matter to the interface that has already been raised, otherwise we do ifdown) You
can also naturally raise nagios, it can also execute commands on the hardware dump event, and send angry letters.

I
Ilya Efimov, 2015-03-06
@A_M

Well, in relation to Mikrotiks, it will be most convenient to implement this through netwatch. One rule per AP. If you need the text of the script, please formalize the task (what needs to be done point by point).

R
rt001, 2015-03-07
@rt001

if there are many points, it is advisable to raise CAPsMAN and on the control router (master) monitor the events of dumping and connecting points by adding a filter to this case to the log, and the script will respond to this event
as an example: here is a way to send a message to soap about able vpn channel
forum.mikrotik.com/viewtopic.php?t=47854

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question