Trunk (2 port aggregation) possible?

hello to everyone and happy new 2021.
can someone help:
i have mikrotik sxt lte that has 2 100mbit ports.
on the other side i have a mikrotik hex gateway (5 gbit ports).
i would like to do link aggregation with 2 ports (by connecting 2 lan cables from hex to sxt).
sxt has possibility to make a trunk that would be used for link aggregation, but not sure how to do it on openwrt?
thing is my 4g speeds can be faster than 100mbit, but i'm limited to 100mbit because of single 100mbit lan connection.
thanks for help.

3 Likes

If I remember correctly, the max transfer speed of the aggregated ports will not increase.

100 + 100 = 100

The bandwidth will be 200, but the max speed will still be 100.

1 Like

how come?
isn't port aggregation going to double the speed?

No, the bandwidth.

But if you have several clients accessing your 4g device, each will be able to go at 100 mbit, assuming it's capable of delivering such speeds.

4G speeds faster than 100Mbit are uncommon afaik (which is also why the mikrotik modem device you are using has 100Mbit ports even if the modem can do 150Mbit down and 50Mbit up).

Did you actually test them with a speed test and you see you are bottlenecked to 100Mbit or is this just what the provider told you?
Because actual bandwith is usually not anywhere near the stated "up to" speeds, which are used mostly for marketing purposes.

For example I have a theoretical 2Gbit max speed on my 5G contract but there is no way in hell that I go above 20Mbit because of how much the infrastructure is actually always full on the provider side, and how far I am from the nearest tower.

Yes and no. Speed is a generic term.
Due to how teaming works, applications running on the clients can run at up to 100Mbit download, if you have more than one application running at the same time then you can have two applications running at the same time at 100Mbit.
So your system will be carrying 200Mbit total, but actually splitting a single application's network connection on more than one port is called in a different way (I don't remember) and is still new and in development.

thanks to both of you, although you're kind puzzling me.
i don't want to do the traditional "link aggregation" to get my internet faster by aggregating multiple service providers, i want to do it on my lan side. if i make a trunk connection with 2 lan cables, they should act as 1 cable of 200mbit. (on HPE managed switches i can select 2 ports, put them in trunk, do that on both sides of the link, and poof, i'll have 2gbit connection).
mikrotik can do it, by bonding 2 lan ports. openwrt should also be able to do it but i don't know how to set it up. (i forgot to tell in 1st post -i'm running openwrt v19 on mikrotik hex).

lte here is plenty fast. i'm close to bottlenecking the sxt - my usual 4g speed is 85mbit. not sure how much overhead is "eating", neither how much running this link over multiple switches eats the available bandwidth.

We are both talking about local network link aggregation or bonding. It does not work like you think it works, it works more similar to the "use more service providers". The people in the link posted by frolic are also clearly talking about this.

The "use more than one modem with the same router" is called WAN Multipath, and the thing I didn't remember the name of is Multipath TCP https://en.wikipedia.org/wiki/Multipath_TCP

With link aggregation each application's communication will not be split between two ports because of technical limitations of TCP protocol, so it will cap out at the max speed of the port. It will decide on what port to run each network communication, similarly to the multipath WAN. So if you have a single application (say a web browser) that is downloading a file from a single website you will still cap out at 100Mbit. If you run another application it can use 100Mbit, using another port.
So your device will have 200Mbit bandwith, but applications will still be limited to the max speed of each port. This is good if you are running many different applications and devices at the same time on the same network, less good if you have only one device and one application using the internet (I mean actually requiring a lot of bandwith) at a time.

As another guy said in the linked thread:
When teaming NICs together, the algorithm will use only a single NIC for a given TCP stream. The reason for this is to prevent out of order TCP packets, which cause huge throughput issues for TCP. You can send a second TCP stream to a different server for additional aggregate bandwidth, but the communication between any two endpoints for a single stream will always be over a single NIC. Depending on the load distribution algorithm of the switch, it may be able to use source and destination MAC as well as source and destination port for the hash to determine which ports to use, in which case you may get more than single NIC throughput between two different endpoints if you have more than 1 TCP stream going.

Which is why Multipath TCP standard was created but is still not in production afaik.

If you are using the stable release of OpenWrt there is no web interface to do it and you should follow what is said in ththis thread Best way to configure Bonding in OpenWrt? - #2 by dlakelan (also posted by trendy above)

The development snapshot of OpenWrt (and the next stable release) should have the web interface for this feature since March 20, this is the commit that added support https://github.com/openwrt/luci/commit/33df1c154471fa9537a60e12b0f112eae4db9d1f

not sure how much overhead is "eating", neither how much running this link over multiple switches eats the available bandwidth.

I'm sure that running over multiple switches does not eat bandwith, it only increases latency but since you are using this to access the Internet it's irrelevant as the internet latency is huge if compared to local latency. You are not going to notice a 0.1 millisecond increase in latency when your average internet latency is like 60 ms or more for good sites like Google that have infrastructure all over the place.

2 Likes

For bonding the problem is that you need to have two ethernet interfaces from the CPU to the switch. I don't know if you have that? is there an eth0 and an eth1 on this device?

oh. i thought , in laymans terms, "my pipe would be double".
as for application use - i think by how this is connected right now, there's just 1, because of bridge mode. let me explain.
sxt lte has the lte interface in bridge mode (with vlan on eth1), and on my gateway the wan port is tagged with the same vlan. the rest of the network don't "see" the network traffic from/to the sxt although they share the same switches.
this is done so that i could keep the same config as earlier while i had dsl, i just changed from pppoe (dsl) to dhcp client (lte) . this way, my gateway (also a openwrt device) gets a public IP and i don't need to configure the (awful) routerOS.

my hex looks like this

thanks for help till now :slight_smile:

Your switch config clearly shows "CPU (eth0)" as the only connection between the CPU and the switch. In order to get more than 100Mbps "piped through" from the operating system into the switch you would need two of these connections to bond together. which you don't have.

Think of the typical consumer router as a small computer which is hard-wired into one ethernet port of a switch. In higher end consumer routers you have a small computer hard wired into two ports of a switch, and you'd see CPU (eth0) and CPU (eth1). If you have that kind of config you could bond eth0 and eth1 together and then you could route up to 200 Mbps. but without that there's nothing to bond.

3 Likes

Technically you can, since the bandwidth between the switch and the CPU port is 1000 Mbps, which is way larger than 2x100 Mbps.

that's what i was thinking too, because it's a gigabit switch.
but anyway, after some testing , i realized i wouldn't get that much faster internet because other bands are pretty crowded , and in reality i don't need over 100mbit. even fiber, once i get it, will be limited to 100mbits anyway as i don't plan to spend more on getting the faster connection.