I don’t know if this is a bug or a configuration issue. Any help would be appreciated.
Summary of the problem
I have a system (that is assigned a static IP from the router) that is receiving a different IP address after waking from sleep. It only happens when my virtual machine created in Virtual Machine Manager is running before the system sleeps. The virtual machine is connected to a bridge network so that it is on the same network of the system. It appears the the vnet0 network device is requesting a dynamic address and assigning it to the bridge network before the ethernet device can.
Details of the problem
I’m running on Bazzite, although, I believe the problem may extend across any variant of Fedora. I have used the ujust enable-virtualization command and installed the qemu extension. I then created a bridge with my ethernet device as a slave with these instructions Network bridge - ArchWiki.
When the system wakes from sleep after running a virtual machine connected to this bridge, the vnet0 network takes precedence over the ethernet network.
I have an OPNSense router applying a static IPv4/6 address to the system. Running ip a on the system shows the same MAC address for the bridge (br0) and the ethernet device (enp…), but a different MAC for the vnet0 device. I can see on the router that the MAC from the vnet0 device is getting a leased address. This is the address that gets applied to the bridge, even though the bridge should have a static address according to its MAC address.
Issue this causes
When I wake the system the IP address is different, even though it should be static. I have firewall rules to ensure only specific DNS servers are allowed. This causes loss of internet connectivity only on the system (VM has connectivity) when resuming from sleep.
Troubleshooting
I can bring the static IP address back by running nmcli connection up bridge-br0, but then it destroys the vnet0 network and the virtual machine has no connection. I can restore this connection by suspending and resuming the virtual machine.