Community discussions

MikroTik App
 
si458
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Fri Jun 22, 2012 7:51 pm
Contact:

MetalLB BGP ECMP

Fri Sep 25, 2020 2:25 pm

Hi All,
this is going to be a far fetched question but through i would ask anyways
ive got the BGP working with MetalLB and Kubernetes with our Mikrotik router

HOWEVER its currently not load-balancing as they say it should, it only goes to one node instead of all 3

ive read up about it and apparently i need to do ECMP on my router/switch?
https://metallb.universe.tf/concepts/bgp/

the routing table on my mikrotik currently shows the single ip address going to all 3 nodes as expected
but only one of the routes is actually marked as active?
they also all have the same distance of 200?

is it possible to get mikrotik to load-balance them with BGP?
if so how?

Regards

Simon
 
User avatar
IPANetEngineer
Trainer
Trainer
Posts: 1313
Joined: Fri Aug 10, 2012 6:46 am
Location: Jackson, MS, USA
Contact:

Re: MetalLB BGP ECMP

Fri Sep 25, 2020 3:56 pm

MikroTik will only load balance (ECMP) with iBGP when peering via loopbacks and using an IGP (OSPF or RIP) or static routes.

https://wiki.mikrotik.com/wiki/Manual:B ... _with_iBGP
Global - MikroTik Support & Consulting - English | Español | Serbian | Danish +1 855-645-7684
https://iparchitechs.com/ecosystem/mikr ... consulting mikrotiksupport@iparchitechs.com
 
si458
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Fri Jun 22, 2012 7:51 pm
Contact:

Re: MetalLB BGP ECMP

Fri Sep 25, 2020 5:03 pm

Hi IPANetEngineer

i have already tried those examples and they dont work :(

the routes get inserted via metallb themselves (not manually) and they are inserted as single route to each host NOT as a single route to multiple hosts
e.g.
192.168.168.179 -> 192.168.168.156 - 200
192.168.168.179 -> 192.168.168.157 - 200
192.168.168.179 -> 192.168.168.158 - 200

where as the example shows it needs to be
192.168.168.179 -> 192.168.168.156,192.168.168.157,192.168.168.158 - 200

Regards

Simon
 
pubudeux
just joined
Posts: 9
Joined: Sun Oct 25, 2020 7:54 pm

Re: MetalLB BGP ECMP

Sun Oct 25, 2020 11:25 pm

Hey Simon,

Did you ever find a solution for this? I'm stuck at the same point as well with Mikrotik BGP + MetalLB.
 
si458
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 59
Joined: Fri Jun 22, 2012 7:51 pm
Contact:

Re: MetalLB BGP ECMP

Mon Oct 26, 2020 12:34 pm

Hey Simon,

Did you ever find a solution for this? I'm stuck at the same point as well with Mikrotik BGP + MetalLB.
Hi,
sadly no i didnt,
i ended up using layer 2 with internal ip addresses on a small subnet /28
then on the mikrotik forwarding the subnet from external ips to internal ips with the small subnet using NETMAP
 
SillyPosition
just joined
Posts: 13
Joined: Sun May 24, 2020 10:21 am

Re: MetalLB BGP ECMP

Wed Oct 28, 2020 7:48 am

I tried to setup the same thing very recently, metallb on physical machines in my home, and metallb to publish services over the home network.
My first attempt actually worked very simply, I used the configured AS in mikrotik (routing - bgp - interfaces), and I setup a peer using my configured asn for metallb and the nodes IPs (multiple peers for all the k8s cluster, all with the same AS)

They all appeared as published, and I even saw the route appears (in ip - routes). It appears with distance 20.
And my attempt to browse this IP from machines in the network was successful, however the few first attempts were very slow, took up to 5-6seconds to load nginx default page.
But then, I haven't done anything in particular, and it stopped working.
Meaning, that everything in mikrotik looks the same, I see the route generated, but Im unable to navigate to the exposed service at all

I wonder if any of you guys made some progress around it since then?
I prefer the BGP approach significantly over ARP, since I read it works much faster during failover.

Who is online

Users browsing this forum: No registered users and 15 guests