Score:-3

Combining Network Connections for Additive Speed

br flag

Edit: I've removed the errors I was receiving while starting the bond by using the teamd utility. However, my goal to increase the total speed by combining the networks is still open. Skip down to EDIT2 below if interested. I may delete in between soon, because it is an artifact of using the 'interfaces' config and commands like iface that have been depreciated, at least in Ubuntu.

I narrowed down errors in starting a bond0 to some circular logic. I'm trying to use bond-mode balance-rr to add together my cell phone connection to my other cellular modem with ethernet for increased speed. Defaulting to the latter when the phone is not tethered. I'm using systemctl restart networking on Kubuntu 20.04 to trigger the changes in /etc/network/interfaces. (Speedify and Connectify do this type of connection bonding).

Edit: https://www.ibm.com/docs/en/linux-on-systems?topic=recommendations-bonding-modes

Quora question maybe clarify the terms used for L2 load balancing as 'link aggregation': https://www.quora.com/How-is-load-balancing-achieved-with-layer-2-devices

"Link aggregation (which is interchangable with the term “etherchannel” which I will use from here on out) is load balancing on layer 2. It’s less about optimization, and more about spreading the load as equally as possible across each individual link."

EDIT2:

It looks like 'network teaming' with teamd may work. Yes this prevents any errors from the interfaces config file, while still bonding the networks with different bonding modes including load balancing.

Load balancing multiple NICs on single machine presenting a virtual IP

There may be difficulty in combining networks for speed. Failover and load balancing seem to be switching between networks based on which is more available, but that doesn't combine them additively. A given process is looking to a single IP address at a time to reassemble packet streams. I would need something that requests packets over two different networks and reassembles the streams, as in 'redundant routing'.

Some kind of VPN may be required for that, similar to what Speedify does. However, a local VPN would be more ideal. If they use physical devices to combine the networks, virtual devices might be able to simulate them.

https://networklessons.com/cisco/ccie-routing-switching/introduction-gateway-redundancy

cn flag
Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/131014/discussion-on-question-by-alchemy-configuring-connection-bonding-chicken-and-eg).
Score:1
bd flag

This cannot work. Bonding is not the right tool for that job. Technically speaking, bonding works on network protocol layer 2. What you want is load balancing on layer 3.

Specifically, bonding would be able to distribute the load between two separate Ethernet connections to the same cellular modem but not between two separate modems. What's more, it would be able to detect when an Ethernet connections was down (ie. cable unplugged) but not whether a cellular modem had an active Internet connection.

Nikita Kipriyanov avatar
za flag
No, this is not a Unix question. This is strictly networking question, and you have a complete answer. There is nothing Unix-specific here. This idea is wrong whether you use Linux bond, or Cisco's EtherChannel, or Windows interface teaming, anything related to L2 channel aggregation won't work for this problem.
alchemy avatar
br flag
Thanks, however from IBM: "mode 0 (balance-rr) Round-robin policy. Transmits packets in sequential order from the first available slave through the last. This mode provides *load balancing* and fault tolerance." (link above) ..it will be pluggin/unplugging.. read several times, but I do think bonding can 'load balance' between connections of different source, as thats the point of 'fault tolerance', having a backup service provider. ..that's probably why you think bonding won't work, but again IBM specifically states it can do both load balancing and fault tolerance.
Nikita Kipriyanov avatar
za flag
This sentence is about completely different aspect. The answer is absolutely correct in the sense bonding is Layer 2 concept, so it can not be applied to IP which is level 3, period. Your note is about algorithms or mode to use for bond interface if it could be used; notice that you can't use any bond interface at all, so the question which algorithm/mode to use for bonding couldn't even rise.
alchemy avatar
br flag
@NikitaKipriyanov, hi.. as I pointed out above, the bonding does work between bond0 and enp0s25, its just that I have to bring it up manually, and there is no way to do that without editing etc/network/interfaces every time. I bolded the part where it says it does work in my question, as you comment seems to replicate someone elses.
Nikita Kipriyanov avatar
za flag
It doesn't relicate anybody. It seems we just said the same thing at the same time. Again, what you want to do? You can bond L2 interfaces. For that, these intefaces *must not* have any IP address in the first place. Moreover, it's likely there must be also the corresponding bond on the other side. What's on the other side?
alchemy avatar
br flag
@TilmanSchmidt, you've got to give me a second to edit the question to put it in there.. wink ;) again, the doc and mode implies this is what fault tolerance means. I will look up the layer differences.. I was hoping you could explain that in reference to the bonding modes that seem to be designed specifically for fault tolerance.
alchemy avatar
br flag
@TilmanSchmidt, there are a lot of terms out there. Which is why I asked the experts here on Server Fault. Perhaps what I'm seeking is 'link aggregation' that may be colloquially different (per the IBM doc) than L3 load balancing. I'll quote the answer from a Quora question and link in my question right now for reference.
Tilman Schmidt avatar
bd flag
Fault tolerance is always relative to which kind of fault you want to be tolerant to. Layer 2 fault tolerance refers to layer 2 faults, that is, ethernet cables and switches. This is what link aggregation is referring to. Note that layer 2 is also called link layer. What you are searching is *not* layer 2 fault tolerance aka link aggregation, but layer 3 fault tolerance aka redundant routing. This is not just colloquially different but a fundamental technical difference.
Tilman Schmidt avatar
bd flag
The problems you are encountering while trying to configuring bonding are just one effect of this layer 2 versus layer 3 conflict. A bonding slave device *cannot* have a layer 3 configuration of its own because it is already aggregated at layer 2, but you try to apply layer 3 configuration commands `inet dhcp` or `inet manual` to it. You could complain that the error messages you receive do not point that out clearly enough, but that's how it is.
alchemy avatar
br flag
@TilmanSchmidt finally, we are getting to a technical explanation.. I do think this contradicts your actual answer above "What you want is load balancing on layer 3" if load balancing can be done on L2 and "What you are searching is... redundant routing". It does matter the terminology used so that we can understand each other, and others too.. I am considering the conflict between layers and commands. There does seem to be a catch 22 when autostarting both bond0 and enp0s25. They should be at least able to start independently and have user be able to change with commands. Maybe Unix question
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.