16

I'm trying to bond 2 WIFI cards in Ubuntu 14.04.

I've installed ifenslave-2.6, then changed /etc/network/interfaces and added a /etc/wpa_supplicant0.conf and /etc/wpa_supplicant1.conf file as below.

Cannot make it work, please advise. The 2 WIFI cards show connected though, see iwconfig below. Also find below also diagnostic messages.

I tried all sorts of variations of wpa details in interfaces file, up and down with ifenslave in interfaces, no luck.

Thank you.

/etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
iface eth1 inet manual

#wlan0 is manually configured, and slave to the "bond0" bonded NIC
allow-hotplug wlan0
auto wlan0
iface wlan0 inet manual
bond-master bond0
bond-primary wlan0
wpa-conf /etc/wpa_supplicant0.conf

#wlan1 ditto, thus creating a 2-link bond.
allow-hotplug wlan1
auto wlan1
iface wlan1 inet manual
bond-master bond0
wpa-conf /etc/wpa_supplicant1.conf

# bond0 is the bonding NIC and can be used like any other normal NIC.
# bond0 is configured using static network information.
auto bond0
iface bond0 inet static
address 192.168.3.150
netmask 255.255.255.0
gateway 192.168.3.1
bond-mode balance_rr
bond-miimon 100
bond-slaves wlan0 wlan1

#up /sbin/ifenslave-2.6 bond0 wlan0 wlan1
#down /sbin/ifenslave-2.6 -d bond0 wlan0 wlan1

#bond-slaves none

/etc/wpa_supplicant0.conf

network={
ssid="MYSSID0"
bssid=88:f0:77:fd:af:81
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="MYPASS"
}

/etc/wpa_supplicant1.conf

network={
key_mgmt=NONE
ssid="MYSSID1"
}

diagnostic messages

cat /proc/net/bonding/bond0

Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 200
Down Delay (ms): 200

Slave Interface: wlan0
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 00:1c:df:d1:98:27
Slave queue ID: 0

sudo iwconfig

    wlan1     IEEE 802.11abg  ESSID:"MYSSID1"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:3A:9A:1C:1B:20   
          Bit Rate=24 Mb/s   Tx-Power=200 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=38/70  Signal level=-72 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

bond0     no wireless extensions.

eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"MYSSID0"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 58:35:D9:C6:26:41   
          Bit Rate=57.8 Mb/s   Tx-Power=27 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=52/70  Signal level=-58 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:3  Invalid misc:0   Missed beacon:0

ifconfig

bond0     Link encap:Ethernet  HWaddr 00:1c:df:d1:98:27  
          inet addr:192.168.3.150  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::21c:dfff:fed1:9827/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:304 (304.0 B)  TX bytes:10695 (10.6 KB)

eth0      Link encap:Ethernet  HWaddr 00:23:5a:1a:47:8a  
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::223:5aff:fe1a:478a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2315 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2191 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:191033 (191.0 KB)  TX bytes:172354 (172.3 KB)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:407 errors:0 dropped:0 overruns:0 frame:0
          TX packets:407 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:43747 (43.7 KB)  TX bytes:43747 (43.7 KB)

wlan0     Link encap:Ethernet  HWaddr 00:1c:df:d1:98:27  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:304 (304.0 B)  TX bytes:10695 (10.6 KB)

wlan1     Link encap:Ethernet  HWaddr 00:1c:df:d1:98:27  
          inet6 addr: fe80::21c:dfff:fed1:9827/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:4 overruns:0 frame:26088
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:684 (684.0 B)  TX bytes:805 (805.0 B)
          Interrupt:18

ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.3.150 icmp_seq=1 Destination Host Unreachable
From 192.168.3.150 icmp_seq=5 Destination Host Unreachable
From 192.168.3.150 icmp_seq=6 Destination Host Unreachable
From 192.168.3.150 icmp_seq=7 Destination Host Unreachable
From 192.168.3.150 icmp_seq=8 Destination Host Unreachable
siliond
  • 171
  • 1
    Well for starters, wlan1 isn't connected, probably because you didn't provide the password etc for it in wpa_supplicant0.conf. Also do you really have two different access points using different channels and configured in infrastructure mode, plugged into the same router? – psusi May 02 '14 at 22:26
  • Thank you for your comments. wlan1 connects when testing it manually with ifenslave, bond0, and wpa_supplicant1.conf ; sometimes it tries a few times though before succeeding. Maybe there is a retry setting that I could put in interfaces? I have one internal wireless card and one usb, both working and connecting fine individually to their different respective ssid, as specified in their respective wpa_supplicant conf files. – siliond May 03 '14 at 14:08
  • 1
    @psusi I've managed to get both wireless interfaces to connect, but cat /proc/net/bonding/bond0 still only lists wlan0 as slave, same as originally. I presume I've done some bonding related mistakes in /etc/network/interfaces, but don't know what other variations of it to try. Please advise. – siliond May 05 '14 at 11:54
  • if your idea is to connect two wifi interfaces at the same time to sum their brandwwitch, i am afraid that it simply cannot be done so easly. – kcdtv Apr 26 '18 at 14:44
  • 1
    +1 for giving full information. Can you please move your comments here up into the question, perhaps under a line like this: Enter,---,Enter then "New Information:" – SDsolar May 06 '18 at 21:42
  • What are you trying to bond to? An access point? Have you configured the equivalent bond at the access point? From what little I know about bonds, you need two (the same number of) interfaces on both sides of the bond. With wires, this is easy, just use the two ports on both sides. With Wifi, I don't know if you will get the equivalent of two interfaces at the accesspoint side of the link. – nucc1 May 07 '18 at 10:49

2 Answers2

2

because mostly the "association" ( connection on the "physical link layer" , like plugging an ethernet cable) to wireless network is done via the mac address and thus spoofing / sending with a wrong packet will be tricky

the following hints may be helpful:

  • many routers ( and bridges) have STP ( Spanning Tree Protocol) enabled , preventing loopings at link level , but also filtering situations like the one you want ( packet comes from another port where router doesn't expect it ) STP Wikipedia Entry

  • the balance_xx modes from the bonding driver needs promiscious mode, refer here for getting your wifi card into this mode

  • the router needs client isolation off , and maybe also a patched hostapd/wpa-supplicant to accept packets that do not belong to the associated MAC address

  • as a workaround: try tinc or gretap to have an IP endpoint ,and connect this virtual tunnels to a bridge on the router side

-3

You cannot make it work because it is not possible

Amias
  • 5,246
  • 3
    This doesn't really answer the question. If its not possible, then this post having no answers would suffice. – AlwaysTalkingAboutMyDog Jul 25 '18 at 04:51
  • @Zzzach well one can stop waiting for an answer and start to look for a different approach. For sure telling why it is not possible would help – user1708042 Oct 01 '18 at 07:50
  • have a think about it , bonding ethernet works because you add more wire which gives you move bandwidth , bonding wireless won't work because you are only dividing the bandwidth further. – Amias Oct 01 '18 at 13:36
  • @user1708042 This question is over 4 years old. If there's no solution at the moment, a comment describing it as such is sufficient. If you are looking for an answer to this question as well, post a new one with your own research / situation. – AlwaysTalkingAboutMyDog Oct 02 '18 at 10:20
  • @Amias You are only considering sharing connection on a single network. What about different networks? Different channels? Even difference frequencies (5Ghz and 2.4GHz). Definitely possible, but I wouldn't know how. Bonding wireless cards would make sense and would provide faster or more reliable connection. – AlwaysTalkingAboutMyDog Oct 02 '18 at 10:23
  • Most bonding methods don't actually enable a boost in bandwidth for individual sessions, but rather enable two sessions to each independently achieve the link speed maximum. e.g. one couldn't expect a speed increase of a single rsync. Just the same, this doesn't sound like a very good idea. I imagine siliond has moved on. – nod Nov 29 '18 at 05:50
  • "It's not possible" is a perfectly good answer if it is indeed not possible! ;-) +1 – Fabby Dec 08 '18 at 07:26