3

I want to use my Raspberry Pi as a bridge between eth0 and wlan0. My goal is to wire connect the Pi to my home router and to cast Wi-Fi with it, eventually getting access to the internet by this Wi-Fi (similar to hotspot but in layer 2).

It's important the connection be in layer 2. I want the devices connected to the Pi, to get IP addresses from my home router.

I've tried using bridge-util but couldn't connect wlan0 to the bridge and got an error:

sudo brctl addif br0 wlan0 eth0
can't add wlan0 to bridge br0: Operation not supported...

Any ideas how to make this kind of bridge?

donjuedo
  • 115
  • 4
nano
  • 31
  • 2
  • 1
    I believe this is your [answer](https://superuser.com/questions/597834/bridging-wifi-to-ethernet-on-ubuntu-not-working), spoiler, not possible. – Shaulinator Apr 13 '17 at 21:39
  • You want your Pi to be a WiFi access point, not a WiFi client. You can [do this with hostapd](https://wiki.archlinux.org/index.php/Software_access_point), but you'll need a WiFi chip that supports AP (or "master") mode as well as the usual client mode. – cjs Apr 16 '17 at 21:41
  • A little Google search reveals [this](https://www.raspberrypi.org/forums/viewtopic.php?t=132674) and I don't know if it will fit your need. – user91822 Sep 25 '18 at 12:23

1 Answers1

2

The error message you get is well known. It is because the Raspberry Pi wifi chip does not support bridging on layer 2. For this the ethernet packages need an additional ip address (4addr) which is specified in wireless distribution services (WDS). For further information look at Raspberry Pi WiFi to Ethernet Bridge for a server?.

But for your needs you can use a workaround with proxy arp on OSI layer 3. This will work like a layer 2 bridge and with a helper it is also transparent for DHDP requests as you need. Look at Workaround for a wifi bridge on a Raspberry Pi with proxy arp.

Ingo
  • 40,606
  • 15
  • 76
  • 189