Hi,
a technical question:
I'd like to build a router on a machine with four ethernet and one wlan
adapter, using Ubuntu 24.04 server, coming with 255.4-1ubuntu8.6. I
need to build a bridge with two of the ethernets and the wlan as an
accesspoint, making use of as much default software as possible, i.e.
systemd, networkd, netplan.
Problem:
It's easy to configure the wlan adapter as a client and put it in a
bridge, but not as an access point.
First attempt, straight forward, /etc/netplan/60-bridge-lan.yaml
network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: no
enp5s0:
dhcp4: no
wifis:
wlp1s0:
dhcp4: no
access-points:
"hurra":
mode: ap
password: something
bridges:
lan:
dhcp4: no
addresses:
- "192.168.122.1/24"
-"fdfc:1234:5678:1234::1/24"
interfaces:
- enp4s0
- enp5s0
- wlp1s0
doesn't work:
ERROR: wlp1s0: hurra: networkd does not support this wifi mode
Second attempt, doing as many websites propose, running the wlan with hostapd
and using it as a regular ethernet, i.e. removing the wifis section and using
instead
ethernets:
enp4s0:
dhcp4: no
enp5s0:
dhcp4: no
wlp1s0:
dhcp4: no
doesn't work either. Error message
2025-04-11T14:11:29.023613+00:00 mini20 systemd-networkd[1281]: wlp1s0:
Failed to set master interface: Device does not allow enslaving to a
bridge. Operation not supported
which is clearly wrong, since a manual
brctl addif lan wlp1s0
works properly
Third attempt, not configuring the wifi with netplan at all, just listing it as
a bridge interface, results in
# networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 enp3s0 ether routable configured
3 enp4s0 ether enslaved configured
4 enp5s0 ether no-carrier configured
5 enp6s0 ether off unmanaged
6 wlp1s0 wlan degraded unmanaged
7 lan bridge routable configured
man pages systemd.netdev and systemd.network don't help either.
So my question is:
What is the correct and supposed way to build a bridge interface with ethernets
and a wifi access point with systemd and networkd?
Thank you and best regards
Hadmut