Thu Sep 05, 2019 10:54 am
Route filters
* Wan1-out -- set 10.10.2.0/24 to as-prepend of 2
* Wan2-out -- set 103.107.224.0/23 to as-prepend of 2
That would mean that incoming traffic would
However for outgoing traffic I think you'd have to use routing marks if you only have one router, and from memory that involves using /routing bgp instance set routing-table=, and running two instances (presumably with ibgp between them)
I determined this was probably possible, but would be tricky, especially for people trying to understand what was happening in stressful cases, so opted for two routers, with WAN1 on one router, WAN2 on the other router, home traffic for WAN1 out on router 1, home traffic on WAN2 out on router 2, set weights, and ibgp between them.
You might be able to cheat by setting a static default route using
ip-mangle -- set routing mark on traffic from 103.10.... to "viaWAN2"
ip route -- add a default low metric to the WAN1 gateway and use check-gateway=ping
ip route -- add a default low metric to the WAN2 gateway for those marked "viaWAN2" and use check-gateway=ping
ip route -- add a default higher metric to the WAN2 gateway and use check-gateway=ping
ip route -- add a default higher metric to the WAN1 gateway for those marked "viaWAN2" and use check-gateway=ping
Although if BGP fails but the circuit doesn't, you may end up with unidirectional routes
Hopefully someone will come along and say "oh no, this is really standard, you just do $this and it works", as that would be really useful for me too!