luci icon indicating copy to clipboard operation
luci copied to clipboard

luci-mod-network: add support for `netifd` bonding device

Open hitech95 opened this issue 1 year ago • 17 comments

This pull request addresses a gap in Luci's functionality by introducing support for device type bonding configuration. While Netifd already incorporates this capability, Luci currently lacks the means to manage it effectively through its web interface.

immagine immagine

hitech95 avatar Apr 26 '24 20:04 hitech95

hi @hitech95 thanks for this PR. It looks useful. It will certainly satisfy a number of users who have asked for it.

I know that e.g. @jow- has a deeper understanding of this (and opinions on why it might (not) work).

In the meantime, search through the other PRs for bonding.

systemcrash avatar Apr 26 '24 23:04 systemcrash

@systemcrash I've modified the limit above, the netifd takes an integer so I've used that limit in there as I wasn't able to find the real upper limit in the kernel documentation.

I've also added dependencies for another parameter. and the "primary" interface selection for the active backup policy.

hitech95 avatar Apr 29 '24 11:04 hitech95

@hitech95 Is this ready as-is?

@svanheule is this something you could test in a switch environment to verify bonding functionality?

systemcrash avatar May 21 '24 10:05 systemcrash

@jow- any opinions?

systemcrash avatar May 21 '24 10:05 systemcrash

@svanheule is this something you could test in a switch environment to verify bonding functionality?

I'm afraid I'm currently not set up for this and I won't have time soon either to do so.

svanheule avatar May 22 '24 20:05 svanheule

@hitech95 Is this ready as-is? Yep it should be, this uses netifd built in bonding support instead of the external protocol. I'm using it on my prod router machine (x86).

Tested mainly on LACP on 2 uplinks. During initial tests I've also tested backup mode.

hitech95 avatar May 22 '24 22:05 hitech95

@hitech95 If you want to get this in sooner, I recommend drumming up a bit of support in the forums and see whether anyone else can verify this and throw it into their installation. Some of the switch threads would be a good start!

systemcrash avatar Jun 16 '24 21:06 systemcrash

@svanheule wonder if your situation has changed any?

systemcrash avatar Jun 27 '24 21:06 systemcrash

@systemcrash It hasn't and is unlikely to change the coming months. Most efficient way is probably to set something up yourself :)

svanheule avatar Jun 28 '24 19:06 svanheule

@hitech95 What device do you test on? Might be faster to find some guinea pigs in the forums who have the same device to be able to test.

systemcrash avatar Jul 06 '24 13:07 systemcrash

@systemcrash I've it currently up and tested on x89 VM and I've tested onthe mediatek target. That said I have it running in production with LACP to a GS1900 switch (now with 3Eth uplink). But on the other device I have only checked that the correct parameters has been set to the network configuration. I have not tested the netifd stuff is working as I've assumed it was working as it is included by default.

I'm gonna ask some guys if they can test it out too in the forum.

hitech95 avatar Jul 06 '24 19:07 hitech95

I threw it out to a forum thread (slightly earlier than your post) for Realtek (GS1900), and the word is that the driver is currently broken (but not necessarily an older version?). But others may be inclined?

systemcrash avatar Jul 08 '24 11:07 systemcrash

I'm trying to get help from some friends to crete a virtual lab to test things out. Unfortunatly we are a bit busy with work/univeristy.

I'll update you when some more test are completed. We can (probably) test on the follwing hardware:

  • mediatek
  • ramips
  • ath79 (not 100% sure if I have a compatible device as all my ath79 are quite old)
  • x86 (can test also with Openwrt and Debian, probably also Opnsense not sure what is supported over there)

The main stopper here is the lack of vendor devices with OEM firmwares to test against. (All my network devices runs openwrt with the exceptio of my GS1900)

hitech95 avatar Jul 09 '24 15:07 hitech95

Any progress on this?

systemcrash avatar Jul 23 '24 13:07 systemcrash

not yet :(

hitech95 avatar Jul 23 '24 13:07 hitech95

@hitech95 found any other testers in the forums?

systemcrash avatar Sep 19 '24 16:09 systemcrash

Need to ascertain if bonding is supported on Realtek yet, then I can test here also.

howels avatar Sep 20 '24 09:09 howels

Last I checked, that codebase is not up to scratch for link bonding yet. How are efforts there progressing?

systemcrash avatar Nov 27 '24 17:11 systemcrash

Hi @hitech95. Can you tell me a bit more about this? I was thinking about merging this for 24 and see how it fares in the wild. More devices are capable of this than just switches.

You compared it with the proto-bonding - does your change-set also require e.g. kmod-bonding? In which case we might need to check for the kmod. If it's installed, show the extra options, kind of thing.

systemcrash avatar Dec 16 '24 21:12 systemcrash

Sorry for the late reply. This uses kmod-bonding, and use the netifd implementation under the hood. It uses the "device" configuration instead of the "protocol" one.

The netifd implementation (from nbd) went a bit under the radar: See: https://github.com/openwrt/netifd/commit/5ba9744

There is also some lack of documentation in the wiki about hose new parameters.

hitech95 avatar Dec 19 '24 11:12 hitech95

Merged. Let's see what time does with this option. :)

systemcrash avatar Dec 19 '24 23:12 systemcrash

Merged. Let's see what time does with this option. :)

Hi, would this package be included in the upcoming 24.10.0 release?

abceleung avatar Jan 24 '25 07:01 abceleung

be included in the upcoming 24.10.0 release?

It is already included... Just look at the 24.10 commit history and you can find it there.

https://github.com/openwrt/luci/commits/openwrt-24.10/

hnyman avatar Jan 24 '25 07:01 hnyman