Hi All,
here is one more example of channels switching (fail-over), Multi-VPN switcher, see attach.
Can be useful for scripting funs. And may be also for switching VPN channels %)
https://www.mikrotik-club.in.ua/2018/02/13/multi-vpn-channels-switcher-failover/ (in Russian)
1. Import and set/tune parameters in vpn-tunnel-check and vpn-interfaces scripts:
vpn-tunnel-check :
gw - what to ping
cnt2ping - how much too ping
minlevel - minimum allowed successful ping to count channel alive
vpn-interfaces
_imask _- mask for switched channels. For example “^VPN*” means channels, starting from “VPN” in their name.
_delayBeforeChecks _- delay between enabling of channel and starting it’s health check.
_checkIfRunning _- will we check “running” status. Makes sense for pptp/l2tp.
runningDelay - delays between “running” checks
_runningMaxCount _- how long we will wait for “running”=true
checkIfPing - will we check health of channel by pinging.
_checkPing2Interface _- will we specify interface during ping. I.e. will we ping via concrete interface.
_ping2host _- host to be pinged
pingMaxCount - how much to ping
pingMinCount - minimal successful pings to count channel alive
2. Check scripts vpn-tunnel-check and vpn-interfaces by running them from terminal.
3. Enable_ vpn-check-task_ scheduler task.
VPN_switcher_v1.0.zip (2.02 KB)