BGP + ECMP

Hi Guys,

how to enable ECMP for BGP routes?

> /ip/route/print detail where !inactive
Flags: D - dynamic; X - disabled, I - inactive, A - active; c - connect, s - static, r - rip, b - bgp, o - ospf, d - dhcp, v - vpn, m - modem, y - copy; H - hw-offloaded; + - ecmp 
   D b   dst-address=0.0.0.0/0 routing-table=main gateway=172.16.11.129 immediate-gw=172.16.11.129%sfp-sfpplus1.uplink.v2221
            distance=20 scope=40 target-scope=10 suppress-hw-offload=no 

   DAb   dst-address=0.0.0.0/0 routing-table=main gateway=172.16.11.1 immediate-gw=172.16.11.1%sfp-sfpplus1.uplink.v2220
             distance=20 scope=40 target-scope=10 suppress-hw-offload=no 

 0   s   dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=172.16.11.1 immediate-gw=172.16.11.1%sfp-sfpplus1.uplink.v2220
           distance=100 scope=30 target-scope=10 suppress-hw-offload=no

Both BGP default-routes are installed in fib, but only one is active.

On other venders you can increase “maximum-paths” 2, to enable ecmp. I was looking through the options in ROS CLI and could not find something similar.

I think that this feature it’s not available in ROS v6.

Also not available in ROS v7 yet:
https://help.mikrotik.com/docs/display/ROS/v7+Routing+Protocol+Status

I thought that v7 is the first ROS that support BGP with multipath (ECMP).

This makes me a little bit angry.

Currently i use Ubiquiti Routers to achive ECMP with BGP. I moved many routers to Mikrotik because in some topics ECMP for BGP on Mikrotik was planed for v7.x - and now, this feature is not ready yet? Damn it :laughing:

Edit: I stand corrected, BGP multi path is not supported at the moment.
ECMP is supported. You should look at ‘/routing/route/print detail’ to debug this.

To the Mikrotik Engineers:

Please add BGP ECMP to the List of https://help.mikrotik.com/docs/display/ROS/v7+Routing+Protocol+Status so we can track the availability of that feature in ROS v7.x

Thank you.

I am here because it does apper to be working for me… in ONE case… and I am not sure how. It’s also “Almost” working in a second case - but the secondary route is still blue - even though both are stating ECMP (+ in status)

In both of these cases - they are iBGP - but i cannot confirm the trigger 100%. I can confirm that if I set nexthop to the upstream as the “Mid” router - the + in status dissappears in one of the cases (have yet to test more)

7.1.3

OK, for more fuel to the flames - I found why case 2 “works” - but doesnt - but does

The situation where the ECMP was running - but onlu one route was active - was only partially true. The secondary route had injected itself into the primary - so WAS ECMP - tested and was multipathing randomly.
This was due to 2 things - as far as i can tell.

  1. The Gateway was the same - being sent via BPG (from 2 sources pointing to the same point - neither were the gaterway)
  2. There was a ECMP Path to the gateway of each of these routes. As an aside - the ECMP route WAS NOT active (was blue) but was still an equivalent to an ECMP route.

Had added long distance static ECMP failove to part of my setup - and on one of the tails - saw this.

The router in question is 7.1.3, it’s peers are 7.1.3 and 6.47.10

The other one in question - the 7.1.3 upstream - get routes from the router above, but as a failover - also gets routes from it’s 6.47.10 companion for the router above.
In this case - there are no static routes to the downstream - but this router IS showing both sets as ECMP… ALSO, rather than injecting the 2 routes into one - they are being shown as 2 seperate active routes - like when doing static in ROS 7x (unlike the one above which was more similar to ECMP in ROS 6x)

The problem I have is that is that in the last case here - I don’t think I want ECMP - as both paths are actually going to 1 router - but one is 1 hop and the other is 2… I’d rather have failover route for if a bgp drops or ip drop or something… Either way - I got work to do.

If i can knuckle down how it works - and I remeber - will post here. Otherwise hope that rough outline helps someone figure out their ECMP.

BGP routes recursively resolved on ECMP routes will also be ECMP, see here:
https://wiki.mikrotik.com/wiki/Manual:BGP_Load_Balancing_with_two_interfaces

Feature where BGP creates multipath routes (BGP multipath) is not implemented at the moment.

Any idea when this will be enabled?

also working in v7 ?

The crystal ball is unclear, it's not yellow or green, but also not red...

Isn't white the color of surrender?

Sorry, can you please clarify the difference?

+1 - I’m in need of BGP multipath. I’d like to use the feature to build an scalable IP Clos network.

Something have silently changed
photo_2024-03-14_22-22-28.jpg

nothing is silently changed, multipath is still not implemented.

Will MikroTik support BGP multipath UCMP? I.e. to allow us to specify the bandwidth profile for each interface? And therefore perform load balancing across the interfaces either using:

  1. Per packet (bad idea for stability/traceroutes etc)
  2. Per flow (layer 2/3/4 hashing)

https://vxplanet.com/2019/01/03/bgp-load-balancing-and-unequal-cost-load-balancing/

This happens when you have 2 or more BGP-Profiles.

Did you mean 2 separate BPG Instances (template?)

Yes. But i also got ECMP enabled for Routes with having only 1 BGP-Instance. Don’t know why, but that should not be possible due this feature is not implemented including v7.19.3. Had no time to check, why my routes were ECMP, but it should not.