Failover Script (different subnets)

Hi - am trying to implement a failover script.. just a basic “if the primary gateway goes down then the secondary one will automatically take over until the primary gateway is operable again”

ether1 - lan users - 172.31.100.100/16
ether2 - primary isp - 10.1.1.2/8 (gateway 10.1.1.1/8)
ether3 - secondary isp - 203.114.162.11/28 (gateway 203.114.162.1/28)

I tried following instructions from http://wiki.mikrotik.com/wiki/Two_gateways_failover but it just makes the secondary gateway “unknown interface” status.. help?

Cheers
Adam

Ok nevermind it works anyway :slight_smile: Just one question though.. because my ADSL modem assigns me a private IP address (10.1.1.2) if my ADSL goes down but my modem doesnt, it will still ping through to the modem ok - but no internet. Is there anything I can do about this? Any script to ping a different address?

Hi,

I had a similiar problem, but overcame it with netwatch. Set up two instances to check different sites, like yahoo and google. These are just example sites.

You then force all icmp traffic to google over isp1 and yahoo traffic over isp2. Or just block icmp to yahoo over isp et vica verca. That way you know which one is down.

I then had netwatch just change the distance of the default gateway for failover.

Hope this helps.