I've created a service that sets 4addr on for my Intel ax210 wireless adapter (following this guide https://community.clearlinux.org/t/wireless-nic-bridge-for-kvm/5848/3) when my Rocky Linux 9 server boots up (running kernel 6.14). I then added the wifi adapter to the bridge (br1 in my case) with a .nmconnection config like this:
[connection]
id=cool
uuid=015a8f8f-5440-40b5-8caf-e6ff3f9d63e1
type=wifi
interface-name=wlp1s0
controller=br1
port-type=bridge
[wifi]
mode=infrastructure
ssid={WIFI_SSID_HERE}
[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk={WIFI_PASSWORD_HERE}
[bridge-port]
My ifcfg-br1 file in /etc/sysconfig/network-scripts looks like this:
TYPE=Bridge
BOOTPROTO=dhcp
DEVICE=br1
ONBOOT=yes
ZONE=public
With this setup, when I reboot the server, internet works fine on my host and KVM guests, for a while, until it doesn't, and then sometimes randomly does work again.
When I configured a KVM virtual machine guest to use br1 as the bridge, the internet works for the most part, but then sometimes it quits working, and then it will randomly start working again, and then quit working again. I don't understand the pattern.
And when this happens, sometimes both the host connection and the guest connection on the same network don't work anymore. Yet, a virtual machine configured to use the NAT interface (not one of the bridge interfaces) works just fine while the other two don't.
What gives? I am able to ping these virtual machines sometimes, and other times, the router says destination unreachable. But, it will reach it at times...
I saw this and tried to do this:
https://askubuntu.com/a/207588
# undo the earlier configuration
iw dev wlan0 set 4addr off
add a second interface
iw dev wlan0 interface add wds.wlan0 type managed 4addr on
ip link set dev wds.wlan0 addr $ADDR
ip link set dev wds.wlan0 up
The above commands didn't work for me though because the device was busy. I'm not even sure if you have to do that, but so far, it's not working reliably across the host or its virtual machines. What am I missing to make and keep the networking working perfectly across the bridge interface and guests using the "Virtual network 'default' : NAT" network source via the wifi adapter?
This is a MinisForum mini-pc that doesn't have an Ethernet port...