Network bridge intialization fails on startup but succeeds later

I am trying to configure an automatically starting bridge to provide public IP addresses from the DHCP server to both host and guest VMs. This works fine once manually configured but requires intervention every reboot.

There are two physical ethernet connections called ens1 and enp0s25. I’m trying to use enp0s25 as the bridged connection.

I have created a bridge using nmcli

nmcli con add type bridge ifname br0
nmcli con add type bridge-slave ifname enp0s25 master br0
nmcli con down enp0s25
nmcli con up br0
nmcli con up enp0s25

This seems to work as expected, and if the virtual machine is started after br0 is configured it gets a public IP that I am able to use to connect to it.

The problem I have is that upon rebooting br0 fails to initialize (DHCP times out) and enp0s25 gets initialized as an independent ethernet connection. If it disable it then br0 initializes correctly and if I restart the virtual machine it then gets a public IP again. ( See the attached logs from journalctl -u NetworkManager )

nmcli con down enp0s25
nmcli con up br0
nmcli con up enp0s25

I would like everything to configure automatically on boot, but I haven’t really understood what is wrong about the configuration. How exactly are ens1 and enp0s25 getting configured? The only scripts in /etc/sysconfig/network-scripts are

/etc/sysconfig/network-scripts/
├── ifcfg-bridge-br0
└── ifcfg-bridge-slave-enp0s25
# ifcfg-bridge-br0
STP=yes
BRIDGING_OPTS=priority=32768
TYPE=Bridge
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=bridge-br0
UUID=4cf066e9-9637-4e39-9927-09313c998c6f
DEVICE=br0
ONBOOT=yes
IPV4_DHCP_TIMEOUT=60 # Added to try longer timeout
# ifcfg-bridge-slave-enp0s25
TYPE=Ethernet
NAME=bridge-slave-enp0s25
UUID=98a04553-e0cf-40df-bcad-8325549f1222
DEVICE=enp0s25
ONBOOT=yes
BRIDGE=br0

I am also curious if what needs to be done to get the virtual machine’s network connection to reinitialize once br0 is up on the host. (I tried restarting the network service on the guest, but this didn’t seem to do anything.) Probably a bit out of scope for askfedora, as the guest is ubuntu.

Below are the NetworkManager logs from reboot to successful dhcp configuration of the bridge:

-- Reboot --
-- Reboot --
18:28:32 localhost.localdomain systemd[1]: Starting Network Manager...
18:28:33 localhost.localdomain NetworkManager[1740]: <info>  [1602260913.5027] NetworkManager (version 1.22.16-1.fc32) is starting... (for the first time)
18:28:33 localhost.localdomain NetworkManager[1740]: <info>  [1602260913.5030] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 20-connectivity-fedora.conf)
18:28:33 localhost.localdomain NetworkManager[1740]: <info>  [1602260913.5120] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
18:28:33 localhost.localdomain systemd[1]: Started Network Manager.
18:28:33 localhost.localdomain NetworkManager[1740]: <info>  [1602260913.9915] manager[0x559e26447060]: monitoring kernel firmware directory '/lib/firmware'.
18:28:34 localhost.localdomain NetworkManager[1740]: <info>  [1602260914.1752] hostname: hostname: using hostnamed
18:28:34 localhost.localdomain NetworkManager[1740]: <info>  [1602260914.1753] hostname: hostname changed from (none) to "localhost.localdomain"
18:28:34 localhost.localdomain NetworkManager[1740]: <info>  [1602260914.1761] dns-mgr[0x559e26427220]: init: dns=default,systemd-resolved rc-manager=symlink
18:28:34 localhost.localdomain NetworkManager[1740]: <info>  [1602260914.2094] manager[0x559e26447060]: rfkill: Wi-Fi hardware radio set enabled
18:28:34 localhost.localdomain NetworkManager[1740]: <info>  [1602260914.2095] manager[0x559e26447060]: rfkill: WWAN hardware radio set enabled
18:28:34 localhost.localdomain NetworkManager[1740]: <info>  [1602260914.7052] Loaded device plugin: NMAtmManager (/usr/lib64/NetworkManager/1.22.16-1.fc32/libnm-device-plugin-adsl.so)
18:28:34 localhost.localdomain NetworkManager[1740]: <info>  [1602260914.8820] Loaded device plugin: NMBluezManager (/usr/lib64/NetworkManager/1.22.16-1.fc32/libnm-device-plugin-bluetooth.so)
18:28:34 localhost.localdomain NetworkManager[1740]: <info>  [1602260914.8974] Loaded device plugin: NMWwanFactory (/usr/lib64/NetworkManager/1.22.16-1.fc32/libnm-device-plugin-wwan.so)
18:28:34 localhost.localdomain NetworkManager[1740]: <info>  [1602260914.9690] Loaded device plugin: NMWifiFactory (/usr/lib64/NetworkManager/1.22.16-1.fc32/libnm-device-plugin-wifi.so)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.0042] Loaded device plugin: NMTeamFactory (/usr/lib64/NetworkManager/1.22.16-1.fc32/libnm-device-plugin-team.so)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.0045] manager: rfkill: Wi-Fi enabled by radio killswitch; enabled by state file
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.0046] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.0047] manager: Networking is enabled by state file
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.0048] dhcp-init: Using DHCP client 'internal'
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.0730] settings: Loaded settings plugin: ifcfg-rh ("/usr/lib64/NetworkManager/1.22.16-1.fc32/libnm-settings-plugin-ifcfg-rh.so")
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.0730] settings: Loaded settings plugin: keyfile (internal)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2114] device (lo): carrier: link connected
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2116] manager: (lo): new Generic device (/org/freedesktop/NetworkManager/Devices/1)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2124] device (enp0s25): carrier: link connected
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2127] manager: (enp0s25): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2211] device (enp0s25): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2299] device (enp0s25): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2311] device (enp0s25): Activation: starting connection 'enp0s25' (9dd01a2c-c582-4a6c-b9b7-55b5ca46c493)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2314] device (ens1): carrier: link connected
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2318] manager: (ens1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/3)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2341] device (ens1): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2351] device (ens1): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2359] device (ens1): Activation: starting connection 'ens1' (94b50c7d-e569-48da-833c-8edcdfadecba)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.2784] manager: (br0): new Bridge device (/org/freedesktop/NetworkManager/Devices/4)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.3459] device (br0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4033] device (enp0s25): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4037] device (enp0s25): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4041] device (ens1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4044] device (ens1): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4056] modem-manager: ModemManager available
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4057] device (enp0s25): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4060] device (enp0s25): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4070] device (ens1): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4073] device (ens1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4090] device (br0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4109] policy: auto-activating connection 'bridge-br0' (4cf066e9-9637-4e39-9927-09313c998c6f)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4114] device (br0): Activation: starting connection 'bridge-br0' (4cf066e9-9637-4e39-9927-09313c998c6f)
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4115] device (br0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4119] manager: NetworkManager state is now CONNECTING
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4133] device (br0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4257] device (enp0s25): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4260] device (enp0s25): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4277] device (enp0s25): Activation: successful, device activated.
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4288] device (ens1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4291] device (ens1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.4306] device (ens1): Activation: successful, device activated.
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.6495] device (br0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.6499] device (br0): IPv4 config waiting until carrier is on
18:28:35 localhost.localdomain NetworkManager[1740]: <info>  [1602260915.6499] device (br0): IPv6 config waiting until carrier is on
18:29:06 localhost.localdomain NetworkManager[1740]: <info>  [1602260946.5365] manager: (virbr0): new Bridge device (/org/freedesktop/NetworkManager/Devices/5)
18:29:06 localhost.localdomain NetworkManager[1740]: <info>  [1602260946.5632] manager: (virbr0-nic): new Tun device (/org/freedesktop/NetworkManager/Devices/6)
18:29:06 localhost.localdomain NetworkManager[1740]: <info>  [1602260946.5754] device (virbr0-nic): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
18:29:06 localhost.localdomain NetworkManager[1740]: <info>  [1602260946.5770] device (virbr0-nic): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8017] device (virbr0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8062] device (virbr0): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8075] device (virbr0): Activation: starting connection 'virbr0' (50be1b92-19e7-48f8-a9dd-cf622fe7e08c)
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8079] device (virbr0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8086] device (virbr0): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8112] device (virbr0-nic): Activation: starting connection 'virbr0-nic' (d856e0fc-90ef-4f41-b624-a861070b13b9)
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8114] device (virbr0): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8119] device (virbr0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8136] device (virbr0-nic): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8142] device (virbr0-nic): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8147] device (virbr0-nic): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8149] device (virbr0): bridge port virbr0-nic was attached
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8149] device (virbr0-nic): Activation: connection 'virbr0-nic' enslaved, continuing activation
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8152] device (virbr0-nic): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8295] device (virbr0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8298] device (virbr0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8310] device (virbr0): Activation: successful, device activated.
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8315] device (virbr0-nic): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8318] device (virbr0-nic): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
18:29:07 localhost.localdomain NetworkManager[1740]: <info>  [1602260947.8333] device (virbr0-nic): Activation: successful, device activated.
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5740] device (virbr0-nic): state change: activated -> unmanaged (reason 'connection-assumed', sys-iface-state: 'external')
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5748] device (virbr0): bridge port virbr0-nic was detached
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5748] device (virbr0-nic): released from master device virbr0
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5769] manager: (vnet0): new Tun device (/org/freedesktop/NetworkManager/Devices/7)
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5798] device (vnet0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5815] device (vnet0): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5829] device (vnet0): Activation: starting connection 'vnet0' (1b8f87c5-81a9-4c84-859c-5b3ea2ab56ef)
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5836] device (vnet0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5841] device (vnet0): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5844] device (vnet0): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5846] device (br0): bridge port vnet0 was attached
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5846] device (vnet0): Activation: connection 'vnet0' enslaved, continuing activation
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5847] device (br0): IPv4 config waiting until carrier is on
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5848] device (br0): IPv6 config waiting until carrier is on
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.5849] device (vnet0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.6814] device (vnet0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.6817] device (vnet0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
18:29:11 localhost.localdomain NetworkManager[1740]: <info>  [1602260951.6828] device (vnet0): Activation: successful, device activated.
18:29:38 localhost.localdomain NetworkManager[1740]: <info>  [1602260978.6562] agent-manager: agent[7f16787c50edf93f,:1.43/org.kde.plasma.networkmanagement/1000]: agent registered
18:29:41 localhost.localdomain NetworkManager[1740]: <info>  [1602260981.3762] device (br0): carrier: link connected
18:29:41 localhost.localdomain NetworkManager[1740]: <info>  [1602260981.3766] dhcp4 (br0): activation: beginning transaction (timeout in 60 seconds)
18:30:20 localhost.localdomain NetworkManager[1740]: <info>  [1602261020.3989] audit: op="statistics" arg="refresh-rate-ms" pid=2430 uid=1000 result="success"
18:30:20 localhost.localdomain NetworkManager[1740]: <info>  [1602261020.4208] audit: op="statistics" arg="refresh-rate-ms" pid=2430 uid=1000 result="success"
18:30:20 localhost.localdomain NetworkManager[1740]: <info>  [1602261020.6684] audit: op="statistics" arg="refresh-rate-ms" pid=2430 uid=1000 result="success"
18:30:20 localhost.localdomain NetworkManager[1740]: <info>  [1602261020.6836] audit: op="statistics" arg="refresh-rate-ms" pid=2430 uid=1000 result="success"
18:30:23 localhost.localdomain NetworkManager[1740]: <info>  [1602261023.5656] audit: op="statistics" arg="refresh-rate-ms" pid=2430 uid=1000 result="success"
18:30:23 localhost.localdomain NetworkManager[1740]: <info>  [1602261023.5867] audit: op="statistics" arg="refresh-rate-ms" pid=2430 uid=1000 result="success"
18:30:24 localhost.localdomain NetworkManager[1740]: <info>  [1602261024.3777] audit: op="statistics" arg="refresh-rate-ms" pid=2430 uid=1000 result="success"
18:30:24 localhost.localdomain NetworkManager[1740]: <info>  [1602261024.3916] audit: op="statistics" arg="refresh-rate-ms" pid=2430 uid=1000 result="success"
18:30:42 localhost.localdomain NetworkManager[1740]: <warn>  [1602261042.1710] dhcp4 (br0): request timed out
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.1713] dhcp4 (br0): state changed unknown -> timeout
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.1713] device (br0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.1721] manager: NetworkManager state is now CONNECTED_GLOBAL
18:30:42 localhost.localdomain NetworkManager[1740]: <warn>  [1602261042.1737] device (br0): Activation: failed for connection 'bridge-br0'
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.1814] device (br0): detached bridge port vnet0
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.1838] device (vnet0): state change: activated -> unmanaged (reason 'connection-assumed', sys-iface-state: 'external')
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.1857] device (br0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.1955] dhcp4 (br0): canceled DHCP transaction
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.1956] dhcp4 (br0): state changed timeout -> done
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.2003] policy: auto-activating connection 'bridge-br0' (4cf066e9-9637-4e39-9927-09313c998c6f)
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.2538] device (br0): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed')
18:30:42 localhost.localdomain NetworkManager[1740]: <info>  [1602261042.2544] manager: startup complete
18:30:57 localhost.localdomain NetworkManager[1740]: <info>  [1602261057.9726] device (enp0s25): state change: activated -> deactivating (reason 'user-requested', sys-iface-state: 'external')
18:30:57 localhost.localdomain NetworkManager[1740]: <info>  [1602261057.9741] audit: op="connection-deactivate" uuid="9dd01a2c-c582-4a6c-b9b7-55b5ca46c493" name="enp0s25" pid=3072 uid=0 result="success"
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0370] device (enp0s25): state change: deactivating -> disconnected (reason 'user-requested', sys-iface-state: 'external')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0487] policy: auto-activating connection 'bridge-slave-enp0s25' (98a04553-e0cf-40df-bcad-8325549f1222)
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0497] policy: auto-activating connection 'bridge-br0' (4cf066e9-9637-4e39-9927-09313c998c6f)
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0503] device (enp0s25): Activation: starting connection 'bridge-slave-enp0s25' (98a04553-e0cf-40df-bcad-8325549f1222)
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0519] device (br0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0534] device (br0): state change: unavailable -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0543] device (br0): Activation: starting connection 'bridge-br0' (4cf066e9-9637-4e39-9927-09313c998c6f)
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0546] device (enp0s25): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0550] manager: NetworkManager state is now CONNECTING
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0570] device (br0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0585] device (br0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0596] device (enp0s25): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0680] device (br0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0684] device (br0): IPv4 config waiting until carrier is on
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0685] device (br0): IPv6 config waiting until carrier is on
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0710] device (enp0s25): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0721] device (br0): attached bridge port enp0s25
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0721] device (enp0s25): Activation: connection 'bridge-slave-enp0s25' enslaved, continuing activation
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0722] device (br0): IPv4 config waiting until carrier is on
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0722] device (br0): IPv6 config waiting until carrier is on
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0725] device (enp0s25): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0746] device (enp0s25): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0756] device (enp0s25): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
18:30:58 localhost.localdomain NetworkManager[1740]: <info>  [1602261058.0770] device (enp0s25): Activation: successful, device activated.
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.8960] device (br0): carrier: link connected
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.8965] dhcp4 (br0): activation: beginning transaction (timeout in 60 seconds)
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9336] dhcp4 (br0): option dhcp_lease_time      => '14400'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9336] dhcp4 (br0): option domain_name          => 'XXXXXXXX'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9336] dhcp4 (br0): option domain_name_servers  => '111.222..0.200 111.222..0.201'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9336] dhcp4 (br0): option expiry               => '1602275488'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9337] dhcp4 (br0): option ip_address           => '111.222..89.100'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9337] dhcp4 (br0): option next_server          => '111.222..0.205'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9337] dhcp4 (br0): option ntp_servers          => '111.222..0.123'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9337] dhcp4 (br0): option requested_broadcast_address => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9337] dhcp4 (br0): option requested_domain_name => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9337] dhcp4 (br0): option requested_domain_name_servers => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9337] dhcp4 (br0): option requested_domain_search => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9338] dhcp4 (br0): option requested_host_name  => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9338] dhcp4 (br0): option requested_interface_mtu => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9338] dhcp4 (br0): option requested_ms_classless_static_routes => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9338] dhcp4 (br0): option requested_nis_domain => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9338] dhcp4 (br0): option requested_nis_servers => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9338] dhcp4 (br0): option requested_ntp_servers => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9338] dhcp4 (br0): option requested_rfc3442_classless_static_routes => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9339] dhcp4 (br0): option requested_root_path  => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9339] dhcp4 (br0): option requested_routers    => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9339] dhcp4 (br0): option requested_static_routes => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9339] dhcp4 (br0): option requested_subnet_mask => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9339] dhcp4 (br0): option requested_time_offset => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9339] dhcp4 (br0): option requested_wpad       => '1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9339] dhcp4 (br0): option routers              => '111.222..88.1'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9339] dhcp4 (br0): option subnet_mask          => '255.255.254.0'
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9340] dhcp4 (br0): state changed unknown -> bound
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9359] device (br0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9616] device (br0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9621] device (br0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9629] manager: NetworkManager state is now CONNECTED_GLOBAL
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9642] policy: set 'bridge-br0' (br0) as default for IPv4 routing and DNS
18:31:28 localhost.localdomain NetworkManager[1740]: <info>  [1602261088.9930] device (br0): Activation: successful, device activated.
18:31:29 localhost.localdomain NetworkManager[1740]: <info>  [1602261089.0182] policy: set-hostname: set hostname to 'fedora-host' (from address lookup)
1 Like

You are using the legacy plugin, try to switch to the modern one:
https://fedoraproject.org/wiki/Changes/NetworkManager_keyfile_instead_of_ifcfg_rh#How_To_Test

Alternatively, you can set up a bridge with systemd-networkd:
https://fedoraproject.org/wiki/Cloud/Network-Requirements#Bridging

1 Like

Okay, I will try that when I am able. However, I would really like to understand why/what is wrong with the current configuration as it seems like it should work. Additionally is there a way to revert all network configurations to whatever Fedora would default to?

1 Like

This looks like a race condition but cause is typically hard to identify.
Finding someone who actively uses bridging configured with NetworkManager may be problematic.

Reverting network configuration depends on the method how it was modified.
This is not trivial in general case due to multiple different configs which may affect the resulting behavior.

By the way, have you tried to disable STP?
In addition, the article doesn’t mention explicit activation of the slave interface, perhaps you should also avoid doing it.

I have switched the configuration to use keyfiles but nothing has changed. Disabling STP also had no effect. I deleted all configs and tried to create it from scratch again as follows:

nmcli con delete enp0s25 # This line doesn't seem to matter after multiple attempts.
nmcli con add type bridge ifname br0
nmcli con add type bridge-slave ifname enp0s25 master br0

After this the bridge functions and on reboot simply deactivating enp0s25 allows the bridge and bridge-slave connections function correctly.

It seems NetworkManager always creates a config for enp0s25 that becomes active and this must be manually deactivated before the bridge can come up (The logs look the same as before). nmcli -f ALL conn shows the config is located at /run/NetworkManager/system-connections/enp0s25.nmconnection

#/run/NetworkManager/system-connections/enp0s25.nmconnection
[connection]
id=enp0s25
uuid=90074749-d0a2-41e1-bcbc-02376ee518f1
type=ethernet
autoconnect=false
interface-name=enp0s25
permissions=
timestamp=1602426968

[ethernet]
mac-address=18:66:DA:31:EC:20
mac-address-blacklist=

[ipv4]
dns-priority=100
dns-search=
method=disabled

[ipv6]
addr-gen-mode=stable-privacy
dns-priority=100
dns-search=
method=auto

[proxy]

[.nmmeta]
nm-generated=true
volatile=true

I have not yet tried systemd-networkd. I’m curious if there are any common conflicts and known issues between NetworkManager and networkd , or can I just start networkd without any worries?

1 Like

You can try to disable automatic activation:

sudo tee /etc/NetworkManager/conf.d/00-custom.conf << EOF > /dev/null
[main]
no-auto-default=*
EOF
sudo systemctl restart NetworkManager.service

I think it should be possible to run both simultaneously as they are supposed to work independently.
If there are any conflicts, you can specify unmanaged interfaces.

Never solved this with NetworkManager. It seems like this may be related to this https://bugzilla.redhat.com/show_bug.cgi?id=1760262
Just running nmcli networking off; nmcli networking on after boot brings the bridge up correctly, but lo and virbr0 are not brought back up.

With systemd-networkd things work as expected. Just create the configs according to https://fedoraproject.org/wiki/Cloud/Network-Requirements#Bridging
Then disable NetworkManager, enable networkd and reboot:

# Create bridge configs as described 
sudo systemctl disable NetworkManager
sudo systemctl enable systemd-networkd
sudo reboot