Community discussions

MikroTik App
 
ahmedz
just joined
Topic Author
Posts: 4
Joined: Tue Dec 01, 2020 2:25 pm

inquiry about bonding

Wed Jul 14, 2021 1:13 am

hi everyone,

i have a very simple question.

i have a mikrotik CCR1009 with two fiber links each from two different switch on a different networks, can i do bonding (balance-rr) between the two interfaces and the ports on the switches?

if not please explain in details why.

-router IPs : 172.16.0.2 , 192.168.10.2

-switch 1 : 172.16.0.3

-switch 2 : 192.16.0.3
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11433
Joined: Thu Mar 03, 2016 10:23 pm

Re: inquiry about bonding

Wed Jul 14, 2021 8:44 am

Bonding is Layer 2 (ethernet) feature. All links, parts of bond, have to run between same logical link partners. Usually that means single device on each end. Stacked switches are logically single device, in this case bond links are connected to different physical switches. But in any case, bond is logically single link so all involved devices have to be part of same L2 network.

Your IP addressing implies two different IP networks and usually this means separate L2 networks. In this case you can't bond the two links together, it would mess everything.
 
ahmedz
just joined
Topic Author
Posts: 4
Joined: Tue Dec 01, 2020 2:25 pm

Re: inquiry about bonding

Wed Jul 14, 2021 1:57 pm

Bonding is Layer 2 (ethernet) feature. All links, parts of bond, have to run between same logical link partners. Usually that means single device on each end. Stacked switches are logically single device, in this case bond links are connected to different physical switches. But in any case, bond is logically single link so all involved devices have to be part of same L2 network.

Your IP addressing implies two different IP networks and usually this means separate L2 networks. In this case you can't bond the two links together, it would mess everything.
thanks @mkx for your reply,
what do you mean by "it would mess everything", in this case i will have two ip addresses from different networks on the same interface on the router and two GWs, will that be the issue?
actually i already know bonding can't be done but the goal of the question is to know why? what would happen if i do it? and why won't it work?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11433
Joined: Thu Mar 03, 2016 10:23 pm

Re: inquiry about bonding

Wed Jul 14, 2021 4:23 pm

Bonding multiple physical links into single logical link means that if sender randomly (or using some deterministic algorithm) selects one of links to send a packet, then receiver knows how to deal with it. In your case that means router might decide to send packet with destination IP address 172.16.0.3 down the link towards switch2 ... is there any device in that direction which would take care of sending (i.e. switching) that packet towards switch1? The fact that switch1 might reply with ARP response via its own link doesn't count because bond acts as a single logical link and physical links don't matter to L2 any more (they are entirely handled by bonding driver as L1 entities).
Further: bonds are mainly for high availability purpose (it is possible to have bond in active/backup configuration where all traffic uses active link and only switches over to backup link when active link breaks), high-performance is side effect. So what does happen if link towards switch1 breaks? Router will still think it can use bond (i.e.e the remaining link of it) to send all traffic, the one intended for 172.16.0.0/24 network as well.

As you might notice, I didn't write about L3 mess (I mentioned IP addresses just for illustrative purposes, switches use MAC addresses not IP addresses to select egress port), it's already L2 mess if bonding doesn't work as intended.
 
ahmedz
just joined
Topic Author
Posts: 4
Joined: Tue Dec 01, 2020 2:25 pm

Re: inquiry about bonding

Wed Jul 14, 2021 8:39 pm

Bonding multiple physical links into single logical link means that if sender randomly (or using some deterministic algorithm) selects one of links to send a packet, then receiver knows how to deal with it. In your case that means router might decide to send packet with destination IP address 172.16.0.3 down the link towards switch2 ... is there any device in that direction which would take care of sending (i.e. switching) that packet towards switch1? The fact that switch1 might reply with ARP response via its own link doesn't count because bond acts as a single logical link and physical links don't matter to L2 any more (they are entirely handled by bonding driver as L1 entities).
Further: bonds are mainly for high availability purpose (it is possible to have bond in active/backup configuration where all traffic uses active link and only switches over to backup link when active link breaks), high-performance is side effect. So what does happen if link towards switch1 breaks? Router will still think it can use bond (i.e.e the remaining link of it) to send all traffic, the one intended for 172.16.0.0/24 network as well.

As you might notice, I didn't write about L3 mess (I mentioned IP addresses just for illustrative purposes, switches use MAC addresses not IP addresses to select egress port), it's already L2 mess if bonding doesn't work as intended.
thanks dear for the detailed answer and your time
 
tangent
Forum Guru
Forum Guru
Posts: 1351
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: inquiry about bonding

Wed Jul 14, 2021 9:08 pm

This line of questioning is actually common enough that it's earned a place in the L2 misconfiguration document.

If you have more than the two stations shown in the linked diagram, there are ways to arrange the routing to load-balance single streams between the two upstream connections — e.g. ECMP — but you can't get the combined bandwidth of both with a single connection due to fundamental limitations in the way TCP/IP works.

Who is online

Users browsing this forum: PBondurant and 37 guests