Community discussions

MikroTik App
 
Denikin80
just joined
Topic Author
Posts: 10
Joined: Mon Nov 10, 2014 9:58 am

Advanced routing failover

Wed Mar 04, 2015 12:35 pm

I'am setup like in this article http://wiki.mikrotik.com/wiki/Advanced_ ... _Scripting
, but i did not understand how it's working.
The idea is that we create fake gateways (via pingable hosts ip's) and if it's not pingable then switch to alternate default route (distance 2). But i want deeply understand the mechanics of this process.
Here is my config:
[admin@MikroTik] /ip route> add dst-address=8.8.8.8/32 gateway=<ISP1 gateway ip> scope=10
[admin@MikroTik] /ip route> add dst-address=8.8.4.4/32 gateway=<ISP2 gateway ip> scope=10

[admin@MikroTik] /ip route> add distance=1 gateway=8.8.8.8 routing-mark=ISP1 check-gateway=ping
[admin@MikroTik] /ip route> add distance=2 gateway=8.8.4.4 routing-mark=ISP1 check-gateway=ping

[admin@MikroTik] /ip route> add distance=1 gateway=8.8.4.4 routing-mark=ISP2 check-gateway=ping
[admin@MikroTik] /ip route> add distance=2 gateway=8.8.8.8 routing-mark=ISP2 check-gateway=ping
[admin@MikroTik] /ip route> print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 A S  0.0.0.0/0                          8.8.8.8                   1
 1   S  0.0.0.0/0                          8.8.4.4                   2
 2   S  0.0.0.0/0                          8.8.4.4                   1
 3 A S  0.0.0.0/0                          8.8.8.8                   2
 4 ADS  0.0.0.0/0                          <ISP1 gateway ip>              0
 5  DS  0.0.0.0/0                          <ISP2 gateway ip>                  1
 6 A S  ;;; for WAN Failover purposes
        8.8.4.4/32                         <ISP2 gateway ip>                  1
 7 A S  ;;; for WAN Failover purposes
        8.8.8.8/32                         <ISP1 gateway ip>              1
 ...ommited..


 
bingo220
Member Candidate
Member Candidate
Posts: 124
Joined: Sun Sep 22, 2013 9:30 pm
Location: Ukraine

Re: Advanced routing failover

Thu Mar 05, 2015 12:28 am

Who is online

Users browsing this forum: No registered users and 49 guests