Use systemd-resolve with NetworkManager, use netplan for bridging, Fix DEPRECATION WARNINGs#4093
Use systemd-resolve with NetworkManager, use netplan for bridging, Fix DEPRECATION WARNINGs#4093holta merged 23 commits intoiiab:masterfrom
Conversation
|
|
Issue with the VM updating initramfs-tools:
|
|
VM related
Trying to install "systemd" as a dependency tells me this VM is not using systemd as the init system like the way the other unittest RasPiOS on Zero 2 W test VM does. Edit: Correction systemd is being upgraded
but the failure at initramfs-tools
prevents the rest of the update to proceed to the point where systemd-resolve would be started and making use of
breaking DNS name resolution in the VM.
|
|
|
Just RasPiOS the ubuntu family already is configured like that so the makes things more uniform across distros. The link is desired for 2 reasons, first the resolver will cache the dns lookups for faster response to subsequent lookups and provides the needed interface zone lookups to enable concurrent working dns when the VPN is active. |
When you say "ubuntu family" here, are you including the wider family e.g. Debian 13 Trixie? (And also Ubuntu 24.04 derivatives like Mint 22, and Trisquel 12?) |
|
The Ubuntu family would include MintOS and perhaps Trisquel. Haven't seen a iiab-diagnostics from Trisquel posted yet. Debian is the bases for RasPiOS so that would included also. The VM test fails because apt upgrade is not preformed before that start of installing IIAB. |
Interesting! 🧩 Tangentially related: |
618f327 to
d5c4e18
Compare
|
@EMG70 would you have time to test[*] this PR on 64-bit RPiOS? Either on "Lite" or "with desktop" ? [*] If you do have time, please test that the WiFi hostpot actually works well in the end 😄 |
|
Failure at ansible collections
potential cause
|
|
https://githubstatus.com confirms...
|
|
I don't have time to explain the backstory about the "nameserver 127.0.0.53" right now. |
@EMG70 please make sure all apt updates are applied (with a reboot!) before beginning test of this PR, to be extra sure!
|
|
NetworkManager has baked in netplan as a single source of truth in newer releases making things more Ubuntu like in the networking department, just trying to get out in front of future issues. In the past dnsmasq parsed /etc/resolv.conf to gather the information on what upstream dns servers to query for internet websites, it appears that with /etc/resolv.conf now being a symlink the parsing is not preformed as in the past. This is not really a big issue for IIAB and it's usual use of dnsmasq for dns and dhcp for the wifi clients connected via hostapd except for when 'iiab_gateway_enabled=True' there would be no way to make the upstream DNS query. Side notes:
|
3c2f9d3 to
b6f07ef
Compare
|
|
Would be worthy to look at #4067 also given it's 2 month old statnding |
|
0b957ee4 and 5b572c02 That chipset/driver doesn't support running both ap and sta at the same time. Running Pi500 Some document fodder for the wiki. |
|
@holta I used https://github.com/lwfinger/rtw88 to compile the driver on RasPiOS https://forums.raspberrypi.com/viewtopic.php?t=315108 |
output for this one : and |
FWIW I would try compiling the above alternate driver, not sure if that would unlock being able to run ap and sta concurrently, the key change to look for is replacing the 'interface combinations are not supported' with 'valid interface combinations' in the |
Good place and flags aren't really needed, just looking at the high level should be enough to identify the attached devices. |
|
Cloning detection but I would rather pursue that in a different issue/PR The other way might be better to grep for 'interface combinations are not supported' and revise the logic, hence lets move that part to a new issue. |
Funny thing is users showing up with random wifi equipment and expecting stuff to just work, #3057 as noted in the wiki, that is how the can_be_ap code came into being. This hardware is the newest corner case with a cloning issue. |
PR #4093 Test Results - Ubuntu 24.04 LTS (Marvell WiFi Chipset)Test Environment
✅ WHAT WORKS PERFECTLY:1. Modern DNS Stack Integration:
# systemd-resolved active and listening
$ systemctl status systemd-resolved | grep Active
Active: active (running) since Tue 2025-12-23 19:19:47 UTC
# Listening on 127.0.0.53
$ ss -tulnp | grep 127.0.0.53
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=574,fd=14))
tcp LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=574,fd=15))
# dnsmasq forwarding to systemd-resolved
$ journalctl -u dnsmasq | grep "127.0.0.53"
Dec 23 19:19:50 box dnsmasq[1079]: using nameserver 127.0.0.53#532. Netplan Bridge Management:
# Netplan configuration created
$ cat /etc/netplan/60-iiab.yaml
network:
version: 2
renderer: networkd
bridges:
br0:
dhcp4: no
dhcp6: no
addresses: [10.10.10.10/24]
# Bridge UP with correct IP
$ ip addr show br0
2: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
inet 10.10.10.10/24 brd 10.10.10.255 scope global br0
# ap0 enslaved to br0 and forwarding
$ bridge link show
5: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 1003. Event-Driven Startup (No Race Conditions):
# networkd-dispatcher event logs
$ journalctl -u networkd-dispatcher | grep br0
Dec 23 19:19:48 box: NET-DISP-configured br0 no-carrier
Dec 23 19:19:50 box: NET-DISP-configured br0 routable
# dnsmasq started AFTER br0 routable
$ journalctl -u dnsmasq --since "19:19:48" --until "19:19:52"
Dec 23 19:19:50 box systemd[1]: Starting dnsmasq.service...
Dec 23 19:19:50 box dnsmasq[1079]: started, version 2.90 cachesize 1504. WiFi Hotspot Functional:
# hostapd active
$ systemctl status hostapd | grep Active
Active: active (running) since Tue 2025-12-23 19:19:50 UTC
# Configuration
$ cat /etc/hostapd/hostapd.conf | grep -E '(ssid|pass|interface|channel)'
interface=ap0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=unittest
channel=6
# ap0 interface exists and UP
$ ip link show ap0
5: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP mode DEFAULT5. Configuration Correct:
# dnsmasq configuration
$ cat /etc/dnsmasq.d/dnsmasq-iiab
#IIAB
bind-dynamic
no-resolv
server=127.0.0.53
# DHCP range configured
$ journalctl -u dnsmasq | grep "DHCP, IP range"
Dec 23 19:19:50 box dnsmasq-dhcp[1079]: DHCP, IP range 10.10.10.11 -- 10.10.10.254, lease time 1h
# bind-dynamic working
$ journalctl -u dnsmasq | grep "sockets bound"
Dec 23 19:19:50 box dnsmasq-dhcp[1079]: DHCP, sockets bound exclusively to interface br06. DNS Resolution Working: # Test DNS queries
$ dig @10.10.10.10 google.com +short
142.251.47.174
$ dig @10.10.10.10 iiab.me +short
76.71.81.199📊 Architecture Flow Validated:
|
|
@holta Are you going to fix and push this PR after being broken by recent changes in master? Hope @muthuri-dev didn't waste his time testing this PR. |
|
I'll fix it here on github as I don't plan on changing anything else as this PR is the most tested change in the history of this project. |
|
@muthuri-dev this weekend (or ASAP in coming days!) is probably a good time to merge this PR in my opinion, if you agree? |
| @@ -0,0 +1,8 @@ | |||
| network: | |||
| version: 2 | |||
| renderer: networkd | |||
There was a problem hiding this comment.
I'm not too familiar with Netplan... is the goal that systemd-networkd manages br0 but everything else is managed by NetworkManager?
There was a problem hiding this comment.
https://askubuntu.com/a/1032012
should this template file have a higher priority like, 99-iiab.yml.j2?
There was a problem hiding this comment.
I'm not too familiar with Netplan... is the goal that systemd-networkd manages br0 but everything else is managed by NetworkManager?
In a nutshell, yes. I chose to use systemd-networkd as the backend as that service is started much before NetworkManager and the wired interface bridging code uses systemd-networkd to bring up the wired slaves of br0 which needs to be created before the slaves are added to br0. RasPiOS used to use dhcpcd as the network backend but since has moved to using NetworkManager and now netplan is in the mix, the code has more or less been using systemd-networkd sidestepping netplan for Ubuntu server for the last 9 years
There was a problem hiding this comment.
https://askubuntu.com/a/1032012
should this template file have a higher priority like,
99-iiab.yml.j2?
Why would you suggest that? Don't think it matters much as in the end all that is going on is the creation of a Virtual interface and assigning an IP address and waiting for the wifi or wired slaves to be added. The base file used on RasPi Ubuntu server image is 50-cloud-init.yaml.
There was a problem hiding this comment.
Yeah, it is a dumb suggestion on my part--just trying to make conversation lol :-)
The PR looks solid
chapmanjacobd
left a comment
There was a problem hiding this comment.
similar discussion happening here: basecamp/omarchy#1414
@holta from all the tests I have done and what @jvonau stated should be achieved, meets all the checks. It is ready. |
How does a distribution not supported by IIAB matter? Most of that discussion is around replacing iwd with network-manager. |
|
Ah I thought Omarchy was Debian-based so I thought it was interesting that people in similar situations are doing similar things but that's Omakub. Anyway. It's completely tangential |
|


Fixes bug:
Might fix #4010 @tim-moody
Description of changes proposed in this pull request:
Use systemd-resolve with NetworkManager just like Ubuntu does
Smoke-tested on which OS or OS's:
RasPiOS trixie
https://paste.centos.org/view/0bb937dd