OpenWrt Forum Archive

Topic: Bridge in layer 2?

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Good morning,
I'am having problems with the "relayd" package. The problem is that this app works in layer 3 (ARP NAT) instead of layer 2, so all the ARP packages throught the openWRTmodule has the ARP Sender address frame with the IP of the openWRT module instead of the real source (it is not a transparent bridge). This is a problem when the AP works besides a wireless controller.

Example topology:
PC1 (192.168.10.80)<---->OpenWRTmodule(192.168.1.1)<---->AP(192.168.10.15)<---->PC2 (192.168.10.34)


So the question, is there any package working as a transparent bridge in layer 2?


Thank you,
Regards

The wireless and wired networks are already bridged and use the same subnet by default no relayd is needed so maybe I'm missing something in your question.  Relayd is only needed for a wireless bridge to another router, if that's what you are doing then wds is what you want but support for that is limited.

WWTK wrote:

The wireless and wired networks are already bridged and use the same subnet by default no relayd is needed so maybe I'm missing something in your question.  Relayd is only needed for a wireless bridge to another router, if that's what you are doing then wds is what you want but support for that is limited.

Sorry I forget to tell the chipset I'am working on,

The chipset is the Atheros 9331. OpenWRT 15.05 (or other versions) gives us the option to make a physical bridge between LAN and WAN, but in this chipset it doesnt work, so I must install relayd to build a pseusobridge.

Thanks you and regards.


Note: With GARGOYLE installed in my module and I see that the bridge works correctly (in layer 2), maybe this is not supported by OPENWRT becouse of its native way of making the bridge, idk.

Anyone can help me please?

Not really understand your problem. Why Openwrt IP has to be in different network while you need a pure switch? Are you sure relayd is necesary?

Did you check the OpenWrt document : =wiki.openwrt.org_doc_recipes_dumbap? There are hardware specific configuration to bridge WAN and LAN interface without additional package. If GARGOYLE support it, OpenWrt should have a solution.

(Last edited by mpjanet on 5 Jan 2018, 20:39)

Excuse me, I mean bridge between LAN and WLAN.

Yes, its necesary because with the Atheros 9331 its imposible to make a pure bridge from the interface, so I must use the pseudobridge.

In this link openwrt.org/docs/user-guide/wifi/relay_configuration?s[]=relayd says : "Since opensource wireless drivers used in LEDE do not support bridging in client mode, the traffic between LAN and the wireless client must be joined by routing it.".

With Gargoyle the bridge is in layer 2 with versions below 1.8, with newer ones (1.9 and 1.10) the bridge is performed in layer 3 sad

I hear with the QSDK it is posible to build the bridge in layer 2 because it performs natively.

(Last edited by jondu94 on 2 Mar 2018, 11:03)

Gargoyle is based on OpenWrt.
When OpenWrt switched from layer 2 to layer 3, so did Gargoyle.
So your only option at the moment is using an old version of OpenWrt or an old version of Gargoyle.

(Last edited by adri on 2 Mar 2018, 13:53)

The fundamental problem is that an AP --> STA link assumes that there is only one MAC address at the STA end.  It is designed to serve one user's device per link.  This is the so called "3 address" mode where the MAC of the STA radio is also the MAC of the ultimate destination of the packet, since they are the same device.

The WDS extension defined by IEEE allows true layer 2 bridging by transmitting an extra MAC in every packet, the MAC of the ultimate destination of the packet.  This "4 address mode" allows the STA radio to be bridged out to serve several distinct devices.

If supported at both ends of the link, use AP(WDS) --> STA(WDS) mode.  This is a true layer 2 bridge with no extra translations to try to work around 3 address mode.  Atheros chips and the ath9k driver have full support of WDS.

An AP running with WDS enabled will also still accept connections from non-WDS 3-address users.  So it is quite transparent to turn on WDS on the AP in your main router and then connect an extension router as a WDS client along with regular clients.

WDS usually works best when the AP and STA are both using the same chipset.
Chipsets from different manufactures sometimes refuse to communicate with eachother in WDS mode.

adri wrote:

Gargoyle is based on OpenWrt.
When OpenWrt switched from layer 2 to layer 3, so did Gargoyle.
So your only option at the moment is using an old version of OpenWrt or an old version of Gargoyle.

Thank you so much for your help.
Unafortunately, for example, gargoyle 1.8.1 is based on OpenWRT BB, but OpenWRT doesn't allow layer 2 bridge while Gargoyle does.
In all versions of OpenWRT I tested has layer 3 bridge.
Anyway, why would OpenWRT turn the bridge from being totally transparent on layer 2 to layer 3? isn't that a step back?

Kind regards.

mk24 wrote:

The fundamental problem is that an AP --> STA link assumes that there is only one MAC address at the STA end.  It is designed to serve one user's device per link.  This is the so called "3 address" mode where the MAC of the STA radio is also the MAC of the ultimate destination of the packet, since they are the same device.

The WDS extension defined by IEEE allows true layer 2 bridging by transmitting an extra MAC in every packet, the MAC of the ultimate destination of the packet.  This "4 address mode" allows the STA radio to be bridged out to serve several distinct devices.

If supported at both ends of the link, use AP(WDS) --> STA(WDS) mode.  This is a true layer 2 bridge with no extra translations to try to work around 3 address mode.  Atheros chips and the ath9k driver have full support of WDS.

An AP running with WDS enabled will also still accept connections from non-WDS 3-address users.  So it is quite transparent to turn on WDS on the AP in your main router and then connect an extension router as a WDS client along with regular clients.

Thank you so much for your elaborated response.
The problem is that I cannot use WDS since the APs where I connect my modules has the WDS disabled and I have no access to enable.
I would need a way to get the layer 2 bridge without WDS.
Is it possible to create a package or compilation to perform that real bridge?
I'am new in OpenWRT, still learning, but I really want to use it because of his flexibility and open source phylosophy.

Kind regards.

The discussion might have continued from here.