Pages

Thursday, July 12, 2018

MikroTik Multiple Gateway redundancy failover by Netwatch and firewall




MikroTik Multiple Gateway redundancy by Netwatch and firewall

* Exampe two WAN Internet
ether1 = wan1 = GW IP 192.168.10.1
ether2 = wan2 = GW IP 172.16.1.1\

* First make sure source gw ip not reachable via another interface ...

/ip firewall filter add chain output dst-address = 192.168.10.1 out-interface=ether1 action=accept
/ip firewall filter add chain output dst-address = 192.168.10.1  action=drop


/ip firewall filter add chain output dst-address = 172.16.1.1 out-interface=ether2 action=accept
/ip firewall filter add chain output dst-address = 172.16.1.1  action=drop


** Then create rules for ip -> route with gateway priority

** Then create netwatch to check evry 5 seconds
/tool netwatch host=192.168.10.1 interval 00:00:05 UP=/ip route enable 0 Down= /ip route disable 0
/tool netwatch host=172.6.1.1 interval 00:00:05 UP=/ip route enable 1 Down= /ip route disable 1



No comments:

Post a Comment