14

I've seen a lot online for a solution to make raspberry Pi 3 into a wireless bridge. But many are old articles to suit the Pi 1 and 2.

This is the last article I have seen, and tried: http://blog.slor.net/2013/09/turning-your-raspberri-pi-into-wireless.html

I use RASPBIAN JESSIE, Kernel version: 4.4.

I want the Pi to connect to a wireless router with the built-in wireless device (wlan0) to provide access to device(s)that are connected to the built-in Ethernet connector (eth0).

I want the router (192.168.1.1) to provide IP's to devices connected to RPi3, making it possible for the PC to communicate with devices connected to RPi3.

The problem is when I try to follow the article linked above is that when I run this command:

sudo brctl addif br0 wlan0 eth0

I get this error message:

can't add wlan0 to bridge br0: Operation not supported...

enter image description here

Does anyone have any idea how to solve this?

enter image description here

  • 1
    Have you created br0 before that? brctl addbr br0. – ott-- Jul 10 '16 at 20:58
  • Yes I've tried that, but get still the error message: can't add wlan0 to bridge br0: Operation not supported – 3kbest Jul 10 '16 at 21:07
  • Do other commands work like brctl show? Maybe a.module is missing. – ott-- Jul 10 '16 at 21:25
  • 1
    Ok, learning something new every day. Bridging wireless isn't possible (yet) it seems: serverfault.com/questions/152363/bridging-wlan0-to-eth0 – ott-- Jul 10 '16 at 23:08
  • 3
    @ott That post and the LKM thread it links to are 6+ years old, so anyone seriously interested in the issue may want to dig a little bit further. This answer implies it may be simpler to just forward and masquerade rather than trying to use a legit layer 2 bridge. – goldilocks Jul 11 '16 at 11:30
7

This is not currently possible. Wireless bridges require 802.11 frames to store 4 addresses (sender, receiver, destination and source), and standard 802.11 frames only store 3 addresses. While there are implementations of 4-address mode called WDS, they are vendor-specific and only supported on router hardware (meaning you should use hardware from the same vendor for this to work). On routers, the command to enable WDS (and allow bridging of Wlan interfaces) mode is

iw dev wlan0 set 4addr on

You can try it, but AFAIK it won't work on the RPi 3, at least not with built-in NIC. You may have some luck with USB adapters based on Atheros wireless chipsets. Until it does, you'll have to stick to NAT if you want to connect networks via RPi, as described here. You can also try Wlan kabel, but that's not real bridging either.

PS. I know the negative answer is not that useful, but we have lots of duplicate questions about bridging, and they can't be closed properly unless one of them is answered.

2

So as not to confuse readers :- Dmitry Grigoryev is correct he stated you need WDS and you do to create the infrastructure shown above.

Do not confuse Ethernet:wifi -> Wifi:Ethernet with wifi:ethernet - > ethernet:wifi

One just requires a Bridge between the access Point and Lan the other requires WDS to control the link.

As above, the article mentioned covers a wireless Access Point not Wireless Distribution System (WDS)

-1

Just seen this link below. Yet to try. Wanna give it a go?.

https://rbnrpi.wordpress.com/project-list/wifi-to-ethernet-adapter-for-an-ethernet-ready-tv-new-version/

  • Welcome to Raspberry Pi! We're trying a new policy with regard to informationless link-only answers here. If this post is not edited to contain information that can stand as an answer, however minimal, in 48 hours it will be converted to Community Wiki to simplify having it corrected by the community. – Ghanima Oct 27 '16 at 11:37
  • This article describes IP forwarding. Essentially, there are two different networks, as opposed to a single network the OP wants. – Dmitry Grigoryev Aug 9 '17 at 12:23
-1

Here's an article describing exactly what you'd like to do. I'm not sure why Dmitry Grigoryev seems to think else wise. I've currently got a pi3 in the ceiling of my office bridged to a switch and distributing wired internet all over my office. It's just linking two interfaces. The only frustrating part is that I do have to assign a static IP to the the Ethernet port on the pi.

  • You don't answer the original question. You link to a blog post that describes the well-known eth0 to AP wlan0 bridging. Yet this isn't what was asked. Maybe you want to read both the original question as well as my/Dmirtys answer again? – TheDiveO Aug 1 '17 at 15:48
  • In other words, you can't bridge two Ethernet networks via WiFi. In your article, the WiFi segment is on the end of the network, that's why it works. – Dmitry Grigoryev Aug 9 '17 at 12:21
  • 2
    @DmitryGrigoryev My raspberry pi recieves wireless internet, the ethernet port on the pi is connected to a switch, not a smart switch. then 13 computers are connected to that 16 port switch. they're on the same subnet as all other devices connected directly or wirelessly to the router. What about that setup is not what 3kbest was asking for? – Cfoote7 Aug 22 '17 at 17:38
  • 1
    @Cfoote7 Good then. Could you expand your answer so that it includes all the steps necessary to set it up (links go down, you know...)? I suppose the downvote you got is due to your answer relying on the link to provide the essentials, and not because people don't trust you. If your config works, people will eventually upvote it. I'll certainly upvote it once you make it into a complete answer. – Dmitry Grigoryev Aug 22 '17 at 17:51

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.