I figured out LAG bonding, and oh boy is it cursed

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
Runed0S
DD-WRT Novice


Joined: 09 Jul 2020
Posts: 19

PostPosted: Wed Feb 15, 2023 1:03    Post subject: I figured out LAG bonding, and oh boy is it cursed Reply with quote
In setup→networking there's a setting called "bonding". I would like to set up my r7000 router up with it.
I have a modem that supports bonding. The setting in it is on, and my ISP supports it.

I don't care about CPU bottlenecks, I'm just trying to learn how to make this work. I'm getting a r9000 soon, as it has dedicated ports for this.

There's conflicting information on the forums going back to at least 2007 on how to make this work, or even if it works, and no clear instructions in the wiki.

Firmware: DD-WRT v3.0-r51935 std
Netgear r7000

Edit: Here's the config. Bask in the horror and glory! Also it actually improves performance somehow... I wish bonding worked normally.



image.png
 Description:
 Filesize:  121.38 KB
 Viewed:  1083 Time(s)

image.png


Sponsor
Runed0S
DD-WRT Novice


Joined: 09 Jul 2020
Posts: 19

PostPosted: Sun Mar 05, 2023 6:35    Post subject: Reply with quote
Does anyone have any better ideas, or is this just what I'm gonna have to work with for now?
Dallan
DD-WRT Novice


Joined: 21 Mar 2024
Posts: 1

PostPosted: Thu Mar 21, 2024 18:48    Post subject: Reply with quote
Runed0S wrote:
Does anyone have any better ideas, or is this just what I'm gonna have to work with for now?


You have no idea how much I hate that this works, but I've been fiddling and searching for weeks to do something similar with my R7000P to try and resolve some weird packet loss issues, and this was the most functional config I've seen/implemented.

I suppose it might be possible to unbridge the relevant vlans/interfaces entirely so they'd show up in the list of bondable interfaces (like eth0 does) without having to create the redundant bridges, but when I tried that the entire router stopped responding to connections and I had to reset the settings entirely. So cursed but functional beats sane but broken I guess?
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1954

PostPosted: Thu Mar 21, 2024 18:57    Post subject: Reply with quote
There have been changes to this code recently. So, if not testing any bonding on current releases, then it's probably moot.
_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3004
Location: Germany

PostPosted: Fri Mar 22, 2024 11:31    Post subject: Reply with quote
You can try for a long time.
It doesn't work on routers with one CPU port anyway.
Bonding requires two physical interfaces and not just one

The router has 1! Physical ethernet port which is used for WAN and LAN via VLAN trunking.

WAN and LAN share one port
And no software in the world turns one port into 2 or 4

_________________
Quickstart guides:
use Pi-Hole as simple DNS-Server with DD-WRT
VLAN configuration via GUI - 1 CPU port
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc)

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 23.05.3 - Gateway
Qualcomm IPQ8065 - R7800 - DD-WRT - WAP
Runed0S
DD-WRT Novice


Joined: 09 Jul 2020
Posts: 19

PostPosted: Fri Mar 22, 2024 18:23    Post subject: Reply with quote
Dallan wrote:
Runed0S wrote:
Does anyone have any better ideas, or is this just what I'm gonna have to work with for now?


You have no idea how much I hate that this works, but I've been fiddling and searching for weeks to do something similar with my R7000P to try and resolve some weird packet loss issues, and this was the most functional config I've seen/implemented.

I suppose it might be possible to unbridge the relevant vlans/interfaces entirely so they'd show up in the list of bondable interfaces (like eth0 does) without having to create the redundant bridges, but when I tried that the entire router stopped responding to connections and I had to reset the settings entirely. So cursed but functional beats sane but broken I guess?


This works on my router! I have a normal r7000 though, not a r7000p. Nothing seems to have changed about the router performance btw.



Screenshot_20240322-142041.png
 Description:
 Filesize:  283.43 KB
 Viewed:  646 Time(s)

Screenshot_20240322-142041.png


ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3004
Location: Germany

PostPosted: Fri Mar 22, 2024 18:29    Post subject: Reply with quote
I don't know what you're imagining.
As I said, it is not technically possible for it to work.

Click on the link in my signature 1CPU Port
There are nice diagrams there and you can see that the router only has 1 network interface.

More than 1Gbit can never flow through the interface
Fullduplex even only 500Mbit
What you are doing is hocus-pocus without any advantages

_________________
Quickstart guides:
use Pi-Hole as simple DNS-Server with DD-WRT
VLAN configuration via GUI - 1 CPU port
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc)

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 23.05.3 - Gateway
Qualcomm IPQ8065 - R7800 - DD-WRT - WAP
Runed0S
DD-WRT Novice


Joined: 09 Jul 2020
Posts: 19

PostPosted: Sat Mar 23, 2024 3:18    Post subject: Reply with quote
Well, this "hocus pocus magic" that isn't supposed to give me any benefit seems to work fine. I'm able to transfer stuff at around 1.5gbps over the internet.
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1079
Location: WV, USA

PostPosted: Sat Mar 23, 2024 4:34    Post subject: Reply with quote
While it may work, there is no benefit above the fact that it works. My R6400v2 is only getting ~30Mb/s on LAN. It is an AP only so no WAN. But compared to my dual cpu port EA8500, it is getting close to ~900Mb/s. That's a pretty significant difference.

I have not tried Bonding, but thought about it several times. I have two Ethernet cables running from the house to garage, presently only using one of them. The goal was to create a Bond from TP-Link managed switches. Never got to it, but speeds are better than expected without. Maybe someday.

_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate
Wireless 5ghz only

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r55779
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r55799

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port. DD-WRT r55779

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3004
Location: Germany

PostPosted: Sat Mar 23, 2024 11:20    Post subject: Reply with quote
Runed0S wrote:
Well, this "hocus pocus magic" that isn't supposed to give me any benefit seems to work fine. I'm able to transfer stuff at around 1.5gbps over the internet.


proof?

I don't see how that could be possible Smile
If your WAN is configured correctly (which it is not) all LAN <-> WAN traffic is routed through the CPU and firewall.
And the CPU is only connected with 1Gbit.

Code:
link: port:5 link:up speed:1000baseT full-duplex


Even if you bypass the firewall, all VLANs are isolated at switch level and are only bridged in the CPU.
again only 1Gbit

Do you use CTF+FA?
This could be a reason why packets are routed past the processor

_________________
Quickstart guides:
use Pi-Hole as simple DNS-Server with DD-WRT
VLAN configuration via GUI - 1 CPU port
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc)

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 23.05.3 - Gateway
Qualcomm IPQ8065 - R7800 - DD-WRT - WAP
baboeska
DD-WRT User


Joined: 22 Jun 2011
Posts: 64

PostPosted: Mon Apr 08, 2024 13:00    Post subject: Reply with quote
I have pondered the possibility of bonding using two USB connections, or a USB and Ethernet connection, this should, in theory be possible?
As an amateur I would assume ctf+fa may bypass cpu enough to give a bonus from bonding? Vs sfe? Vs No HW accel?
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3004
Location: Germany

PostPosted: Mon Apr 08, 2024 13:08    Post subject: Reply with quote
Yes, it will work with USB network adapters.
But I doubt that CTF+FA will work with USB adapters.

Nobody knows exactly how CTF+FA works but it is assumed that there is a processor in the switch chip and traffic is routed past the CPU.

With USB adapters the switch fabric is not used at all.
And the router does not have enough CPU power for 2Gbit NAT

This is a low-end router and not a multi-gigabit router. Crying or Very sad

_________________
Quickstart guides:
use Pi-Hole as simple DNS-Server with DD-WRT
VLAN configuration via GUI - 1 CPU port
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc)

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 23.05.3 - Gateway
Qualcomm IPQ8065 - R7800 - DD-WRT - WAP
Runed0S
DD-WRT Novice


Joined: 09 Jul 2020
Posts: 19

PostPosted: Mon Apr 08, 2024 14:13    Post subject: Reply with quote
ho1Aetoo wrote:
Runed0S wrote:
Well, this "hocus pocus magic" that isn't supposed to give me any benefit seems to work fine. I'm able to transfer stuff at around 1.5gbps over the internet.


proof?

I don't see how that could be possible Smile
If your WAN is configured correctly (which it is not) all LAN <-> WAN traffic is routed through the CPU and firewall.
And the CPU is only connected with 1Gbit.

Code:
link: port:5 link:up speed:1000baseT full-duplex


Even if you bypass the firewall, all VLANs are isolated at switch level and are only bridged in the CPU.
again only 1Gbit

Do you use CTF+FA?
This could be a reason why packets are routed past the processor


I do use CTF+FA, and tested between a computer with 2 computers on 2 different bonds on the same subnet. That could explain the crazy speeds that outpace what the router can do.

I currently pay for 250mbps internet, but I get 500 with bonding on speedtest.net. The speed boost is probably a carrier misconfiguration, but I can download 2 things at 250mbps instead of just one with this setup. Before I could only do one.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum