Script for resetting the PPPoE connection when down

Hello

Sometimes my PPPoE connection does not give connectivity anymore, and by manually disabling and then re-enabling it, the connectivity restarts.

Can someone give me a RouterOS script that would test if a specific PPPoE interface is enabled, then test the connectivity - for example ping 8.8.8.8 on that specific PPPoE interface

If ping is not working, that would reset the PPPeE connection (disable and re-enable)

I would run that script every minute or so.

Thanks

Go to tools → Netwatch, set router to 8.8.8.8. Go to tab “DOWN” and type the string to reset the PPPOE (/pppoe client reset, or whatever)

Enjoy

Thanks a lot, but my config is a bit more complicated than this. I have 5 different PPPoE at the same time, and I need to test each of them on a regular basis, and take appropriate action for each of them in case one fails.

I am afraid the only way would be a script.

Then make a script which adds a static route for 8.8.8.8 (or any other IP), if failed - restart pppoe 1, then make a static route for 8.8.8.8 via pppoe2 and test, if failed - restart pppoe2 … pppoeN.
Remove static route for 8.8.8.8

Put script in system → Scheduler

thanks a lot, but i have no knowledge in script language for RouterOS, hence my initial request :slight_smile:

Hehe unfortunately I suck at scripting too but maybe this can take you somewhere?

http://wiki.mikrotik.com/wiki/Manual:Scripting
http://wiki.mikrotik.com/wiki/Scripts