Please excuse my drawing skills. Looking for some advice on how to best achieve this solution. Client has 2 routes into our core (the bgp route is going live soon, currently the static route is active), and they want the BGP route to be primary and the statics to be a failback incase they lose the bgp route to us.
How can i possibly achieve this?
The issue when ive tried to lab this is that the statics have a lower AD and take preference on the attached router and this is then propogated throughout our core.
The router attached to the BGP route learns both routes, but prefers going up to the router in the top left due to the AS path attribute being shorter(the path is just itself). As the ebgp route is not in the routing table it also doesnt get advertised to its internal peers.
I've tried amending the preference of the static routes to be higher than bgp(170, this is Juniper), but im getting inconsistent results depending on what order the routes go up/down.
All i can think of so far is to change the statics to a default route (this is within a vrf, so only traffic within this routing instance will be defaulted out to this client)
Anyone able to offer some wisdom?
Found a solution that works. On the router with statics amend the preference to be higher than iBGP:
#set routing-instances TEST routing-options static route 192.168.0.0/24 preference 200
On the eBGP attached router amend the BGP preference to be lower than iBGP:
set routing-instances TEST protocols bgp group TEST-bgp preference 4
Routes now flip over during failover as expected