Fri Jun 11, 2021 7:05 pm
I was able to provide advice until you added the gobblity gook stuff at the bottom,
In general
where ISP_interface= etherport name, PPPOE-out name, or vlan name
/ip route
add distance=5 gateway=ISP1_interface check ping-gateway
add distance=5 gateway=ISP2_interface check ping-gateway
add distance=5 gateway=ISP1_interface route-mark=UseWan1
add distance=5 gateway=ISP2_interface route-mark=UseWan2
Route Rules
Where subnet identifier can be the source-address=subnet (192.168.X.0/24) OR is an interface= (vlanxx, etherX, bridge)
/ip route rule
add action=lookup-in-table \
subnet identifier table=UseWan1
add action=lookup-in-table \
subnet identifier table=UseWan2
OR (my prerference!)
/ip route
add distance=5 gateway=ISP1_interface check ping-gateway
add distance=10 gateway=ISP2_interface check ping-gateway
add distance=10 gateway=ISP2_interface route-mark=UseWan2
Route Rules
/ip route rule
add action=lookup-in-table \
subnet identifier table=UseWan2
The two approaches are similar but in the first one both routes are equal distance so its not clear which the router will pick for use if the main table is being used.
Therefore, one needs two route rules to ensure lan1 traffic goes to wan1 and lan2 traffic goes to wan2.
If either route becomes unavailable, the router will look for an available route in the main table for the lan without, and will provide the other ISPs routing.
When the route comes back online, reachable the ping check, the router will then set the traffic back according to the route rules.
The second approach assumes that ISP1 is the primary route in the main table and all traffic will be directed to it.
Thus we need a route rule to ensure LAN2 traffic goes to ISP2.
If ISP2 goes offline, then the router will look at the main table and direct LAN2 to ISP1 as expected.
If ISP1 goes offline, then the router will simply switch from ISP1 on the main table to ISP2 on the main table, until ISP1 comes back on line.
I would say method 2 is more efficient in that regard.
Last edited by
anav on Sat Jun 12, 2021 4:11 pm, edited 1 time in total.