openwrt / openwrt/netifd

port bonding seems to work only with "force all ports to be up"

Open
#48 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
37
Forks
62
PR merge metrics
No merged PRs in 30d

Description

this may be related to my question in the luci project:
luci-mod-network: link bonding policy not propagated
I need to enable all links (mark "all ports active") in openwrt before the bonding link actually works.
Any idea how I could debug this? is it the client machine (NetworkManager)? or the openwrt device which isn't forwarding over the correct eth device and needs forcing?
On the client machine, the config file of networkManager 'bond0':

[connection]
id=bond0
uuid=564a257f-030b-4ccd-bf80-6cfc56ea750f
type=bond
controller=virbr0
interface-name=bond0
port-type=bridge
timestamp=1743751479

[ethernet]

[bond]
miimon=100
mode=active-backup
primary=enp16s0

[bridge-port]

and of bond-slave-enp16s0:

[connection]
id=bond-slave-enp16s0
uuid=121b7c3c-01b2-495a-8c53-c6afafe79b6e
type=ethernet
controller=bond0
interface-name=enp16s0
port-type=bond

[ethernet]

[bond-port]

and ultimately, bond-slave-enp37s0:

cat /etc/NetworkManager/system-connections/bond-slave-enp37s0.nmconnection 
[connection]
id=bond-slave-enp37s0
uuid=37fbfdf5-f5ca-453b-8dba-fd2d1c9fd356
type=ethernet
controller=bond0
port-type=bond

[ethernet]
auto-negotiate=true

so, this looks ok, right? but unfortunately, it's not.
If I do not force the eth16s0 slave and mark "all ports active", it doesn't work
How can I debug this?

EDIT add procfs contents

On client machine:

cat /proc/net/bonding/bond0 
Ethernet Channel Bonding Driver: v6.12.13

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: enp16s0 (primary_reselect always)
Currently Active Slave: enp16s0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

Slave Interface: enp37s0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 11
Permanent HW addr: 00:d8:61:72:d5:e9
Slave queue ID: 0

Slave Interface: enp16s0
MII Status: up
Speed: 2500 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 6c:b3:11:65:54:a3
Slave queue ID: 0

on openwrt device:

cat /proc/net/bonding/bondjp 
Ethernet Channel Bonding Driver: v6.6.87

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: sfp-lan (primary_reselect always)
Currently Active Slave: sfp-lan
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

Slave Interface: lan1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: ee:29:c6:fe:2f:73
Slave queue ID: 0

Slave Interface: sfp-lan
MII Status: up
Speed: 2500 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: ee:29:c6:fe:2f:74
Slave queue ID: 0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is identified. Start by reviewing the linked LuCI issue and comparing the client’s /proc/net/bonding/bond0 output with the OpenWrt device’s /proc/net/bonding/bondjp; done means identifying whether netifd fails to propagate the bonding policy or whether the issue is elsewhere in the network path.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.