I am implementing a solution with 4 routers connected to each other in iBGP and EBGP.
Specifically, I would like that:
Networks 126.96.36.199/24 and 188.8.131.52/24 behind router R2 arrive via eBGP on the LAN network of router R1 (10.10.10.0/24) as follows:
184.108.40.206/24 through R3
220.127.116.11/24 through R4
In case of failure of one of the two LTE routers, the network (18.104.22.168 or 22.214.171.124) must automatically pass through the router that remained active (R3 or R4)
I tried with the routing filter configuration on R2 to R1 by modifying the MED.
The incoming traffic works correctly and returns divided, I see that the 126.96.36.199/24 network from the R3 router while the 188.8.131.52/24 returns from the R4 router.
The problem is outgoing,
BGP route on router R2 automatically sets the default route to a single router (R3 or R2) and not to both (correct), but if I configure the mangles I can make both routes to the 10.10.10.0/24 destination (LAN of R1); a pass-through for R3 with source 184.108.40.206 and a pass-through for R4 with source 220.127.116.11.
Everything works perfectly, but when I disconnect one of the two routers (R3 or R4) one of the two networks of R2 no longer reaches the 10.10.10.0/24 network
I noticed that the problem is the prefixes configured to use the mangle and therefore consequently from the R3 and R4 routers only the single networks are allowed as they started from R2 with the mangle prerouting.
Can anyone help me, even with another method, to make sure that I have a multihomed BGP with load sharing and failover? where the traffic coming from one lan of R2 goes through R3 and the other network of R2 goes through R4?
PS: R3-R4 and R1 routers are in IBGP while router R2 to R3 and R4 communicate with EBGP