poniedziałek, 16 kwietnia 2012

Mikrotik script for monitoring Internet connection and using backup connection when primary is dead

Ten post jest dostępny jedynie w języku angielskim.
Idea is simple. Script (I run it every 2 minutes via scheduler) sends ping to 3 defined locations. When all 3 locations are dead it supposses that connection is broken somewhere outside. In this case script enables firewall mangle rule that marks packets with 'failover' label. In routing table you have to add routing for 'failover' label using your backup interface. You have to add 'failover' routing for all your local interfaces - otherwise you local routing won't work when main connection will be dead.

You have to setup few variables at the beginning of the script and 'backupinterfacename' in the script body.

You can find script here -> https://github.com/codepill/script-utilities/blob/master/mikrotik/connection-watch

Brak komentarzy:

Prześlij komentarz