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

Network problem on wlan0 only, not on eth0.

Tue May 09, 2017 10:13 am

Hello,

I have one headless raspberry pi 3 with:

Code: Select all

Linux rpi3 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux
eth0 and wlan0 are connecting ok.
Problem is that I don't receive any ping response from wifi interface, only from eth.
Another computer located in the same dumb switch - LAN and the same AP for wifi respond properly to ping on eth & wifi so problem is 99.999% on rpi3.

I tried almost anything, without luck; considering I must be very careful because this rpi3 is located at my home at >1000km and I can't afford to lose communication.

I want to have wifi as backup communication in case LAN cable comm it is damaged/unplugged.

Any idea what to do next to have communication working properly on wifi interface?

thank you
N.

Code: Select all

ifconfig
eth0      Link encap:Ethernet  HWaddr xx.xx.....    
          inet addr:192.168.11.133  Bcast:192.168.11.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3203 errors:0 dropped:41 overruns:0 frame:0
          TX packets:2744 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:327226 (319.5 KiB)  TX bytes:1086427 (1.0 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:210 errors:0 dropped:0 overruns:0 frame:0
          TX packets:210 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:64062 (62.5 KiB)  TX bytes:64062 (62.5 KiB)

wlan0     Link encap:Ethernet  HWaddr xx.xx.....  
          inet addr:192.168.11.132  Bcast:192.168.11.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:254 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:56227 (54.9 KiB)  TX bytes:5958 (5.8 KiB)

Code: Select all

iwconfig
eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:"BACKUP1"  
          Mode:Managed  Frequency:2.472 GHz  Access Point: yy.yy...   
          Bit Rate=1 Mb/s   Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=70/70  Signal level=-22 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

Code: Select all

cat interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet manual

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no

Code: Select all

route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         fw1.mx1.psx 0.0.0.0         UG    202    0        0 eth0
default         fw1.mx1.psx 0.0.0.0         UG    303    0        0 wlan0
192.168.11.0    *               255.255.255.0   U     202    0        0 eth0
192.168.11.0    *               255.255.255.0   U     303    0        0 wlan0

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

Re: Network problem on wlan0 only, not on eth0.

Sat May 13, 2017 11:21 am

I think this Red Hat KB article is relevant to the issue.
Read the 1st paragraphs describing the issue, then scroll down to the bottom of the page to find the answer as to why... then if you want you can implement the solution, setting up source based routing aka "advanced routing" in linux.

This being said, if you have a machine that behaves as expected, and assuming it is a linux machine, before going into that I would look for differences in /proc/sys/net/ipv4/conf/all (and wlan0 and eth0) between the machines to see if you could get the Pi to respond by changing kernel parameters. The doc for IP sysctl is here.
(looking at a semi standard, current raspbian setup here, the factory setup seems relaxed enough, though)

If you don't want to go into that, you can setup bonding in active-backup mode between eth0 and wlan0. I think the setup in this thread is still relevant, works regardless of how the Pi is connected when it is started, and flips interfaces reliably.
With bonding you'd get a single IP, a single MAC, a single interface, so routing/filtering can stay in their standard form.

Personally I would take none of these challenges without console access. Or at least I would implement a working solution on a local test setup, and then only try to change the configuration at the remote site.

HTH
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

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

Re: Network problem on wlan0 only, not on eth0.

Sat May 13, 2017 11:24 am

Thank you for the answer I will have a look at links provided.

I think I will go with bonding as I already implemented this on my laptop and it is working properly.

Return to “Raspbian”