Author Topic: WiFi only works when LAN is connected  (Read 6768 times)

Online CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 8,383
  • Kudos: 158
Re: WiFi only works when LAN is connected
« Reply #30 on: February 12, 2016, 08:00:22 AM »
The reason this does not work for people is due to the ARP cache on their PC.  With the Ethernet plugged in, when you first connect to the wireless IP, the reply packet actually comes out the Ethernet port and your PC stores the MAC hardware address of the Ethernet interface with the wlan0 IP address.  All subsequent packets to the wlan0 IP actually go in through the Ethernet interface on the Pi.  Later, when you disconnect the Ethernet, and try to connect to the wireless again, the ARP cache still has the Ethernet MAC address for the wlan0 IP and since that MAC isn't on the network, you are unable to connect to the wireless.  If you clear the ARP entry for the wlan0 interface or wait for it to timeout (it could be a while depending on setup), than after the ARP entry is gone your PC will re-ARP for the wlan0 IP and get back the wlan0 MAC and now you will be able to talk to wlan0 without Ethernet plugged in.

One solution for users wanting to be able to plug in their wireless FPP's is to use a bridge interface to allow eth0 and wlan0 to share a single IP and MAC.  This is what most home routers do for their wired and wireless setup.  ThreeSizes has been working on a patch for FPP to allow bridge mode to be configured.  There is another thread where he posted a copy of the patch and install instructions for those wanting to test.  I'm on my phone or I would give a link.
-
Chris

Offline JonB256

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Granbury, Texas
  • Posts: 3,980
  • Kudos: 84
    • Granbury Christmas Lights
Re: WiFi only works when LAN is connected
« Reply #31 on: February 12, 2016, 02:17:48 PM »
Here is the link for ThreeSize's post. He clearly labels it as experimental.

http://falconchristmas.com/forum/index.php/topic,4137.msg46090.html#msg46090

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 560
  • Kudos: 10
Re: WiFi only works when LAN is connected
« Reply #32 on: February 12, 2016, 03:27:52 PM »
The reason this does not work for people is due to the ARP cache on their PC.  With the Ethernet plugged in, when you first connect to the wireless IP, the reply packet actually comes out the Ethernet port

Why is the reply for the WLAN0 IP address coming out the Ethernet port?  That sounds like the Pi is trying to do some kind of Proxy ARP which it shouldn't be.

Vixen and xLights for sequencing / FPP for scheduling and playing / Falcon controllers for pixels / DIY controllers for everything else

Online CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 8,383
  • Kudos: 158
Re: WiFi only works when LAN is connected
« Reply #33 on: February 12, 2016, 04:06:39 PM »
Why is the reply for the WLAN0 IP address coming out the Ethernet port?  That sounds like the Pi is trying to do some kind of Proxy ARP which it shouldn't be.

Linux routes packets out the first interface that has a route to the destination, and eth0 is listed before wlan0 in the interface list.

Offline ThreeSizes

  • Developer
  • ******
  • Join Date: Dec 2015
  • Location: Fulton, MD
  • Posts: 532
  • Kudos: 32
Re: WiFi only works when LAN is connected
« Reply #34 on: February 12, 2016, 05:38:19 PM »
Here is the link for ThreeSize's post. He clearly labels it as experimental.

http://falconchristmas.com/forum/index.php/topic,4137.msg46090.html#msg46090

If anybody does feel like giving it a spin, I'll be around to help and support it, so please give it a spin and give me any feedback on it.


"And what happened then? Well, in Whoville they say that the Grinch's small heart grew three sizes that day."

Offline greko

  • Newbie
  • *
  • Join Date: Feb 2016
  • Location:
  • Posts: 2
  • Kudos: 0
Re: WiFi only works when LAN is connected
« Reply #35 on: February 15, 2016, 08:11:33 AM »
First of all hello! I am new here. I will try to make my first falcon show and I am getting a head start for december. I was going mad with the eth and wlan issue(eth connected lan worked also). I just wanted to say thank you for solving my problem before posting.

@ CaptainMurdoch thank you for the detailed explanation. You helped me understand and also made me feel kinda stupid :P I need to brush up my networking.

Online CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 8,383
  • Kudos: 158
Re: WiFi only works when LAN is connected
« Reply #36 on: February 15, 2016, 11:01:56 AM »
@ CaptainMurdoch thank you for the detailed explanation. You helped me understand and also made me feel kinda stupid :P I need to brush up my networking.

Sorry if I implied that, we've had a lot of users question why this was happening so I figured a detailed explanation would be helfpul.  The bridge patch that ThreeSizes is working on will help this situation for users who aren't using eth0 on a separate subnet and just want to be able to take their FPP wireless but still have the ability to plug it in when they get within reach of a switch.

Offline greko

  • Newbie
  • *
  • Join Date: Feb 2016
  • Location:
  • Posts: 2
  • Kudos: 0
Re: WiFi only works when LAN is connected
« Reply #37 on: February 17, 2016, 07:19:43 AM »
@ CaptainMurdoch thank you for the detailed explanation. You helped me understand and also made me feel kinda stupid :P I need to brush up my networking.

Sorry if I implied that, we've had a lot of users question why this was happening so I figured a detailed explanation would be helfpul.  The bridge patch that ThreeSizes is working on will help this situation for users who aren't using eth0 on a separate subnet and just want to be able to take their FPP wireless but still have the ability to plug it in when they get within reach of a switch.

No no no. No excuse needed. No intention of sarcasm from my part. I read your reply and then I was like "Of course" . Hope I did not offend you.  ;)

 

Back to top