Help configuring link aggregation on OpenWrt

Hello everyone,

I'm trying to setup link aggregation on a router with OpenWRT installed, but can't get it to work. I have followed different guides and tried different solutions but without success. I've tried to configure it using the LuCI web interface, but I haven't found any options for link aggregation. I also searched for additional packages to install, but couldn't find any.
I also tried configuring it via the terminal, but I couldn't find specific commands for link aggregation.
I have two USB LAN devices that I would like to use to increase the available bandwidth, but I can't figure out how to do it.
If any of you have experience with setting up link aggregation on OpenWRT and can help me, I'd be very grateful.

Thanks in advance for your help.

Sincerely.

I'm not an expert on doing link aggregation, but a few quick questions:

  1. How fast is your internet connection?
  2. What router are you using? (best way to report is to provide the output of ubus call system board)

ah sorry i forgot, use a raspberry pi 4, my connection travels at 10mb, so if I can also add that of the second stick I can navigate a little better

root@OpenWrt:~# ubus call network.interface dump
{
        "interface": [
                {
                        "interface": "lan",
                        "up": true,
                        "pending": false,
                        "available": true,
                        "autostart": true,
                        "dynamic": false,
                        "uptime": 4143,
                        "l3_device": "br-lan",
                        "proto": "static",
                        "device": "br-lan",
                        "updated": [
                                "addresses"
                        ],
                        "metric": 0,
                        "dns_metric": 0,
                        "delegation": true,
                        "ipv4-address": [
                                {
                                        "address": "192.168.10.1",
                                        "mask": 24
                                }
                        ],
                        "ipv6-address": [

                        ],
                        "ipv6-prefix": [

                        ],
                        "ipv6-prefix-assignment": [
                                {
                                        "address": "fd86:1cec:98aa::",
                                        "mask": 60,
                                        "local-address": {
                                                "address": "fd86:1cec:98aa::1",
                                                "mask": 60
                                        }
                                }
                        ],
                        "route": [

                        ],
                        "dns-server": [

                        ],
                        "dns-search": [

                        ],
                        "neighbors": [

                        ],
                        "inactive": {
                                "ipv4-address": [

                                ],
                                "ipv6-address": [

                                ],
                                "route": [

                                ],
                                "dns-server": [

                                ],
                                "dns-search": [

                                ],
                                "neighbors": [

                                ]
                        },
                        "data": {

                        }
                },
                {
                        "interface": "loopback",
                        "up": true,
                        "pending": false,
                        "available": true,
                        "autostart": true,
                        "dynamic": false,
                        "uptime": 4143,
                        "l3_device": "lo",
                        "proto": "static",
                        "device": "lo",
                        "updated": [
                                "addresses"
                        ],
                        "metric": 0,
                        "dns_metric": 0,
                        "delegation": true,
                        "ipv4-address": [
                                {
                                        "address": "127.0.0.1",
                                        "mask": 8
                                }
                        ],
                        "ipv6-address": [

                        ],
                        "ipv6-prefix": [

                        ],
                        "ipv6-prefix-assignment": [

                        ],
                        "route": [

                        ],
                        "dns-server": [

                        ],
                        "dns-search": [

                        ],
                        "neighbors": [

                        ],
                        "inactive": {
                                "ipv4-address": [

                                ],
                                "ipv6-address": [

                                ],
                                "route": [

                                ],
                                "dns-server": [

                                ],
                                "dns-search": [

                                ],
                                "neighbors": [

                                ]
                        },
                        "data": {

                        }
                },
                {
                        "interface": "lte",
                        "up": true,
                        "pending": false,
                        "available": true,
                        "autostart": true,
                        "dynamic": false,
                        "uptime": 3482,
                        "l3_device": "br-lte",
                        "proto": "dhcp",
                        "device": "br-lte",
                        "metric": 0,
                        "dns_metric": 0,
                        "delegation": true,
                        "ipv4-address": [
                                {
                                        "address": "192.168.8.115",
                                        "mask": 24
                                }
                        ],
                        "ipv6-address": [

                        ],
                        "ipv6-prefix": [

                        ],
                        "ipv6-prefix-assignment": [

                        ],
                        "route": [
                                {
                                        "target": "0.0.0.0",
                                        "mask": 0,
                                        "nexthop": "192.168.8.1",
                                        "source": "192.168.8.115/32"
                                }
                        ],
                        "dns-server": [
                                "192.168.8.1"
                        ],
                        "dns-search": [

                        ],
                        "neighbors": [

                        ],
                        "inactive": {
                                "ipv4-address": [

                                ],
                                "ipv6-address": [

                                ],
                                "route": [

                                ],
                                "dns-server": [

                                ],
                                "dns-search": [

                                ],
                                "neighbors": [

                                ]
                        },
                        "data": {
                                "leasetime": 86400
                        }
                },
                {
                        "interface": "tun0",
                        "up": false,
                        "pending": false,
                        "available": false,
                        "autostart": false,
                        "dynamic": false,
                        "proto": "none",
                        "device": "tun0",
                        "data": {

                        }
                },
                {
                        "interface": "wan",
                        "up": false,
                        "pending": false,
                        "available": false,
                        "autostart": true,
                        "dynamic": false,
                        "proto": "dhcp",
                        "data": {

                        },
                        "errors": [
                                {
                                        "subsystem": "interface",
                                        "code": "NO_DEVICE"
                                }
                        ]
                }
        ]
}

Link aggregation should have absolutely no effect if your internet is 10Mbps. The Pi has a gigabit ethernet connection built in and you're almost certainly using either a 100Mbps or 1Gbps ethernet adapter which means you have factor of 10x or 100x of available bandwidth over your active internet connection.... you couldn't saturate even a 100Mbps link with internet traffic.

The only 2 situations where link aggregation would make sense would be:

  1. You have an internet connection faster than 1Gbps
  2. You're dealing with a large volume of inter-VLAN traffic and/or sharing from your router (such as a NAS configuration

That said, if you want todo it for academic purposes, that's great... but it will make literally no difference in your actual useful bandwidth.

I have a connection via usb stick that gives me about 10 mb, another that gives me about 40mb, I would have 50mb which are not bad for my uses, so I would like to try to configure it anyway.I posted my dump just above

oh... I see... so you're talking about 2 WAN connections that you wish to aggregate.

Aggregating (really bonding) two internet connections is not trivial. What you can do fairly easily is load balance the two connections, and that will help distribute your internet access across the two WANs to give you better overall performance. Keep in mind, though, that with load balancing, individual connections are not necessarily going to be faster (so if you run a speed test on one computer, you'll still top out at ~10 or ~40 Mbps, but if you run speed tests from multiple devices at the same time, you should be able to see a total of approximately 50Mbps across those devices.

Does that make sense?

For that, you'll need to install mwan3.

this configuration does not combine interfaces into a single virtual interface as link aggregation protocols do

They will let you transfer more data, but the max speed is still the max of each port.

1 + 1 = 1

Right, you're not going to be able to easily bond the two interfaces. It used to be that you actually needed the cooperation of the ISP (and it needed to be a single ISP or multiple who actively worked together on this). IIRC, there are now some methods by which you can bond disparate connections, but the complexity still would be high).

AFAIK, load balancing is theist you can realistically do in this scenario. (if someone comes along who can offer a true bonding solution for you, I'll be excited to learn about it and I'll be sure to modify this statement).

1 Like

Even these modern approaches still need a well-connected remote router (vserver) under your control to stitch the connection back together.

Load balancing vastly disparate WAN links (in terms of throughput and responsiveness) usually doesn't provide a good experience either, a plain failover setup ignoring the 10 MBit/s connection altogether for normal operations is probably the best approach (or keeping it strictly separate, to a different subset of your devices).

1 Like