Community discussions

MikroTik App
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 19099
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

FAIIL OVER - Partial BYPASS

Sat Apr 17, 2021 9:59 pm

(1) Network Scenario: Two WANS, multiple LAN subnets. WAN1 is primary, WAN2 is failover.

(2) Requirement: Subnet X must use WAN2 (not WAN1). Finally, Subnet X, however, may use WAN1 if WAN2 is down. Recursive is optional.

(3) Solution Development.
(a) Add two routes with WAN1 being primary (aka shortest distance).
add dst-address=0.0.0.0/0 distance=5 gateway=primary_GW_ISP1
add dst-address=0.0.0.0/0 distance=10 gateway=secondary_GW_ISP2

(b) add failover capability such that when WAN1 is down traffic will go automatically to WAN2, but the router will keep checking to see when WAN1 will be backup and if so move traffic to WAN1.
add check-gateway=ping dst-address=0.0.0.0/0 distance=5 gateway=primary_GW_ISP1
add dst-address=0.0.0.0/0 distance=10 gateway=secondary_GW_ISP2

(c) Add recursive routing such that instead of checking ISP availability, the router is actually checking real world internet activity via DNS IP 9.9.9.9
add check-gateway=ping distance=5 gateway=9.9.9.9
add distance=5 dst-address=9.9.9.9/32 gateway=primary_GW_ISP1
add distance=10 gateway=secondary_GW_ISP2

(d) Ensure subnet X, only goes out WAN2, by using another route rule with a Routing-Mark and a Route Rule.
add check-gateway=ping distance=5 gateway=9.9.9.9
add distance=5 dst-address=9.9.9.9/32 gateway=primary_GW_ISP1
add distance=10 gateway=secondary_GW_ISP2
add distance=10 gateway=secondary_GW_ISP2 Routing-Mark=bypass

(e) Route Rule: Create a Table for subnet X traffic for FSB look up purposes..............
Source Address=subnet X (e.g. 192.168.x.0/24)
Action=Lookup-Only-In-Table
Table=bypass

(f) Ensure subnet X can access WAN1 if WAN2 is offline.
I should not need to do any further configuration. According to the documentation if WAN2 is offline, or inactive or NOT REACHABLE, the router will IGNORE this route and look for an available Route. The router should find the Route to WAN1 and see an available/reachable gateway and then route all subnet X traffic through WAN1.

Q. I am pretty sure about sub-para's (a) thru (e) but need confirmation that my assumption at sub-para (f) is correct?????

[ Of course if anything else is wrong, please advise. ]
[ If there is a different way to accomplish same, am interested! ]

Who is online

Users browsing this forum: 4l4R1, CodeAlpha, Majestic-12 [Bot] and 36 guests