We’re having an ongoing problem with our Mikrotik devices. While I give Mikrotik credit for trying to fix it, it’s still an on-going issue for us.
Essentially we have 200 customers hanging off our AC’s (PPPoE Server) and are using dynamic routing throughout our network. The problem arises when the users all try to connect simultaneously before all the routes are up (The AC can’t contact the radius server)
I need to write a script that on-boot disables the PPPoE interface, then once it can ping the radius server it re-enables it.
I can’t seem to find any easy way to write a boot script…
For the system scheduler (which can be used to run scripts) there’s the parameter-value “startup” for the “start-time” parameter.
This let’s you execute a script directly after booting. There you could disable your PPPoE server.
Instead of running a scripts every minute or so to watch if the RADIUS server is reachable, you could instead use the netwatch feature to execute a script to enable the PPPoE server when the RADIUS server is “up” again…
You cannot use the item numbers from a “print” in a script (like the 0 you are using to reference the pppoe-server).
You have to use the “find” command.
And you can use the “find” command of this forum to find examples for the usage of RouterOS’s “find” command
Done (Was done a while ago, but I forgot to come back and show it off)
/system scheduler add name=PPPoEDown on-event={:foreach i in=[/interface pppoe-server server find] do={/interface pppoe-server server disable $i}} start-time=startup
/tool netwatch add host=[:resolve your.radius.server.com] up-script={:foreach i in=[/interface pppoe-server server find] do={/interface pppoe-server server enable $i}}
Now if we could only work out why the PPPoE on these things seems to be locking up in the first place - When this happens it takes an extra long amount of time to shut down for the reboot.