OpenWrt Forum Archive

Topic: Bridging in OpenWRT

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

Hi folks

I have just suceeded bridgin WLAN to LAN on my router based on OpenWRT.
So i can connect my laptop to the AP and get a DHCP adress from the main router.

Now, i have one more router with OpenWRT that I have setup in STA mode (succesfully connected to the first AP by WPA), but then when i involve a bridge on this one too (eth0 - ath1 -> br0) it doesnt matter how i configure it (open, WPA w/ wpa_supplicant), it just wont crack it. Sometimes i get disconnected, but sometimes i stay connected to the AP.

The main thing is that the bridge on the client AP somehow mixes things up, i cannot ping the AP. But when shutting down the bridge it works! I have tried many different things last couple of days, and it hade made me insane almost!

The strangest thing however is that if i issue the command "brctl showmacs br0" on the client AP, i can see mac adresses from devices on my LAN at the other side, so ethernet packets sure traverse the WLAN link through AP master and into the LAN. But no other connectibity works.

Is it as simple as that OpenWRT can't do this type of bridge over Wireless?
AP master bridging works right away, but AP cllient bridging doesnt work.

(Last edited by joksi on 23 Jan 2007, 03:01)

No one?

This has been covered multiple times already -

Client/Station mode can't bridge properly and hence doesn't work for DHCP. Use WDS.

Well is there a upcoming solution for OpenWRT?
If not, the only solution is to use DD-WRT?
Because WDS mode istn interesting, the client should not accept WLAN connections to it.
Also, WDS mode halfs the bandwitdh.

It however strange it doesnt work, http://madwifi.org/wiki/UserDocs/TransparentBridge

(Last edited by joksi on 23 Jan 2007, 20:09)

wds mode doesn't magically half the available bandwidth just by using it. only if it's working as a repeater is bandwidth halved, because it must send and recieve the same traffic

Okey, so you mean that by setting it all up as WDS and not using the AP on the client AP it wont affect bandwith between the ethernet port and the AP client interface? Only when there is a computer connected to the client AP over WLAN, then it will be half the badnwitdh beteen that computer and the first AP?

Well, can i achieve what I want if i setup the AP and the client AP with WDS? That is, bridging client AP with its ethernnet ports? And how?

And why doesnt the following work in OpenWRT http://madwifi.org/wiki/UserDocs/TransparentBridge ?

From my list of stock answers -

mbm wrote:

The whole "wds halves bandwidth" is a misconception, it's not a WDS issue, it's an issue with a shared medium, namely wireless. To illustrate:

- - -  wireless link
=== wired link

[pc #1] - - - [router #1] - - - [router #2] === [pc #2]

Here, router #1 is both recieving and transmitting over wireless, creating the bottleneck you're attempting to describe.

[pc #1] === [router #1] - - - [router #2] === [pc #2]

Now it's gone, just by changing the connection between pc #1 and router #1 to avoid tying up the wireless. It really has nothing to do with WDS.

Some further education about WDS and client mode:

You can't actually "bridge" in client mode, when a client sends a packet to the access point, the packet contains three headers:

[client/source address][destiation bssid/ap's address][destination address]

If you watch the data going through the bridge you'll see that the client is changing the source address to it's own address to avoid confusing the access point. WDS solves this problem with an additional field:

[source address][source bssid][destination bssid][destination address]

Essentially the source address got split into two fields, allowing it to relay the true address instead of having to use it's own address as the point of origin.

I completely understand the problem now smile

But I have entered this command on both the AP and the STa:
iwpriv ath0 wds 1

And it doesnt work, even though the command should activate frames with four fields.

With other words, i have just followed the mentionned link http://madwifi.org/wiki/UserDocs/TransparentBridge

(Last edited by joksi on 24 Jan 2007, 00:23)

I have just atlast suceeded with my goal!

But only tried it with no encryption, and I wouldnt want to use WEP either.
Do you think WPA with wpa_supplicant can work in this configuration?

Big problems...the AP client seems its connecting every now and then, i can set up a software to pinng every minnute or so, after 10 min, sometimes half an hour, it stops responding. However if i check AP master it says that AP client is still connected :-S

Any ideas? I have tried with attribute "nosbeacon", and without, doesnt make a difference.
I have only one AP client sta and no AP master on the client, so the command should not be needed.

I have even put the two routers by the windows, so they are completely cold now and it stays the same issues.
So something is telling me it has something with the configuration to do?

And the short time it works it works well indeed, approx. 24-25Mbps over the link!

(Last edited by joksi on 24 Jan 2007, 23:16)

The discussion might have continued from here.