Community discussions

MikroTik App
just joined
Topic Author
Posts: 9
Joined: Sun Oct 25, 2020 7:54 pm

Multi-hop BGP not forwarding (for MetalLB load balancing)

Sun Oct 25, 2020 8:11 pm

Hey all - I am trying to configure BGP with MetalLB to achieve load-balancing in my Kubernetes cluster.

So far, I have set up the following:

My RouterBoard has a BGP instance 65530 on the router

In between the Kubernetes cluster and the router is a managed switch with L3 routing between VLANs, so the BGP peers are set up as multi-hop
Here are the routes on the L3 switch: (the cluster nodes that I'm trying to load balance are in the VLAN20 with subnet
Protocol	Destination Network	Next Hop	Distance	Metric	Interface Name
Static 1 0 VLAN1
Connected 0 1 VLAN1 
Connected 0 1 VLAN20
Here is the BGP peer setup:
/routing bgp peer
add multihop=yes name=peer1 remote-address= remote-as=65529 ttl=default
add multihop=yes name=peer2 remote-address= remote-as=65529 ttl=default
add multihop=yes name=peer4 remote-address= remote-as=65529 ttl=default
There is a connection established between all the peers and they successfully advertise routes:
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADS                          x.x.x.x                1
 1 ADC        bridge                    0
 2 A S                               1
 3 A S                               1
 4 A S                               1
 5 ADC  x.x.x.x/x      x.x.x.x     ether1                    0
 6 ADC      bridge                    0
 7 ADb                         20
 8  Db                         20
 9  Db                         20
Note the route dynamically added by the BGP peers. When I ping this address it hits the router, but immediately drops the packet. I am trying to get this IP to route to the peer IP in order to load balance connections.

Currently this 172 IP is not working, i have also tried a cidr in the VLAN 20 subnet, which didnt work, as well as a cidr in the same overall subnet. Not sure what I'm missing.

Who is online

Users browsing this forum: No registered users and 8 guests