OpenWrt Forum Archive

Topic: Client-bridge mode

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

I'm trying to create following network scheme:

[wire clients]--wrt54g[1]-
                           
[wire clients]--wrt54g[2]--->wireless-->wrt54g[0]--LAN
                           /
[wire clients]--wrt54g[3]-/

wrt54g[0] should route and 1-3 should bridge their lan-wifi interfaces.
(thus there would be one hop going from wire client to LAN)

So far I've encountered number of problems:

1. I couldn't get wrt54g working when mode is STA and eth1 belongs to bridge: ifconfig shows no packets are received.
If mode is changed to WET it seems to start working, but very unreliably (many packet losses). I can bridge when in AP mode (this is default) fine.

2. I couldn't get WPA working on wrt54g acting as client. I've tried both,
-A and -S modes.

I've found in http://www.seattlewireless.net/index.cgi/LinksysWrt54g
about wl_sta.o module, which should be used if wrt54g is in client mode: but couldn't find that file in any linksys source package.

Then I've tried using WDS, better luck here, wds works ok in bridge and I can bridge eth1 "alone", thus getting router instead of bridge.
Performance is almost twice as bad (using only 2 devices), STA-to-AP would get me ~2.7MB/s, wds only ~1.5MB/s.

Next problem is reconnection: after simulating one device power failure, link usually doesn't get reestablished until second device is rebooted: I've solved it using custom script to "wl reboot" if partner can't be reached, but it's not long term solution.

Please post any ideas and comments.

Bridge + Client mode is a pain.
Don't use it.

Separate LAN + WLAN on your WRTs (client mode + AP).

So you need to brick the bridge br0 on 4 WRTs in your case.

Read this, how it works:

http://openwrt.org/forum/viewtopic.php? … wto+client

Thanks.
That went ok, small subnets (255.255.255.240) on end wrts even make sense.

However I'm still "having" problems with reconnection after power failure:
If AP is powered down and plugged in again after several seconds, client reconnects ok.
If client is powered down/up, it never connects to AP: wl down/wl up, wl joint <ssid> etc. doesn't help.
wl scan finds AP, iwconfig shows correct AP mac and ssid but no data is transfered.
If AP is rebooted client reconnects right away.

I could (and am) using simple script to reboot (or more exactly, wl down/up) AP when it can't reach client, but that won't be pretty with several clients.

Update:

Reconnection problems seems to be related to WEP. Disable it and both units reconnect just fine.

Also it doesn't seems to be only problem with reconnection, wifi nic "crashes" after ~1GB data is send, seems to work ok (so far) with WEP disabled.

I'm using 128bit key, haven't tried shorter ones yet.

With wep disabled got units running/transfering for about two days - no problems whatsoever.

Using different (40, 64 bit) WEP keys doesn't seems to help.

Anyone can confirm this?

I'm still looking for wl_sta.o module, no luck so far.

Dunno, i use the one WRT in client mode for internet browsing with one wired PC attached to it.
I hadn't any problems so far.

I just have set wl0_mode to sta and it works.
Even with WEP 128 on both sites smile

But to be true, I don't access the WRT client from the intranet site, so I can't really tell you if it looses the connection from time to time.

I know Sveasoft has written for Alchemy some monitoring application which probhits that behavior.
Maybe you can port it ?

The discussion might have continued from here.