I have a pair of mikrotiks (routeros6) in the same AS, each receiving a default route via eBGPing, and peering with each over via iBGP
When it’s all up it looks like this
/ip route> print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADb 0.0.0.0/0 172.29.254.49 20
1 S 0.0.0.0/0 172.29.254.49 240
2 Db 0.0.0.0/0 172.26.254.50 200
with the router (AS65001) peering 172.29.254.49 being the ebgp (on a /30) to AS65000, and iBGP to 172.26.254.50 (AS65001)
There’s also a static of last resort in case the BGP process dies. This is all fine.
However if the eBGP link of cost 20 fails, presumably the next best route - the iBGP link of cost 200 - should work.
The static is a cost of 240, so should only happen if the eBGP and iBGP links are missing.
So why does this happen
/ip route> print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 172.29.254.49 240
1 Db 0.0.0.0/0 172.26.254.50 200
Disable the static though and
0 ADb 0.0.0.0/0 172.26.254.50 200
1 X S 0.0.0.0/0 172.29.254.49 240
And the route works. Am I misunderstanding distance?