I'm trying to bond the ethernet and wifi on my laptop. A bond can be setup with

nmcli con add type wifi ifname wlps3s0 master bond0 ssid $YOURSSID

(see Bonding wired and wireless while using Network Manager)

The SSID of a particular network is REQUIRED for this command. As far as I can tell, this means if I change networks, my bond will break. Is there a way in nmcli to enslave an entire interface to a bond?

  • Such a bond requires that the same IP address will be good for both the wired and wireless halves of the bond, or in other words, that the wireless network segment is bridged to the corresponding wired network segment, rather than both being separate network segments connected by IP routing. While this may be true in typical home WiFi setups, you should not expect it to be true for all wired/wireless network pairs. – telcoM May 2 at 5:57
  • Would that cause something bad to happen? I assume that would just break the bond and cause it to fallback to using the primary interface. – Gooberpatrol66 May 3 at 1:15
  • The problem is, there are basically two ways for the bond to monitor whether each component network connection is good or not. The first is miimon: basically checking for a valid link, will not detect that links connect to different IP segments, and will keep a link "up" regardless. The other, ARP-based monitoring of a specified target, would have a "chicken vs. egg" problem: you would have to specify the IP address for ARP testing before the link is actually up, i.e. before you can run DHCP and know the IP addresses used on the network segment. – telcoM May 3 at 5:25
  • With SSID-specific bond configurations, the NetworkManager can scan for ambient WiFi networks before actually establishing a link, and then decide whether to use a bond or not according to where you are. The only non-automatic step would be the first-time set-up for any new SSID. You could probably script that to be a simple command. Basically the logic would be: 1.) connect wifi only, do DHCP, record SSID, gateway and netmask, 2.) connect wired only, do DHCP, record gateway and netmask, 3.) if both gw/netmask pairs are the same, replace autodetected WiFi config with a bonding configuration. – telcoM May 3 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.