Community discussions

MikroTik App
 
User avatar
Gwen93
just joined
Topic Author
Posts: 6
Joined: Thu Feb 21, 2019 2:49 pm
Location: Canada

Help Bonding two ports

Sat Mar 27, 2021 2:01 am

I'm a beginner at MikroTik.

I have a linux server and I have bonded two ethernet ports (balance-alb) to ether10 and ether14 on my CRS326 (6.48.1). If I leave ether10 and 14 attached to the bridge, the server can connect fine.

Once I setup bonding on the switch, the server (10.7.10.109) can no longer arp the IP address of the switch (default gateway 10.7.10.1).

I attached ether 10/14 to bond0, mode = balance-alb:
/interface bonding
add mode=balance-alb mtu=9000 name=bond0 slaves=ether10,ether14

I then added the bond to the bridge:
/interface bridge vlan
add bridge=bridge1 tagged=ether24 untagged=ether2,ether3,ether4,ether5,ether6,ether7,ether8,ether9,ether11,ether12,ether13,ether15,ether16,ether10,ether14,bond0 vlan-ids=10

I assigned an IP address to the bond (and I was unsure of this part-had no address, tried 109,111 - no change):
/ip address
add address=10.7.10.109/24 interface=bond0 network=10.7.10.0

At this point, I can't ping the default gateway (10.7.10.1 - which is the switch) from the server. On the server arp -a shows(10.7.10.1) at <incomplete> on bond0.

Would someone with more experience than me (that's everyone else) please offer some assistance if possible?
Thanks very much.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11433
Joined: Thu Mar 03, 2016 10:23 pm

Re: Help Bonding two ports

Sat Mar 27, 2021 10:39 am

Your wording and action don't match when you're talking about adding bond to the bridge. Adding to a bridge is done thusly:
/interface bridge
add bridge=bridge1 interface=bond0 pvid=10

What you did was to setup VLAN membership of port bond0 (which is done automatically by the command above due to pvid setting).

No need to setup any IP settings on bond0 since it becomes part of L2 network after being properly set up as bridge and VLAN member.
 
User avatar
Gwen93
just joined
Topic Author
Posts: 6
Joined: Thu Feb 21, 2019 2:49 pm
Location: Canada

Re: Help Bonding two ports

Sat Mar 27, 2021 1:40 pm

Yes, I want this server to access my other server that is on VLAN10 so that is why I added bond0 to the bridge.

I removed the IP address assignment to bond0.

My server still cannot reach it's default gateway (10.7.10.109 -> 10.7.10.1).
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11433
Joined: Thu Mar 03, 2016 10:23 pm

Re: Help Bonding two ports

Sat Mar 27, 2021 3:20 pm

Post full config for review, it's hard to guess which minor detail is missing/wrong. Execute /export hide-sensitive file=anynameyouwish from terminal window and open resulting text file in any text editor, then copy-paste config here inside [code] [/code] environment.
 
User avatar
Gwen93
just joined
Topic Author
Posts: 6
Joined: Thu Feb 21, 2019 2:49 pm
Location: Canada

Re: Help Bonding two ports

Sat Mar 27, 2021 3:25 pm

@mkx, I just re-read what you wrote and saw the difference in your command.

I restored from backup re-did the commands, and I can now ping from the server to the CRS326. Thanks for correcting me. (I'm going to have to read more to truly understand it)

Once more question;
/interface bonding> monitor-slaves 
bond: bond0 
Flags: A - active, P - partner 
 A  port=ether10 

    port=ether14 
-- [Q quit|D dump|C-z pause](@(
should ether14 not also be active?

I want to run balance-alb so that inbound packets use both interfaces 10 and 14. This server is going to backup another that is 10GB ethernet - so I want to use the bandwidth of two 1GB ports.

Thanks all.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11433
Joined: Thu Mar 03, 2016 10:23 pm

Re: Help Bonding two ports  [SOLVED]

Sat Mar 27, 2021 4:38 pm

Alb only differs from tlb when the other end is (a dumb) switch connecting multiple clients which don't know anything about this bond. Multiple clients are needed because many bond modes keep traffic between same set of peers (i.e. server and client) on same link to ensure in-order delivery of packets. Alb is special because it mangles ARP responses so that different clients get different MAC address as server's address and (dumb) switch then can use different links for different connections.

In your case where server knows about bond and switch knows about bond alb is not needed because server will use both links to transmit according to its own strategy.

Linux support for LACP is pretty decent, so I would configure bond as 802.3ad bond with transmit policy set to layer3+4 or at least layer2+3 (on both sides select the highest layer available, setting doesn't have to be same on both ends). Regardless the policy single data connection (e.g. single rsync session) will still use single link and not both. If you really want to use both links, you could configure bond with ballance-rr and be vigilant about potential problems due to out-of-order packet delivery (UDP connections can be pretty susceptible to related issues).

Who is online

Users browsing this forum: NxtGen [Bot] and 47 guests