Description of problem: Goal: use libvirtd with NetworkManager and bridging When creating bridge in NetworkManager cli or gui the bridge interface never gets IP address. The bridge interface must have the IP address from DHCP or libvirtd VM instances will have no external connectivity. Version-Release number of selected component (if applicable): NetworkManager-0.9.9.0-26.git20131003.fc20.x86_64 How reproducible: 100% Steps to Reproduce: # nmcli connection add con-name Bridge type bridge ifname bridge0 # nmcli connection add con-name Slave type ethernet mac AA:BB:CC:DD:EE:FF or GUI Actual results: Bridge is created, but IP is set on ethernet interface *not* bridge0. Expected results: IP is assigned on bridge0
Do you still see the problems with latest NM update? If so, please include NetworkManager logs (sudo journalctl -u NetworkManager). Did you activate the Bridge and Slave? $ nmcli con up Slave
If you have builds in rawhide I will be able to confirm if this is still a problem or not.
Does not work, and I see no logs in /var/log/messages (no journal logging enabled). Its enabling 'Slave' with the IP on the ethernet interface not bridge0.
Also, the bridge interface is generating it's own mac address which doesn't work (even if I add it to my DHCP server config). Please provide me some further info to debug.
# NetworkManager --debug NetworkManager[6693]: <info> NetworkManager (version 0.9.9.1-5.git20140319.fc21) is starting... NetworkManager[6693]: <info> Read config: /etc/NetworkManager/NetworkManager.conf NetworkManager[6693]: <info> WEXT support is enabled NetworkManager[6693]: <info> VPN: loaded org.freedesktop.NetworkManager.pptp NetworkManager[6693]: <info> VPN: loaded org.freedesktop.NetworkManager.l2tp NetworkManager[6693]: <info> VPN: loaded org.freedesktop.NetworkManager.vpnc NetworkManager[6693]: <info> VPN: loaded org.freedesktop.NetworkManager.openswan NetworkManager[6693]: <info> VPN: loaded org.freedesktop.NetworkManager.openconnect NetworkManager[6693]: <info> VPN: loaded org.freedesktop.NetworkManager.openvpn NetworkManager[6693]: ifcfg-rh: Acquired D-Bus service com.redhat.ifcfgrh1 NetworkManager[6693]: <info> Loaded plugin ifcfg-rh: (c) 2007 - 2013 Red Hat, Inc. To report bugs please use the NetworkManager mailing list. NetworkManager[6693]: <info> Loaded plugin keyfile: (c) 2007 - 2013 Red Hat, Inc. To report bugs please use the NetworkManager mailing list. NetworkManager[6693]: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-Bridge ... NetworkManager[6693]: ifcfg-rh: warning: 'priority' invalid when STP is disabled NetworkManager[6693]: ifcfg-rh: read connection 'Bridge' NetworkManager[6693]: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ... NetworkManager[6693]: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-Slave ... NetworkManager[6693]: ifcfg-rh: read connection 'Slave' NetworkManager[6693]: <info> monitoring kernel firmware directory '/lib/firmware'. NetworkManager[6693]: <info> rfkill0: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/ieee80211/phy0/rfkill0) (driver iwlwifi) NetworkManager[6693]: <info> WiFi hardware radio set enabled NetworkManager[6693]: <info> WiFi disabled by radio killswitch; enabled by state file NetworkManager[6693]: <info> WWAN enabled by radio killswitch; enabled by state file NetworkManager[6693]: <info> WiMAX enabled by radio killswitch; enabled by state file NetworkManager[6693]: <info> Networking is enabled by state file NetworkManager[6693]: <info> (lo): link connected NetworkManager[6693]: <info> (lo): carrier is ON NetworkManager[6693]: <info> (lo): new Generic device (driver: 'unknown' ifindex: 1) NetworkManager[6693]: <info> (lo): exported as /org/freedesktop/NetworkManager/Devices/0 NetworkManager[6693]: <info> (bridge0): carrier is OFF NetworkManager[6693]: <info> (bridge0): new Bridge device (driver: 'bridge' ifindex: 8) NetworkManager[6693]: <info> (bridge0): exported as /org/freedesktop/NetworkManager/Devices/1 NetworkManager[6693]: <info> (bridge0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2] NetworkManager[6693]: <warn> (bridge0): device not up after timeout! NetworkManager[6693]: <info> (bridge0): preparing device NetworkManager[6693]: <info> (enp0s25): link connected NetworkManager[6693]: <info> (enp0s25): carrier is ON NetworkManager[6693]: <info> (enp0s25): new Ethernet device (driver: 'e1000e' ifindex: 2) NetworkManager[6693]: <info> (enp0s25): exported as /org/freedesktop/NetworkManager/Devices/2 NetworkManager[6693]: <info> (enp0s25): found matching connection 'Slave' NetworkManager[6693]: <info> (enp0s25): device state change: unmanaged -> unavailable (reason 'connection-assumed') [10 20 41] NetworkManager[6693]: <info> (enp0s25): device state change: unavailable -> disconnected (reason 'connection-assumed') [20 30 41] NetworkManager[6693]: <info> Activation (enp0s25) starting connection 'Slave' NetworkManager[6693]: <info> Activation (enp0s25) Stage 1 of 5 (Device Prepare) scheduled... NetworkManager[6693]: <info> (wlp3s0): using nl80211 for WiFi device control NetworkManager[6693]: <info> (wlp3s0): new 802.11 WiFi device (driver: 'iwlwifi' ifindex: 3) NetworkManager[6693]: <info> (wlp3s0): exported as /org/freedesktop/NetworkManager/Devices/3 NetworkManager[6693]: <info> (wlp3s0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2] NetworkManager[6693]: <info> (wlp3s0): preparing device NetworkManager[6693]: <info> Activation (enp0s25) Stage 1 of 5 (Device Prepare) started... NetworkManager[6693]: <info> (enp0s25): device state change: disconnected -> prepare (reason 'none') [30 40 0] NetworkManager[6693]: <info> Activation (enp0s25) Stage 2 of 5 (Device Configure) scheduled... NetworkManager[6693]: <info> Activation (enp0s25) Stage 1 of 5 (Device Prepare) complete. NetworkManager[6693]: <info> Activation (enp0s25) Stage 2 of 5 (Device Configure) starting... NetworkManager[6693]: <info> (enp0s25): device state change: prepare -> config (reason 'none') [40 50 0] NetworkManager[6693]: <info> Activation (enp0s25) Stage 2 of 5 (Device Configure) successful. NetworkManager[6693]: <info> Activation (enp0s25) Stage 3 of 5 (IP Configure Start) scheduled. NetworkManager[6693]: <info> Activation (enp0s25) Stage 2 of 5 (Device Configure) complete. NetworkManager[6693]: <info> Activation (enp0s25) Stage 3 of 5 (IP Configure Start) started... NetworkManager[6693]: <info> (enp0s25): device state change: config -> ip-config (reason 'none') [50 70 0] NetworkManager[6693]: <info> Activation (enp0s25) Beginning DHCPv4 transaction (timeout in 45 seconds) NetworkManager[6693]: <info> dhclient started with pid 6697 NetworkManager[6693]: <info> Activation (enp0s25) Stage 3 of 5 (IP Configure Start) complete. Internet Systems Consortium DHCP Client 4.3.0 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ NetworkManager[6693]: <info> (enp0s25): DHCPv4 state changed nbi -> preinit Listening on LPF/enp0s25/00:22:68:0c:96:e3 Sending on LPF/enp0s25/00:22:68:0c:96:e3 Sending on Socket/fallback DHCPDISCOVER on enp0s25 to 255.255.255.255 port 67 interval 5 (xid=0x235ff82) DHCPREQUEST on enp0s25 to 255.255.255.255 port 67 (xid=0x235ff82) DHCPOFFER from 172.18.2.1 DHCPACK from 172.18.2.1 (xid=0x235ff82) bound to 172.18.2.4 -- renewal in 2147483648 seconds. NetworkManager[6693]: <info> (enp0s25): DHCPv4 state changed preinit -> bound NetworkManager[6693]: <info> address 172.18.2.4 NetworkManager[6693]: <info> plen 24 (255.255.255.0) NetworkManager[6693]: <info> gateway 172.18.2.2 NetworkManager[6693]: <info> server identifier 172.18.2.1 NetworkManager[6693]: <info> lease time -1 NetworkManager[6693]: <info> hostname 'segfault' NetworkManager[6693]: <info> nameserver '172.18.2.6' NetworkManager[6693]: <info> nameserver '8.8.4.4' NetworkManager[6693]: <info> nameserver '8.8.8.8' NetworkManager[6693]: <info> domain name 'sh0n.net' NetworkManager[6693]: <info> domain search 'sh0n.net.' NetworkManager[6693]: <info> Activation (enp0s25) Stage 5 of 5 (IPv4 Configure Commit) scheduled... NetworkManager[6693]: <info> Activation (enp0s25) Stage 5 of 5 (IPv4 Commit) started... NetworkManager[6693]: <info> (enp0s25): device state change: ip-config -> ip-check (reason 'none') [70 80 0] NetworkManager[6693]: <info> Activation (enp0s25) Stage 5 of 5 (IPv4 Commit) complete. NetworkManager[6693]: <info> (enp0s25): device state change: ip-check -> secondaries (reason 'none') [80 90 0] NetworkManager[6693]: <info> (enp0s25): device state change: secondaries -> activated (reason 'none') [90 100 0] NetworkManager[6693]: <info> NetworkManager state is now CONNECTED_LOCAL NetworkManager[6693]: <info> Policy set 'Slave' (enp0s25) as default for IPv4 routing and DNS. NetworkManager[6693]: <info> Activation (enp0s25) successful, device activated. NetworkManager[6693]: <info> startup complete
Aha, I think I see the issue: nmcli connection add con-name Slave type ethernet mac AA:BB:CC:DD:EE:FF this creates a normal ethernet connection, it's just called "Slave". So NM has no idea that you intend this to be a bridge port since there's nothing in the connection that says it should be. To get an actual bridge slave, you want: nmcli con add con-name Slave type bridge-slave ifname enp0s25 master bridge0 nmcli con mod Slave ethernet.mac-address AA:BB:CC:DD:EE:FF If you delete the current Slave connection, and add a new one as described here, does that work?
Interesting, I will test this as soon as I'm home. If that fixes things. Then I wonder how the GUI either GNOME or KDE's manages to not bind the bridge0 to enp0s25? I will have to test nm-applet also to see if the issue comes down to KDE's applet not creating bridge configurations right or not.
In Rawhide, as per our IRC chat, it fails that same setup I mentioned. It returns a 'The dependency of the connection failed' or using nm-connection-editor and doesn't connect using the KDE plasma network manager plasmoid. It may be the name of the connections that causes this error or perhaps stale interface names left in kernel table. Using commandline with different names altogether used it worked: # nmcli connection add type bridge con-name Bridge ifname Bridge Connection 'Bridge' (cbd47a64-e6ee-4b92-b0f3-56dfc094957f) successfully added. # nmcli connection add type bridge-slave con-name Bridge-slave ifname enp0s25 master Bridge Connection 'Bridge-slave' (620dd26f-5497-4b69-8f37-aa266c0a5fbf) successfully added. Bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.18.2.4 netmask 255.255.255.0 broadcast 172.18.2.255 inet6 fe80::222:68ff:fe0c:96e3 prefixlen 64 scopeid 0x20<link> ether 00:22:68:0c:96:e3 txqueuelen 0 (Ethernet) RX packets 379 bytes 64155 (62.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 443 bytes 51193 (49.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Can you check in the logs if you get a "Bridge not up after timeout!" when it's initially detected by NM? Also, if you have the logs from when you're home that would be great to look at.
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
I have been following AdamW's documentation on creating bridges: https://www.happyassassin.net/2014/07/23/bridged-networking-for-libvirt-with-networkmanager-2014-fedora-21/ This works for me. We can close this bug.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.