GNOME Bugzilla – Bug 540995
Network interfaces won't join the bonding interface
Last modified: 2013-05-11 12:19:03 UTC
(Copied from https://bugs.launchpad.net/ubuntu/+source/knetworkmanager/+bug/239999) -- The feature: Network Manager should assist the user as much as reasonably possible in setting up a bond0 interface. -- Motivating scenario: I'm watching a movie, accessed via sshfs from my desktop box over the wired interface. I get hungry, so I decide to move my laptop to my kitchen and continue watching the movie while cooking. The sshfs connection should seamlessly stay alive, such that I don't have to restart mplayer. -- A sketch of a solution: Look at the IP address and netmask of available interfaces. If two interfaces lie within the same network, ask the user whether to try enabling bonding. If yes, modprobe bonding mode=1, set up bond0, enslave eth0 and eth1 (say) with the fastest being the primary. Let the user say "always bond", "always bond for $ESSID", "never bond", "never bond for $ESSID" after testing whether it works. -- Taking this one step further: Support other values of mode= for the bonds. Don't do this only for wired+wifi, but any number of wired and wifi interfaces. Try to diagnose and repair (or suggest repairs for) any problems that occur while trying to bond.
*** Bug 558518 has been marked as a duplicate of this bug. ***
*** Bug 580352 has been marked as a duplicate of this bug. ***
Is there any movement on this happening? A while ago somebody from the NM project had suggested to me that this was in the 0.8 roadmap. Is that still the case?
Any news on this feature? I'd still love to see it!
*** Bug 625066 has been marked as a duplicate of this bug. ***
The TODO file in git has some details on how bonding and bridging should get implemented if anyone gets around to it before I do.
Please make sure one of the test cases for this work is to have a machine with both wired and wife (with WPA[2] enabled) interfaces to the same network and that they can be configured bonded, (ideally) sharing a MAC address and that when the cable is plugged in, the cable is used to communicate with the network and when it's removed, wifi is used.
I understand from the downstream bug report (https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/239999) tracking this bug that work is under way on this feature? Is there somewhere I can track the work/progress?
This is more of an enhancement request. We have support for bonding now in NetworkManager core. Whether it fulfills the above expectations, I can't say.
We have bonding support in NetworkManager. If it's not usable for you for some reason, please comment on this bug report or file a new one.
Which version of NetworkManager is this bonding support in? Is it configurable from the nm-applet? I have FC17 here and I don't see any mention of bonding support in it's nm-applet.
Since 0.9.4 it is configurable with configuration files. If you are concerned with GUI please determine what GUI are you actually using and file a RFE for that GUI if you're interested in tracking that down. It can be nm-connection-editor or it can be gnome-control-center if you're using Gnome 3. It might be better to copy from this bugreport than reopening it.
I have now tried, unsuccessfully, to set up bonding between a wired and wireless device using the configuration files and the new NetworkManager. (the use case this bug was originally filed for) Is this setup (where the slave wireless device also needs to be configured by NM) supposed to be supported at the moment? Did I just do it wrong? Or is the current support only for bonding 'simple' wired interfaces?
> I have now tried, unsuccessfully, to set up bonding between a wired and > wireless device using the configuration files and the new NetworkManager. (the > use case this bug was originally filed for) Unfortunately I didn't yet find time to try myself. > Is this setup (where the slave wireless device also needs to be configured by > NM) supposed to be supported at the moment? My impression is that it should be supported also for ethernet + wifi. > Did I just do it wrong? Please post your configuration. And please also try to view it and activate it with 'nmcli con ...' if you have time for testing stuff. We have various issues with autoconnection of virtual interfaces that I would like to have fixed for the next release. It may be the case that bonding suffers the same problems. Reopening as apparently it doesn't work for you and later we can change the summary to better reflect the problem you have with the setup.
ifcfg-bond0: DEVICE=bond0 ONBOOT=yes BOOTPROTO=dhcp USERCTL=yes BONDING_MASTER=yes ifcfg-eth0: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes USERCTL=yes MASTER=bond0 SLAVE=yes ifcfg-wlan1: DEVICE=wlan1 BOOTPROTO=none ONBOOT=yes USERCTL=yes MASTER=bond0 SLAVE=yes I have deleted all the other ifcfg- files and NM connections I could find. When I start NM, it immediately tries to bring up bond0. It doesn't seem to actually add the eth0 and wlan1 devices to bond0 though, so 'bringing up bond0' consists of it trying to run dhclient forever on an interface that isn't connected to anything. If while it's 'connecting' bond0 I enable wired or wireless connection from the applet then NM creates a new "Auto accesspointname/Ethernet" connection which works but doesn't interact with the bond device in any way. $ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: load balancing (round-robin) MII Status: down MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 $ nmcli con NAME UUID TYPE TIMESTAMP-REAL Bond bond0 ad33d8b0-1f7b-cab9-9447-ba07f855b143 bond Fri 17 Aug 2012 01:29:13 BST Auto Ethernet 92acca2f-ea12-43de-889d-670656c26f2b 802-3-ethernet Tue 21 Aug 2012 13:23:16 BST Auto kawaihae 9c053da8-f741-47f3-931a-22a8be6cd279 802-11-wireless Tue 21 Aug 2012 13:23:03 BST (this is after I have allowed it to create the new Auto connections...) $ nmcli dev DEVICE TYPE STATE eth0 802-3-ethernet disconnected bond0 bond connecting (getting IP configuration) wlan1 802-11-wireless unavailable (these are all always visible) I should probably add that this is 0.9.4, as that's all that has made it to the FC17 repositories as far as I can see.
Thanks for the provided information. It's probably similar or the same autoconnect problem that affects most of the virtual interfaces. Did you try manually bringing the other interfaces up with nmcli?
Sorry if I'm missing something, but I don't know how I can manually bring them up with nmcli? `nmcli con` doesn't have an entry for eth0 or wlan1 that I can issue an `nmcli con up` command for, unless I allow NM to create "Auto accesspointname/Ethernet" connections. (and the Auto connections are nothing to do with the bonded device)
(In reply to comment #17) ... > > `nmcli con` doesn't have an entry for eth0 or wlan1 that I can issue an `nmcli > con up` command for, unless I allow NM to create "Auto > accesspointname/Ethernet" connections. (and the Auto connections are nothing to > do with the bonded device) Hi, You can manually bringing the other interfaces up with nmcli as much: - run "nmcli con list" command first: [mihai@netop ~]$ nmcli con list NAME UUID TYPE SCOPE TIMESTAMP-REAL System p4p1 28e22b64-6066-4f44-ad3d-335e2d01767e 802-3-ethernet system Thu 23 Aug 2012 11:02:13 AM EEST System wlan0 3fbf7469-69e2-4d51-ad78-1e51b7060eb0 802-3-ethernet system never - then run "nmcli con up id 'System p4p1'" command where 'System p4p1' is taken from output of "nmcli con list": [mihai@netop ~]$ nmcli con up id 'System p4p1' Active connection state: activating Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/1 state: activated Connection activated - for more help try "nmcli help", "nmcli con help" Best regards, Mihai
Hi, That doesn't work for me here, because 'nmcli con list' doesn't have entries for eth0 or wlan1 when they're configured as bonding slaves. Best, Oliver
> That doesn't work for me here, because 'nmcli con list' doesn't have > entries for eth0 or wlan1 when they're configured as bonding slaves. Then they're not configured. When debugging, you should see the list of configurations NM reads at the very beginning of the log. This is the excerpt from my log with one connection from keyfile called Test. You should see all connections there. NetworkManager[26980]: <info> NetworkManager (version 0.9.7.0) is starting... NetworkManager[26980]: <info> Read config file /opt/NetworkManager/etc/NetworkManager/NetworkManager.conf NetworkManager[26980]: <info> WEXT support is enabled NetworkManager[26980]: <info> DNS: loaded plugin dnsmasq NetworkManager[26980]: ifcfg-rh: Acquired D-Bus service com.redhat.ifcfgrh1 NetworkManager[26980]: <info> Loaded plugin ifcfg-rh: (c) 2007 - 2010 Red Hat, Inc. To report bugs please use the NetworkManager mailing list. NetworkManager[26980]: <info> Loaded plugin keyfile: (c) 2007 - 2010 Red Hat, Inc. To report bugs please use the NetworkManager mailing list. NetworkManager[26980]: keyfile: parsing Test ... NetworkManager[26980]: keyfile: read connection 'Test' Further messages in the debug (NetworkManager --debug) shows you which interfaces are getting managed and which are not. Looks like a configuration problem. Please confirm.
OK, yes, apologies for not checking the debug log output properly. It doesn't seem to let me put BOOTPROTO=none in the slave configurations, which a RH docs page had told me I should do. With the new config, it still doesn't work (but NM does successfully read the configurations). $ nmcli dev DEVICE TYPE STATE bond0 bond disconnected eth0 802-3-ethernet connection failed wlan1 802-11-wireless disconnected $ nmcli con NAME UUID TYPE TIMESTAMP-REAL Bond bond0 ad33d8b0-1f7b-cab9-9447-ba07f855b143 bond Fri 17 Aug 2012 01:29:13 BST Auto kawaihae c0e6309e-9cb3-4e2e-a833-d17b40df2114 802-11-wireless Thu 23 Aug 2012 15:03:53 BST System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet Tue 21 Aug 2012 12:05:25 BST Starting from this state, with everything down: nmcli con up id "Bond bond0": fails (it just runs dhclient on bond0 without adding any interfaces, as seen in /proc/net/bonding/bond0). nmcli con up id "System eth0" also fails, it gives a log message "<info> Activation (eth0) connection 'System eth0' waiting on dependency 'Bond bond0'" and then proceeds to try and run dhclient on bond0 without adding any interfaces as before). wlan1 doesn't seem to behave at all - it won't load the config if I put BOOTPROTO=none in, but without that then NM brings it up as a normal device with its own IP address and doesn't seem to do anything bonding related at all.
I guess the keyfile configuration would lead to the same problems: https://fedoraproject.org/wiki/Tools/NetworkManager/Bonding Thanks for your help, the internal dependencies for Bonding are broken then.
Patches to get the simplest configuration working can be found in 'pavlix/next' branch. Bonding and bridging work roughly the same, see bug 546197. The 'keyfile' configuration for the simple working case: /etc/NetworkManager/system-connections/Master [connection] id=Master uuid=b8eca181-73e2-455d-b5be-bffcde75c153 type=bond [bond] interface-name=master [ipv4] method=manual addresses1=192.168.2.200;24;192.168.2.1 [ipv6] method=link-local /etc/NetworkManager/system-connections/Slave [connection] id=Slave uuid=788f8873-7d55-420f-8e91-6e3ab028ebf6 type=802-3-ethernet master=master [802-3-ethernet] mac-address=52:54:00:8e:93:da Please look at the notes in bug 546197, most of them apply to both bridges and bonds.
Branch 'pavlix/next' has been modified and now also supports automatic IPv4/IPv6 configuration of bridges and bonds.
Just for information, we are once again restructuring the changes to properly support bonding and bridging. dcbw and jklimes publish their modifications in the 'bridge' branch.
ftr, bonding of wifi is not currently supported, but there's a bug about that
(In reply to comment #26) > ftr, bonding of wifi is not currently supported, but there's a bug about that Do you have a bug#? I'm also trying to set this up, using NetworkManager 0.9.8.0 and Kernel 3.8.2 (keyfile config below). Trying to bond the WiFi interface caused a Kernel oops, so I'm concentrating on getting the Master/Ethernet-Slave setup working first, but NM doesn't succeed: [1365977522.520918] [nm-system.c:1720] nm_system_bond_enslave(): (bond0): error enslaving enp0s20u2u4: -1 (Unspecific failure) My keyfile configuration: ## Bonding-Master [bond] cloned-mac-address=AC:9B:48:51:42:BF interface-name=bond0 [connection] id=Bonding-Master uuid=38c6d7d3-f0d1-46b0-b31d-9a0c2ffc07d1 type=bond interface-name=bond0 [ipv6] method=ignore ip6-privacy=0 [ipv4] method=auto may-fail=false ## Bonding-Slave-Ethernet [connection] id=BondSlave-Ethernet uuid=84a54c32-0fbb-4988-aae3-0cdbe3477aa9 type=802-3-ethernet master=38c6d7d3-f0d1-46b0-b31d-9a0c2ffc07d1 slave-type=bond [802-3-ethernet] mac-address=00:24:9b:06:49:97
(In reply to comment #27) > (In reply to comment #26) > > ftr, bonding of wifi is not currently supported, but there's a bug about that > > Do you have a bug#? Nope, AFAIK, but you can start one. > I'm also trying to set this up, using NetworkManager 0.9.8.0 and Kernel 3.8.2 > (keyfile config below). > > Trying to bond the WiFi interface caused a Kernel oops, That shouldn't... > so I'm concentrating on > getting the Master/Ethernet-Slave setup working first, but NM doesn't succeed: > > [1365977522.520918] [nm-system.c:1720] nm_system_bond_enslave(): (bond0): error > enslaving enp0s20u2u4: -1 (Unspecific failure) Sounds like a problem. We are working on having all kernel features put together in a new nm-platform subsystem that would be individually tested on various platforms with various kernels so that things like that don't happen to you. But with the current versions (including 0.9.8 and master), you're still with the old way. I'm sorry I can't provide any useful hint right now. > My keyfile configuration: > ## Bonding-Master > [bond] > cloned-mac-address=AC:9B:48:51:42:BF > interface-name=bond0 > > [connection] > id=Bonding-Master > uuid=38c6d7d3-f0d1-46b0-b31d-9a0c2ffc07d1 > type=bond > interface-name=bond0 > > [ipv6] > method=ignore > ip6-privacy=0 > > [ipv4] > method=auto > may-fail=false > ## Bonding-Slave-Ethernet > [connection] > id=BondSlave-Ethernet > uuid=84a54c32-0fbb-4988-aae3-0cdbe3477aa9 > type=802-3-ethernet > master=38c6d7d3-f0d1-46b0-b31d-9a0c2ffc07d1 > slave-type=bond > > [802-3-ethernet] > mac-address=00:24:9b:06:49:97 Looks good to me. I'll try to do some more testing myself.
(In reply to comment #27) > (In reply to comment #26) > > ftr, bonding of wifi is not currently supported, but there's a bug about that > > Do you have a bug#? bug 686636
I filed a new specific bug about problem with bond activation: https://bugzilla.gnome.org/show_bug.cgi?id=699755 Closing this bug report for now as it's becoming rather confusing. Please start new bug reports for specific issues you experience with respective information.