Posts: 4136
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Network bonding problem (eth0 + wlan0)

Thu Jan 31, 2019 12:23 pm

Sorry but it works for me. I stopped the AP for a while, reconnection works fine.

You're using a development version of Raspbian (+firmware...) and an old-ish version of wpa_supplicant. By definition the development version of something is not stable and probably broken.
I would suggest trying recent *releases* of both (Raspbian first).

Also, wpa_cli is an executable. Just summon it as you please: "wpa_cli -i wlan0 status", or in interactive mode as below

Code: Select all

$ wpa_cli
wpa_cli v2.7
Copyright (c) 2004-2018, Jouni Malinen <[email protected]> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.

Selected interface 'wlan0'

Interactive mode

> interface wlan0
Connected to interface 'wlan0.
> status
address=b8:27:eb:YY:YY:YY <- This is the MAC of the 1st active link, eth0
<4>Failed to initiate sched scan
<3>CTRL-EVENT-NETWORK-NOT-FOUND <- AP powered off for 5+ minutes
<4>Failed to initiate sched scan <- AP powered back up, comes up
<3>Trying to associate with c0:3f:0e:3b:99:61 (SSID='NETGEAR' freq=2417 MHz)
<3>Associated with c0:3f:0e:3b:99:61
<3>CTRL-EVENT-CONNECTED - Connection to c0:3f:0e:3b:99:61 completed [id=0 id_str=]
> status
> quit
Then, disconnected eth0 and tried pinging:

Code: Select all

[11284.001504] bond0: link status up for interface wlan0, enabling it in 400 ms
[11284.421519] bond0: link status definitely up for interface wlan0, 0 Mbps full duplex
[11352.461986] bond0: link status definitely down for interface eth0, disabling it
[11352.461998] bond0: making interface wlan0 the new active one

Code: Select all

$ ping -c 1
PING ( 56 data bytes
64 bytes from seq=0 ttl=121 time=7.099 ms

--- ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 7.099/7.099/7.099 ms
This is a great feature. No idea how dhcpcd or the Desktop feel about a bond0 interface, though.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Posts: 13
Joined: Fri Mar 31, 2017 11:44 am

Re: Network bonding problem (eth0 + wlan0)

Thu Jan 31, 2019 2:47 pm

I took your advice and reverted back to latest stable release and now wifi reconnect ok without wpa-roam need so it look like the development kernel was the problem.

Code: Select all

apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
apt-get dist-upgrade

uname -a
Linux rpi3 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

Code: Select all

cat /proc/net/bonding/bond0 
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: eth0 (primary_reselect always)
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 200
Up Delay (ms): 200
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 2
Permanent HW addr: b8:27:eb:XX:XX:XX
Slave queue ID: 0

Slave Interface: wlan0
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 4
Permanent HW addr: b8:27:eb:YY:YY:YY
Slave queue ID: 0
Thank you for reply.

Return to “Troubleshooting”