Community discussions

MikroTik App
 
pwuk
newbie
Topic Author
Posts: 49
Joined: Wed Aug 01, 2012 8:51 pm

iBGP vs Static priorities

Fri May 06, 2022 2:10 pm

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?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 6827
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: iBGP vs Static priorities

Fri May 06, 2022 2:16 pm

ROS v7 has this problem resolved.
 
millenium7
Member
Member
Posts: 448
Joined: Wed Mar 16, 2016 6:12 am

Re: iBGP vs Static priorities

Mon May 09, 2022 3:04 am

This is a routing engine problem. It will not replace an existing route if they are an exact match
I.e. 10.0.0.0/8 will not be replaced with another 10.0.0.0/8 even if its substantially better

This applies to differing route types, i.e. static and BGP, OSPF and BGP, OSPF and static etc
If it's the same (OSPF route being added to the same OSPF table) then it'll override with the updated best route
Otherwise it does not change

This really sucks because we use static routes as a failover backup and the problem is the static route stays active even after BGP comes back up. Hence right now you either need to do silly things like advertise 0.0.0.0/1 and 128.0.0.0/1 with BGP (which beats 0.0.0.0/0) or just not use static routes at all and use BGP for both routes

Who is online

Users browsing this forum: No registered users and 2 guests