Bridge for Wifi, bridging a wifi and eth0

i have some Router (Fonera 2100) and I want to use them for bring some Ethernet-only-Devices in my Wifi.
Fonera 2100 is supported by OpenWrt.
The device has 1x Ethernet-Port and Wifi, no WAN-Port.

First, I tried to make a bridge for eth0 for testing. You simply have to set the check mark at bridge. The result is a virtual device br-lan. Everything ok.
This is for Bridging Wirered->wifi

But I need it the other way. The Router gets his connection via wifi, and the router should bring device to my wifi which are connected to the eth0-Port (transparently, same ip-range, DHCP-Forward, DNS, WoL, etc., so "Layer 2 repeating" is neccessary = bridge)
So first, I set up wifi0 and configured wireless to act as Wifi-client. The result is wifi0 and ath0.
Now, I tried exactly the same like the eth0 Bridge. I set the check mark at bridge for bridge at the wifi-interface. Virtual device is now not br-lan, it is br-wlan.
But, after doing that, the ath0 device gets down and do not come up.

So, my first question, is it possible to bridge wifi -> wired at all?

I tested gargoyle 1.5.6 which is based on OpenWrt 10.03.1 and it worked. It seems that gargoyle do not use relayd-package
So it should work in OpenWrt 10.03.1 native too, right?

My Second Question:
In some tutorials, relayd-package is used to connect wifi an eth0.
What are the advantages of a bridge, what of using relayd?

Thanks for your help.

My Wifi-Network is a MESH-Network made with AVM FritzBox/Repeater. The FritzBox/Repeaters do not support WDS. Meshmaster is a Fritzbox 7490.

The STA end of a regular (not WDS) AP-STA link cannot be placed in a bridge. This is because the 802.11 standard does not transmit the necessary MAC address information for layer 2 switching to work.

The relayd package is a sort of workaround for that. It makes all the devices on the STA end of the bridge appear to have the same MAC address then uses layer 3 routing to direct the packet to the endpoint device. It's not an ideal method and it only works for IPv4. The old Broadcom chips and closed-source drivers found in ddwrt derivatives had something similar to relayd implemented in hardware.

If your use case is simply a TV or other "Thing" that only needs access to the Internet in order to work, set up a routed client and double NAT it. You can also use firewall rules like a guest network to keep the Thing from seeing your home LAN.

thanks for your reply

I am a little bit confused. The gargoyle router firmware is only a new surface for OpenWrt, I thought. The base is still OpenWrt backfire.
I checked the installed packages. Relayd seems not to be used. How does bridging work in the gargoyle-version of OpenWrt?



I read about relayd. Have a look at this picture:

Is it neccessary to use 2 different ip-ranges (, in the picture)?

most of my lan-only-devices which i want to bring in my wifi have a websurface or information have to be fetched from device. there is a communication in both ways.

You'd have to ask them.

Yes. Behind the scenes, relayd works by routing packets at layer 3, but aliasing the MAC addresses so it looks like they are in the same layer 2 network.

There are two ways to do this. You could turn off NAT and set up pure layer 3 routing where each sub router has a different IPv4 subnet on its LAN side and the main router has a static route to gateway to this network. Then you will need to know the final AP of the device to reach it from the main home network. The other way is if there is only one endpoint device on the other side of the sub router, continue to use NAT and forward the necessary ports so that accessing the main network IP of the sub router is forwarded to the device's web server.

hmm, ok.
but where are the advantages of using relayd instead of using normal routing with double-NAT which you also suggested?
When I want to speak from a 192.168.1-device to a 192.168.2-device, I have to use the real IP, right?
I also need 2 DHCP-Server, right (the only DHCP-Server is my Fritzbox-Router which cannot serve different ip-ranges)?

By the way, do you know what the Bridge-package does (it is an OpenWRT-package)?

Yeah, Layer 2 traffic isn't supported over traditional WiFi, so without a bunch of tricks you can't route multiple devices through a single WiFi client. I've tried making a layer 2 tunnel through a WiFi link, and that worked, but it was slow and it required increasing the MTU above 1500.

Various manufacturers have come up with proprietary solutions, but I'm not ok with locking my self into a walled garden like that.

I don't understand the technology very well. AFAIK, I think the LEDE router firmware was the first I heard about to make this work using open source. That's been merged with OpenWRT. The technology has move on and become more standardized. I'm trying to deploy 802.11s mesh at home right now. It should allow layer 2 routing throughout the WiFi mesh. (I hope.)

Cross posting if someone finds it useful.

A “hack” called ARPNAT. More recent versions of Gargoyle use relayd (which is what openwrt uses). ... h-openwrt/
This was a patch to ebtables, and a patch to mac80211 to disable the STA bridging block.

1 Like