Conversation
|
For the life of me I have no clue on why ap0 is on channel 157 and hostapd did not fail.. |
|
WTF and is working:
edit
|
|
This would always add wired devices under br0 if there was no gateway present on the device. This would mimic Ubuntu server images but without having having to jump through the netplan hoops, on other distros including ones with NetworkManager active. To remove the bridged device to enable WAN use the provided script |
|
@jvonau what's a good way to test this PR? If you have a moment, to recommend/summarize for testing volunteers 🙏 |
Co-authored-by: A Holt <holta@users.noreply.github.com>
|
@deldesir can you help test & review this PR? |
With an active WiFi connection for ssh just plug a hub/switch with no other dhcp servers available on that wired segment to get a 'carrier state' |
@deldesir I'll help, e.g. if you can't handle this on your own? |
|
btw, another important aspect of this feature is that it allows captive portal to work for such extended connections. |
|
FYI @deldesir doesn't have a network switch available, so he's unable to test this PR. |
@EMG70 if you have time to help? (Hopefully this PR is very quick to test in coming days or weeks, when you have a moment!) |
@EMG70 FYI if you need help, @muthuri-dev might be able to help you out here. |
@muthuri-dev when you get to this stage, here is a quick way to apply this PR: |
I will give it a try in a couple of hours and let you know how. |
|
Nowhere close the layout in #3724 (reply in thread) is how that should be configured. There is no /etc/NetworkManager/conf.d/IIAB-Slave-eth0.network. Should show up attached to the bridge interface like ap0 below but as eth0 where ap0 is noted.
You would not been able to just plug the cable into the router and get an ip address, did you run iiab-wired-slave-remove perhaps? |
|
One can't have a default route on the ethernet connection when iiab-network is run, that will exclude the device from being eligible to be come a slave, the default route being present make the detection automatically assumes that the connection is a WAN connection. The potential slave device needs a 'on link' status but otherwise not configured, NM running on the device is OK as long as there in no default route present. |
|
@jvonau is there any targeted testing @muthuri-dev and @deldesir can help with here?
ASIDE: They'd also like to understand PR #4093 much better, if specific tests can be articulated there too. |
|
No point as IIAB-Bridge.netdev is no longer being provided there will be no br0 created without hostapd being active for this code to work, just like #4128 and sysd-netd trying to add the slaves before br0 is available. Put this one on hold while 4093 becomes finalized. While 4093 deals with having the netplan renderer control the creation of br0 to solve this oversight. I might have to come back to this and use netplan for the ethernet slaves' creation, might have a timing issue around when br0 becomes available with NM as the renderer be better just to have netplan write the files. |
|
Huge thanks @jvonau for the explanation. @muthuri-dev (in Kenya) and @deldesir (in a similar high opportunity situation) are very eager to learn, and assist us here. |
|
In the midst of this let's keep in mind that some will want dns and dhcp services available through an external wifi router even if hostapd is not running. |
muthuri-dev
left a comment
There was a problem hiding this comment.
Current Situation
Based on your diagnostics, the PR is not functioning as expected on the system. The configuration file it created is:
root@box:~# cat /etc/NetworkManager/conf.d/IIAB-Slave-eth0.conf
# IIAB WiFi
[keyfile]
unmanaged-devices=interface-name:eth0
root@box:~# cat /etc/NetworkManager/conf.d/*.conf | grep -i unmanaged
unmanaged-devices=interface-name:ap0
unmanaged-devices=interface-name:eth0
This tells NetworkManager to ignore eth0 instead of adding it to the bridge. That's why:
- eth0 is NOT in the bridge (only ap0 is)
- Wired clients won't get IPv4 addresses from dnsmasq/br0
- I am seeing IPv6 (clients falling back to auto-configuration)
root@box:~# /usr/sbin/bridge -d link
4: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 100
hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off neigh_vlan_suppress off vlan_tunnel off isolated off locked off mab off mcast_n_groups 0 mcast_max_groups 0
Test Result setup
- Raspberry Pi 5 with RasPiOS
- WiFi connected for SSH
- Ethernet connected to switch (no other DHCP)
- Applied PR and ran iiab-network
Key differences highlighted:
Expected (Top):
✅ eth0 is enslaved to br0 (green)
✅ Wired clients get IPv4 addresses (10.10.10.x)
✅ Both eth0 and ap0 are bridge members
Actual (Bottom):
❌ eth0 is UNMANAGED (red)
❌ eth0 is NOT bridged to br0
❌ Wired clients can't get DHCP from dnsmasq
iiab-diagnostics: https://paste.centos.org/view/e848a787
The configuration appears to be marking the interface as unmanaged rather than creating a bridge slave connection.
|
This create a wired slave functionality is currently broken in master by having IIAB-Bridge.netdev absent and might be a contributing factor in #4099 (comment) When 4093 becomes merged Ubuntu based server installs where the renderer is systemd-network should just work as netplan will write the required files for br0 and the supplied slave files will work. In master branch the NetworkManager backend won't write the slave systemd-network files that are needed so there would no change there. |
Understood, this PR was written before the removal of IIAB-Bridge.netdev so the slave IIAB.network file is ineffective due to the missing br0 device when the slaves should be added. You could add /etc/systemd/network/IIAB-Bridge.netdev containing: Then reboot |
|
The other way based on 4093 is create /etc/netplan/60-iiab.yaml containing: then reboot |
muthuri-dev
left a comment
There was a problem hiding this comment.
Test Result: ✅ WORKING (with additional step required)
Test Environment:
- Device: Raspberry Pi 5
- OS: RasPiOS Trixie
- Network Setup: WiFi connected for SSH, ethernet connected to switch with no other DHCP servers.
Initial Issue:
After applying the PR and running iiab-network, eth0 was not being enslaved to br0. The configuration file /etc/NetworkManager/conf.d/IIAB-Slave-eth0.conf was created but eth0 remained unmanaged.
Root Cause:
As identified by @jvonau , the PR was written before the removal of IIAB-Bridge.netdev, so the slave configuration had no bridge device to attach to when slaves should be added.
Solution:
Created the missing bridge configuration file as suggested by @jvonau :
sudo -i
nano /etc/systemd/network/IIAB-Bridge.netdev
Contents:
[NetDev]
Name=br0
Kind=bridge
Then rebooted the system.
Final Result: ✅ SUCCESS
Bridge configuration after reboot:
/usr/sbin/bridge -d link
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 19
5: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 100
Device status:
nmcli device status
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected preconfigured
eth0 ethernet connected (externally) eth0
br0 bridge connected (externally) br0
ap0 wifi unmanaged --
Recommendation:
The PR works correctly once the IIAB-Bridge.netdev file is present. Consider either:
- Including this file in the PR, or
- Adding logic to create it automatically if missing, or
- Documenting this requirement in the PR description for systems that may be missing this file
@muthuri-dev can you also test the approach above? (As a completely independent test!) |
|
I'm going to wait, no changes to this PR until 4093 is pushed as this PR has been tested on RasPiOS trixie and works. This would be an enhancement to that platform. |
Alternative Method Test Result: ✅ WORKING Tested the netplan-based configuration as suggested by @jvonau Results After Reboot: Verification: ✅ eth0 and ap0 both enslaved to br0 Conclusion: Systemd method: Creating /etc/systemd/network/IIAB-Bridge.netdev |
|
Thanks @muthuri-dev for having confirmed. |
There was a problem hiding this comment.
PR #4076 Testing Results
@jvonau I tested PR #4076 on both RasPiOS Trixie and Ubuntu 24.04 LTS on Raspberry Pi 5 with PR #4093 already merged.
✅ Test 1: RasPiOS Trixie (Debian) - SUCCESS
Environment
- Device: Raspberry Pi 5
- OS: Debian Linux 13 (trixie)
- Kernel: Linux 6.12.62+rpt-rpi-2712
- Architecture: arm64
- Network Management: systemd-networkd (direct)
- Base: Clean IIAB installation with PR #4093 merged
Results
Bridge Status:
root@box:~# /usr/sbin/bridge -d link
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 19
hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off neigh_vlan_suppress off vlan_tunnel off isolated off locked off mab off mcast_n_groups 0 mcast_max_groups 0
5: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 100
hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off neigh_vlan_suppress off vlan_tunnel off isolated off locked off mab off mcast_n_groups 0 mcast_max_groups 0✅ Both eth0 and ap0 enslaved to br0
Bridge Configuration:
root@box:~# ip addr show br0
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 1a:c6:ba:ab:24:30 brd ff:ff:ff:ff:ff:ff
inet 10.10.10.10/24 brd 10.10.10.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::18c6:baff:feab:2430/64 scope link proto kernel_ll
valid_lft forever preferred_lft foreverDHCP Service:
root@box:~# journalctl -u dnsmasq -f
Jan 11 15:46:08 box dnsmasq-dhcp[1253]: DHCPDISCOVER(br0) 8c:dc:d4:cf:4a:ee
Jan 11 15:46:08 box dnsmasq-dhcp[1253]: DHCPOFFER(br0) 10.10.10.214 8c:dc:d4:cf:4a:ee
Jan 11 15:46:08 box dnsmasq-dhcp[1253]: DHCPREQUEST(br0) 10.10.10.214 8c:dc:d4:cf:4a:ee
Jan 11 15:46:08 box dnsmasq-dhcp[1253]: DHCPACK(br0) 10.10.10.214 8c:dc:d4:cf:4a:ee archserver✅ Wired client (archserver) successfully received IP 10.10.10.214
Configuration Files Created:
root@box:~# cat /etc/systemd/network/IIAB-Slave-eth0.network
# /etc/systemd/network/IIAB-Slave-eth0.network
[Match]
Name=eth0
[Link]
RequiredForOnline=no
[Network]
Bridge=br0Network Manager Configuration:
root@box:~# cat /etc/NetworkManager/conf.d/IIAB-Slave-eth0.conf
# IIAB WiFi
[keyfile]
unmanaged-devices=interface-name:eth0RasPiOS Test Result: ✅ WORKS PERFECTLY
- Bridge created automatically (by PR #4093)
- eth0 enslaved to br0 without manual intervention
- Wired clients receive DHCP IPv4 addresses through br0
- No manual file creation or configuration required
- Hardware test: Connected external computer to switch, received IP immediately
❌ Test 2: Ubuntu 24.04 LTS - eth0 NOT ENSLAVED
Environment
- Device: Raspberry Pi 5
- OS: Ubuntu 24.04.3 LTS
- Kernel: Linux 6.8.0-1044-raspi
- Architecture: arm64
- Network Management: netplan (renderer: systemd-networkd)
- Base: Clean IIAB installation with PR #4093 merged
iiab-network Output (Partial)
PLAY RECAP *************************************************************************************************************************
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 eth0 ether degraded configuring
3 wlan0 wlan routable configured
4 tailscale0 none carrier unmanaged
5 br0 bridge no-carrier configured
6 ap0 wlan no-carrier unmanaged
6 links listed.
Results
Bridge Status:
root@box:~# /usr/sbin/bridge -d link
5: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 100
hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off vlan_tunnel off isolated off locked off❌ Only ap0 is enslaved to br0 - eth0 is MISSING
Network Status:
root@box:~# networkctl status
● Interfaces: 2, 3, 4, 6, 5, 1
State: routable
Online state: online
Address: 192.168.1.73 on wlan0
10.10.10.10 on br0
fe80::2ecf:67ff:fe23:bdfb on eth0
Gateway: 192.168.1.254 on wlan0
DNS: 192.168.1.254Configuration Files Created by PR:
root@box:~# ls -la /etc/systemd/network/IIAB-Slave-*.network
-rw-r--r-- 1 root root 116 Jan 11 18:54 /etc/systemd/network/IIAB-Slave-eth0.network
root@box:~# cat /etc/systemd/network/IIAB-Slave-eth0.network
# /etc/systemd/network/IIAB-Slave-eth0.network
[Match]
Name=eth0
[Link]
RequiredForOnline=no
[Network]
Bridge=br0✅ PR correctly created the slave configuration file
Netplan Configuration (PR #4093):
root@box:~# cat /etc/netplan/60-iiab.yaml
network:
version: 2
renderer: networkd
bridges:
br0:
dhcp4: no
dhcp6: no
addresses: [10.10.10.10/24]interfaces: specified
All Netplan Files on System:
root@box:~# ls -la /etc/netplan/
total 24
drwxr-xr-x 2 root root 4096 Jan 11 18:54 .
drwxr-xr-x 126 root root 12288 Jan 11 19:00 ..
-rw------- 1 root root 370 Aug 5 20:00 02-iiab-config.yaml
-rw------- 1 root root 129 Jan 11 18:54 60-iiab.yaml
root@box:~# cat /etc/netplan/02-iiab-config.yaml
network:
version: 2
ethernets:
eth0:
optional: true
dhcp4: true
dhcp6: true
wifis:
wlan0:
optional: true
dhcp4: true
regulatory-domain: "KE"
access-points:
"Graphit":
auth:
key-management: "psk"
password: "d14bd18b86e3b16841d65e825415ac13afdd3d76a6b6b395135f216c459b8097"Systemd-Networkd Logs:
root@box:~# journalctl -u systemd-networkd | grep eth0
Jan 11 17:51:18 box systemd-networkd[11179]: eth0: found matching network '/run/systemd/network/10-netplan-eth0.network', based on potentially unpredictable interface name
Jan 11 17:51:18 box systemd-networkd[11179]: eth0: Configuring with /run/systemd/network/10-netplan-eth0.network.
Jan 11 17:55:50 box systemd-networkd[11179]: eth0: Gained carrier
Jan 11 17:55:50 box systemd-networkd[11179]: eth0: found matching network '/run/systemd/network/10-netplan-eth0.network', based on potentially unpredictable incat /etc/netplan/02-iiab-config.yamlterface name
Jan 11 17:55:52 box systemd-networkd[11179]: eth0: Gained IPv6LLGenerated Netplan Configuration:
root@box:~# ls -la /run/systemd/network/10-netplan-*
-rw-r--r-- 1 root root 156 Jan 11 19:13 /run/systemd/network/10-netplan-br0.network
-rw-r--r-- 1 root root 167 Jan 11 19:13 /run/systemd/network/10-netplan-eth0.network
-rw-r--r-- 1 root root 315 Jan 11 19:13 /run/systemd/network/10-netplan-wlan0.networkUbuntu Test Result: ❌ eth0 NOT ENSLAVED TO BRIDGE
- Bridge (br0) created successfully by PR #4093 ✅
- PR #4076 creates slave configuration files correctly ✅
- BUT: eth0 is not enslaved to br0 ❌
- Wired clients cannot get DHCP through br0 ❌
- eth0 remains configured as standalone interface by netplan
📊 Comparison Summary
| Aspect | RasPiOS Trixie | Ubuntu 24.04 |
|---|---|---|
| Network Configuration Tool | systemd-networkd (direct) | netplan → systemd-networkd |
| Config File Location | /etc/systemd/network/ |
/etc/netplan/*.yaml |
| Runtime Generated Configs | None | /run/systemd/network/10-netplan-* |
| PR #4076 slave file created? | ✅ Yes | ✅ Yes |
| Slave file location | /etc/systemd/network/ |
/etc/systemd/network/ |
| eth0 enslaved automatically? | ✅ Yes | ❌ No |
| Wired DHCP working? | ✅ Yes (10.10.10.x) | ❌ No |
| Hardware Test | ✅ External PC got IP | ❌ External PC did not get IP |
iiab-diagnostics(ubuntu):https://paste.centos.org/view/9366c226
|
Thanks @muthuri-dev for pushing to expand test coverage! 🦁 |
|
9366c226 |
Manual Netplan Fix VerificationAfter commenting out the conflicting Netplan Configuration After FixModified network:
version: 2
#ethernets:
# eth0:
# optional: true
# dhcp4: true
# dhcp6: true
wifis:
wlan0:
optional: true
dhcp4: true
regulatory-domain: "KE"
access-points:
"Graphit":
auth:
key-management: "psk"
password: [REDACTED]Bridge Status After Fixroot@box:~# /usr/sbin/bridge -d link
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 19
hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off vlan_tunnel off isolated off locked off
5: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 100
hairpin off guard off root_block off fastleave off learning on flood on mcast_flood on bcast_flood on mcast_router 1 mcast_to_unicast off neigh_suppress off vlan_tunnel off isolated off locked off✅ Both eth0 and ap0 now enslaved to br0 DHCP Working on Ubunturoot@box:~# sudo journalctl -u dnsmasq -f
Jan 12 12:24:22 box dnsmasq-dhcp[1150]: DHCPREQUEST(br0) 192.168.1.118 8c:dc:d4:cf:4a:ee
Jan 12 12:24:22 box dnsmasq-dhcp[1150]: DHCPNAK(br0) 192.168.1.118 8c:dc:d4:cf:4a:ee wrong network
Jan 12 12:24:25 box dnsmasq-dhcp[1150]: DHCPDISCOVER(br0) 192.168.1.118 8c:dc:d4:cf:4a:ee
Jan 12 12:24:25 box dnsmasq-dhcp[1150]: DHCPOFFER(br0) 10.10.10.214 8c:dc:d4:cf:4a:ee
Jan 12 12:24:25 box dnsmasq-dhcp[1150]: DHCPREQUEST(br0) 10.10.10.214 8c:dc:d4:cf:4a:ee
Jan 12 12:24:25 box dnsmasq-dhcp[1150]: DHCPACK(br0) 10.10.10.214 8c:dc:d4:cf:4a:ee archserver✅ Wired client (archserver) successfully received IP 10.10.10.214 Active DHCP Lease: root@box:~# cat /var/lib/misc/dnsmasq.leases
1768213465 8c:dc:d4:cf:4a:ee 10.10.10.214 archserver ff:4c:11:26:3c:00:02:00:00:ab:11:59:20:e5:f2:5d:89:72:8aConclusion✅ Confirmed: PR #4076 works correctly on Ubuntu 24.04 when the conflicting netplan configuration is removed. The core functionality of PR #4076 is sound. The issue is the same netplan conflict documented in #3385 - Ubuntu's initial IIAB installation creates Behavior Summary:
As @jvonau noted in his comment, this relates to the known "netplan hoops" issue documented in #3385. |
Do Ubuntu 26.04 pre-releases behave identically to 24.04 so far? @muthuri-dev can you confirm? |
As @muthuri-dev answers the above question: What's the best way to document Netplan advice here, for those IIAB implementers needing this on Ubuntu / Linux Mint / etc? |
Let me run a test on it and share the output here. |
Didn't you say 3385 was sort of "living documentation"? Pointer on the Wiki page maybe? |
@muthuri-dev can you make a recommendation as to where we should edit https://github.com/iiab/iiab/wiki/IIAB-Networking ? Also using #3385 as living documentation, as @jvonau outlines above? |


Fixes bug:
Wired ethernet under br0 if not gateway
Description of changes proposed in this pull request:
see diff
Smoke-tested on which OS or OS's:
pending on RasPiOS Trixie
Mention a team member @username e.g. to help with code review: