Skip to content

wired slaves with NetworkManager #4076

Closed
jvonau wants to merge 6 commits intoiiab:masterfrom
jvonau:wired-slave
Closed

wired slaves with NetworkManager #4076
jvonau wants to merge 6 commits intoiiab:masterfrom
jvonau:wired-slave

Conversation

@jvonau
Copy link
Copy Markdown
Contributor

@jvonau jvonau commented Aug 30, 2025

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:

@holta holta added this to the 8.3 milestone Aug 30, 2025
@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Aug 30, 2025

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Aug 30, 2025

@jvonau jvonau changed the title DRAFT: wired slaves with NetworkManager wired slaves with NetworkManager Aug 30, 2025
@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Aug 30, 2025

For the life of me I have no clue on why ap0 is on channel 157 and hostapd did not fail..

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Aug 31, 2025

WTF and is working:

systemctl status dnsmasq
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; disabled; preset: enabled)
Active: active (running) since Sat 2025-08-30 13:39:13 CDT; 1 day 2h ago
Invocation: 85cdd306a21d4db090c23238c3380afc
Docs: man:dnsmasq(8)
Process: 6718 ExecStartPre=/usr/share/dnsmasq/systemd-helper checkconfig (code=exited, status=0/SUCCESS)
Process: 6724 ExecStart=/usr/share/dnsmasq/systemd-helper exec (code=exited, status=0/SUCCESS)
Process: 6731 ExecStartPost=/usr/share/dnsmasq/systemd-helper start-resolvconf (code=exited, status=0/SUCCESS)
Main PID: 6729 (dnsmasq)
Tasks: 1 (limit: 9566)
CPU: 3.827s
CGroup: /system.slice/dnsmasq.service
└─6729 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.>
Aug 30 13:59:24 pi500 dnsmasq-dhcp[6729]: DHCPREQUEST(br0) 10.10.10.115 fa:c7:26:e3:26:ec
Aug 30 13:59:24 pi500 dnsmasq-dhcp[6729]: DHCPACK(br0) 10.10.10.115 fa:c7:26:e3:26:ec Jerry-s-A14
Aug 31 11:09:18 pi500 dnsmasq-dhcp[6729]: DHCPDISCOVER(br0) fa:c7:26:e3:26:ec
Aug 31 11:09:18 pi500 dnsmasq-dhcp[6729]: DHCPOFFER(br0) 10.10.10.115 fa:c7:26:e3:26:ec
Aug 31 11:09:18 pi500 dnsmasq-dhcp[6729]: DHCPDISCOVER(br0) fa:c7:26:e3:26:ec
Aug 31 11:09:18 pi500 dnsmasq-dhcp[6729]: DHCPOFFER(br0) 10.10.10.115 fa:c7:26:e3:26:ec
Aug 31 11:09:18 pi500 dnsmasq-dhcp[6729]: DHCPDISCOVER(br0) fa:c7:26:e3:26:ec
Aug 31 11:09:18 pi500 dnsmasq-dhcp[6729]: DHCPOFFER(br0) 10.10.10.115 fa:c7:26:e3:26:ec
Aug 31 11:09:18 pi500 dnsmasq-dhcp[6729]: DHCPREQUEST(br0) 10.10.10.115 fa:c7:26:e3:26:ec
Aug 31 11:09:18 pi500 dnsmasq-dhcp[6729]: DHCPACK(br0) 10.10.10.115 fa:c7:26:e3:26:ec Jerry-s-A14

edit

cat /var/log/nginx/access.log
10.0.0.117 - - [31/Aug/2025:17:08:40 -0500] "GET /usb HTTP/1.1" 301 169 "android-app://com.google.android.googlequicksearchbox/" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Mobile Safari/537.36" "http_x_forwarded_for"
10.0.0.117 - - [31/Aug/2025:17:08:40 -0500] "GET /usb/ HTTP/1.1" 200 754 "android-app://com.google.android.googlequicksearchbox/" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Mobile Safari/537.36" "http_x_forwarded_for"
10.0.0.117 - - [31/Aug/2025:17:08:40 -0500] "GET /upload2usb/upload-simple.css HTTP/1.1" 200 2004 "http://pi500.local/usb/" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Mobile Safari/537.36" "http_x_forwarded_for"
10.0.0.117 - - [31/Aug/2025:17:26:11 -0500] "GET /usb/ HTTP/1.1" 200 754 "android-app://com.google.android.googlequicksearchbox/" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Mobile Safari/537.36" "http_x_forwarded_for"

@jvonau jvonau mentioned this pull request Aug 31, 2025
@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Aug 31, 2025

#4077 (comment)

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Sep 1, 2025

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 iiab-wired-slave-remove

@holta
Copy link
Copy Markdown
Member

holta commented Sep 25, 2025

@jvonau what's a good way to test this PR?

If you have a moment, to recommend/summarize for testing volunteers 🙏

Comment thread roles/network/templates/network/wired-manage.conf Outdated
Co-authored-by: A Holt <holta@users.noreply.github.com>
@holta
Copy link
Copy Markdown
Member

holta commented Nov 2, 2025

@deldesir can you help test & review this PR?

@holta holta requested a review from deldesir November 2, 2025 18:46
@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Nov 2, 2025

@jvonau what's a good way to test this PR?

If you have a moment, to recommend/summarize for testing volunteers 🙏

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'
Apply this PR and sudo iiab-network
Now connect some wired dhcp clients to the switch and see if those clients get an ip address.

@holta
Copy link
Copy Markdown
Member

holta commented Nov 2, 2025

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'
Apply this PR and sudo iiab-network
Now connect some wired dhcp clients to the switch and see if those clients get an ip address.

@deldesir I'll help, e.g. if you can't handle this on your own?

@tim-moody
Copy link
Copy Markdown
Contributor

btw, another important aspect of this feature is that it allows captive portal to work for such extended connections.

@holta holta removed the request for review from deldesir November 4, 2025 11:18
@holta
Copy link
Copy Markdown
Member

holta commented Nov 4, 2025

FYI @deldesir doesn't have a network switch available, so he's unable to test this PR.

@holta
Copy link
Copy Markdown
Member

holta commented Nov 4, 2025

@jvonau what's a good way to test this PR?
If you have a moment, to recommend/summarize for testing volunteers 🙏

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' Apply this PR and sudo iiab-network Now connect some wired dhcp clients to the switch and see if those clients get an ip address.

@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!)

@holta holta requested a review from EMG70 November 4, 2025 11:32
@holta
Copy link
Copy Markdown
Member

holta commented Nov 4, 2025

@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.

@holta holta requested a review from muthuri-dev November 4, 2025 11:39
@holta
Copy link
Copy Markdown
Member

holta commented Nov 6, 2025

Apply this PR and sudo iiab-network

@muthuri-dev when you get to this stage, here is a quick way to apply this PR:

sudo -i
cd /opt/iiab/iiab
git pull https://github.com/jvonau/iiab wired-slave --no-rebase --no-edit
iiab-network

@EMG70
Copy link
Copy Markdown
Contributor

EMG70 commented Nov 6, 2025

@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.

I will give it a try in a couple of hours and let you know how.

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Nov 7, 2025

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.

=IIAB==========================================================================
COMMAND: /usr/sbin/bridge -d link # Bridge for LAN side
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

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?

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Nov 7, 2025

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.

@holta holta requested a review from muthuri-dev November 15, 2025 14:53
@holta
Copy link
Copy Markdown
Member

holta commented Nov 15, 2025

@jvonau is there any targeted testing @muthuri-dev and @deldesir can help with here?

  • Can we break apart the problem into smaller steps, each of which can be tested?

  • Or can we point out materials they should study, to better understand intermediary steps achieving the larger goal?

ASIDE: They'd also like to understand PR #4093 much better, if specific tests can be articulated there too.

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Nov 15, 2025

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.

@holta
Copy link
Copy Markdown
Member

holta commented Nov 15, 2025

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.

@tim-moody
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member

@muthuri-dev muthuri-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
actual:_eth0_unmanaged_(not_working) expected:_eth0_bridged_(working)

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
⚠️ Clients fall back to IPv6 auto-configuration

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.

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Nov 15, 2025

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.

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Nov 15, 2025

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

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.

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:

[NetDev]
Name=br0
Kind=bridge

Then reboot

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Nov 15, 2025

The other way based on 4093 is create /etc/netplan/60-iiab.yaml containing:

network:
  version: 2
  renderer: networkd
  bridges:
    br0:
      dhcp4: no
      dhcp6: no
      addresses: [10.10.10.10/24]

then reboot

Copy link
Copy Markdown
Member

@muthuri-dev muthuri-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Including this file in the PR, or
  2. Adding logic to create it automatically if missing, or
  3. Documenting this requirement in the PR description for systems that may be missing this file

Image from another device which got the IPV4
ipv4

@holta
Copy link
Copy Markdown
Member

holta commented Nov 15, 2025

The other way based on 4093 is create /etc/netplan/60-iiab.yaml containing:

network:
  version: 2
  renderer: networkd
  bridges:
    br0:
      dhcp4: no
      dhcp6: no
      addresses: [10.10.10.10/24]

then reboot

@muthuri-dev can you also test the approach above? (As a completely independent test!)

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Nov 16, 2025

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.

@muthuri-dev
Copy link
Copy Markdown
Member

The other way based on 4093 is create /etc/netplan/60-iiab.yaml containing:

network:
  version: 2
  renderer: networkd
  bridges:
    br0:
      dhcp4: no
      dhcp6: no
      addresses: [10.10.10.10/24]

then reboot

Alternative Method Test Result: ✅ WORKING

Tested the netplan-based configuration as suggested by @jvonau
Test Setup:
Created /etc/netplan/60-iiab.yaml with bridge configuration above.

Results After Reboot:

/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 
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 forever
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 forever

Verification:

✅ eth0 and ap0 both enslaved to br0
✅ br0 configured with correct IP address (10.10.10.10/24)
✅ Wired clients successfully receiving IPv4 addresses
✅ DHCP service working for wired connections

Conclusion:
Both methods work successfully:

Systemd method: Creating /etc/systemd/network/IIAB-Bridge.netdev
Netplan method: Creating /etc/netplan/60-iiab.yaml

works

@holta
Copy link
Copy Markdown
Member

holta commented Nov 16, 2025

Thanks @muthuri-dev for having confirmed.

Copy link
Copy Markdown
Member

@muthuri-dev muthuri-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 forever

DHCP 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=br0

Network Manager Configuration:

root@box:~# cat /etc/NetworkManager/conf.d/IIAB-Slave-eth0.conf
# IIAB WiFi
[keyfile]
unmanaged-devices=interface-name:eth0

RasPiOS 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.254

Configuration 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]

⚠️ Bridge exists but no 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"

⚠️ eth0 is configured as standalone with DHCP enabled

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 IPv6LL

⚠️ eth0 is being configured by netplan-generated files

Generated 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.network

Ubuntu 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

@holta
Copy link
Copy Markdown
Member

holta commented Jan 11, 2026

Thanks @muthuri-dev for pushing to expand test coverage! 🦁

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Jan 11, 2026

9366c226

-rw------- 1 root root 370 Aug  5 20:00 /etc/netplan/02-iiab-config.yaml
                        ...ITS LAST 100 LINES FOLLOW...
 
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]

'Netplan hoops' mentioned above see #3385

@muthuri-dev
Copy link
Copy Markdown
Member

9366c226

-rw------- 1 root root 370 Aug  5 20:00 /etc/netplan/02-iiab-config.yaml
                        ...ITS LAST 100 LINES FOLLOW...
 
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]

'Netplan hoops' mentioned above see #3385

Manual Netplan Fix Verification

After commenting out the conflicting eth0 configuration in /etc/netplan/02-iiab-config.yaml (as suggested in #3385) and running netplan apply and reboot:

Netplan Configuration After Fix

Modified /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: [REDACTED]

Bridge Status After Fix

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 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 Ubuntu

root@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:8a

Conclusion

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 02-iiab-config.yaml with eth0: dhcp4: true, which conflicts with enslaving eth0 to the bridge.

Behavior Summary:

  • RasPiOS Trixie: ✅ Works out-of-the-box (no netplan conflicts)
  • Ubuntu 24.04: ✅ Works after removing conflicting netplan config (manual step required)

As @jvonau noted in his comment, this relates to the known "netplan hoops" issue documented in #3385.

@holta
Copy link
Copy Markdown
Member

holta commented Jan 16, 2026

📊 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

Do Ubuntu 26.04 pre-releases behave identically to 24.04 so far?

@muthuri-dev can you confirm?

@holta
Copy link
Copy Markdown
Member

holta commented Jan 16, 2026

Do Ubuntu 26.04 pre-releases behave identically to 24.04 so far?

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?

@networking-king
Copy link
Copy Markdown

Do Ubuntu 26.04 pre-releases behave identically to 24.04 so far?

@muthuri-dev can you confirm?

Let me run a test on it and share the output here.

@jvonau
Copy link
Copy Markdown
Contributor Author

jvonau commented Jan 16, 2026

What's the best way to document Netplan advice here, for those IIAB implementers needing this on Ubuntu / Linux Mint / etc?

Didn't you say 3385 was sort of "living documentation"? Pointer on the Wiki page maybe?

@holta
Copy link
Copy Markdown
Member

holta commented Jan 17, 2026

What's the best way to document Netplan advice here, for those IIAB implementers needing this on Ubuntu / Linux Mint / etc?

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?

@jvonau jvonau mentioned this pull request Apr 10, 2026
@jvonau jvonau closed this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants