OpenWrt Forum Archive

Topic: Bridged Client mode (not WDS, not routed/NAT) - Howto

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

Is is possible to configure my wrt54g to be a wireless client bridged? All the tutorials that I have read are for a routed/NAT client. I need my LAN and my WLAN to be on the same subnet. The end result is a wireless client bridge that will connect to my xbox to be used with system link (uses network broadcasts).

Any help would be greatly appreciated!

The default openwrt installation functions as a plain old ethernet style bridge.

It is true that the default install of OpenWRT does have the WLAN and LAN bridged. But it is acting as an Access Point and not a client. I tried to use the default bridge as a client but it didn't work. I did this by deleting the firewall rules and setting the wireless to sta mode. I'm sure there are more steps involved but I don't know linux routing well enough...

Since no one knows how to do a wireless client bridge, I have had no choice but to try WDS. So far it is working ok. There are a few glitches I am working on but I am on the same subnet! (bridged!)

bridging and client mode won't work.
3 vs 4 address format. google a bit smile

Google a bit? I wish what you say is true. It is not true that this information is easy to come by. I have found the exact opposite true. I have found countless places where wireless "bridging" is said to be possible. "Your router already comes bridged just make it a client using sta or wet," is the reply from the masses. WRONG! No one will give me a working configuration, just some theoritical configs. If what you say is true then the OpenWRT WIKI could use your information. Let the secret out of the bag, NO CLIENT BRIDGING.

Here is another tough question: How can WDS perform client wireless bridging?

FYI, I searched the whole openwrt forum without a good answer. Using google also didn't give me results. And as you can see you are the only person who has given me a straight answer...

THANK YOU

If what you say is true then the OpenWRT WIKI could use your information. Let the secret out of the bag, NO CLIENT BRIDGING.

http://openwrt.org/forum/viewtopic.php?p=4061#4061

BTW, this is not an OpenWrt problem. This is a general one, it happens for example with MadWifi, too.

Here is another tough question: How can WDS perform client wireless bridging?

In WDS, Your stay in master mode (You have 2 APs).

FYI, I searched the whole openwrt forum without a good answer. Using google also didn't give me results. And as you can see you are the only person who has given me a straight answer...

THANK YOU

You're welcome smile

UPDATE: WDS did work as advertised by bridging my two wrt54gs. But I had troubles with clients connecting to my bridged APs. I'm still working on a good solution.

Hi all,

Wireless client bridge howto:
http://woz.gs/wifi/openwrtbridge.html

I spent all day working on this! Tried google and the forums, no luck. There are some frustrating little gotchas that will get ya, they are noted in the howto.

cheers,
--tim

Do the configuration described in this howto support any wifi security? WPA or WEP?

Thanks in advance
Regards,

Yes using wl and/or iwconfig you can set up security. Good luck.

Thanks timethy, I'll give it a try this weekend  big_smile

I really, really hope it works!

Nevermind what I said about the weekend...IT WORKED!!! I can now return my Linksys $130 802.11abg gaming adapter!!! I know sooo many people who have been waiting for this answer!

timethy is a STUD!

ps. I think there are a few typos on the howto

I'm very interested in this configuration. I'm going to test now. But I'm newbie in linux, so I have some doubts, excuse me if there are too simple.

I've a v2.2 so I must use the experimental version, the recommended in the installation docs is the squashfs version:
http://openwrt.org/downloads/experiment … uashfs.bin

I'll flash it using TFTP. I've enabled the boot_wait option in the Alchemy administration option.

Then I'll configure it to access to internet and install wl (and optionally dropbear).

I use 192.168.1.x in my lan, I want to use 192.168.1.100 as bridge IP so I will run this commands:

# nvram set lan_proto=static
# nvram set lan_ipaddr=192.168.1.100
# nvram set lan_netmask=255.255.255.0
# nvram unset wan_gateway   <--Is this correct?? wan_gateway or lan_gateway?
# nvram unset wan_dns         <--Is this correct?? wan_dns or lan_dns?

# nvram set wan_proto=static
# nvram set wan_ipaddr=192.168.2.1 <-- this is another subnet, unused in my lan??
# nvram set wan_netmask=255.255.255.0
# nvram unset wan_gateway
# nvram unset wan_dns

# nvram set wl0_mode=wet
# nvram set wl0_infra=1
# nvram set wl0_ssid=MyWirelessNetwork
#nvram set security_mode=wep
#nvram set wl0_wep=enabled
#nvram set wl0_key1=DEADBEEF11
#nvram set wl0_key2=DEADBEEF22
#nvram set wl0_key3=DEADBEEF33
#nvram set wl0_key4=DEADBEEF44
#nvram set wl0_key=1

# nvram commit
# reboot

After this the router will be a bridge, and use wep encryption. I've some doubts:

Must I configure the lan_gateway / lan_dns ?
The wan_ipaddr has any use?
Can I connect more than one pc to the router and bridge all to the main lan?
Must I change any of this commands to use in a 2.2 version?
Do you know if this config will run also with WPA-PSK ?

I'm sorry if any of this questions are too obvious but I'm newbie using linux and network.

Thanks in advance
Best Regards

johne: 
Spread the word. (That I'm a stud)


muchod:

# nvram unset wan_gateway <--Is this correct?? wan_gateway or lan_gateway?
# nvram unset wan_dns <--Is this correct?? wan_dns or lan_dns?

Thanks guys for catching that. (fixed)
I don't know how to wiki but could somebody add this to the docs?

>Must I configure the lan_gateway / lan_dns ?

Only if you want it to access the internet.

The wan_ipaddr has any use?

Leave it static and you can use it for a login port. You cannot bridge the wan port, but you can do whatever you want with it otherwise.

Can I connect more than one pc to the router and bridge all to the main lan?

As many as you want! Go nuts, plug in some more lan switches!!!

Must I change any of this commands to use in a 2.2 version?

No idea.  Pray to the brick gods and go for it!

Do you know if this config will run also with WPA-PSK ?

No idea, I don't use wifi encryption.

johne: 
Spread the word. (That I'm a stud)

I'll do it too wink

Well, it's running very well, I'm using WEP encryption, will try WPA another day, altough I have two little  problems yet, may be I did something wrong.

1.- I can't telnet or ping the wrt54g from the main lan, but I can telnet and ping the pc's behind the wrt54g from the main lan. Sometimes the ping or the telnet works and I can see the telnet login screen or some ping responses. But the ping looses practically all the packets. No problems with pings to hosts behind the bridge. Also not problems connecting to the bridge from the pcs directly conected to it.

2.- Sometimes when I restart the wrt54g and/or the main AP the wrt54g don't connect to the main AP. If I telnet to it and run 'wl join MYSSID' then all works.
Do you know some script that can check connection and  reconnect or reboot if it isn't connected?

The first problem is unimportant to me, the second is a little worse, I must look for a solution.

Anyway, this is exactly what I was looking for. Thank you very much for your help.

Best Regards,

Just a question, using "wet" you get half the bandwith you would get in "without-bridge client mode" don't you? Somebody tested it?

I did the tests myself. You get the same bandwith using "client in breaked bridge mode (mode=sta)"  and "client in bridged mode (mode=wet)". I used a Dlink-900AP as an AP (802.11b) and configured a WRT54G as client in the two different ways:

[http://woz.gs/wifi/openwrtbridge.html ]
wl0_mode=wet
lan_ifname=br0
...

[http://openwrt.org/ClientModeHowto]
wl0_mode=sta
nvram set lan_ifname=vlan0             
nvram set wifi_ifname=eth1         
...

In the two configurations I used Iperf to test the bandwith and always had the same result: 5 Mbit/sec
The bandwith didn't decrease as I exepected.

I'm a newbie to OpenWrt (I just installed and configured it last night) so hopefully this is a simple question.

What's the difference between wet and sta mode?  I'm using my WRT54G as a bridge to connect some remote wired PCs to my Netgear router.  I got everything working using wet mode and the default bridge as seen in http://woz.gs/wifi/openwrtbridge.html.  This seems to work really well for me, but many of the other procedures I see mention using sta mode instead of wet.  I can't seem to find a simple explanation of the difference between the two.

If you use sta mode, do you have to break the default bridge and then use software to connect the wifi to the vlan?  I'm guessing that from acidbits' last post.

Thanks in advance.

This looks like a good guide, I'll be trying this in the coming weeks. Thanks.

Hi folks,

i trying to get running following configuration:


                                \|/  <------------->  \|/
                                 |                           |
               ---------------                          --------------------
ADSL---| DLink DI624 |                       | WRT54GS V1.1 |
               ---------------                           -------------------
                 |       |        |                              |        |        |
             PC1   PC2   PC3                      PC4   PC5   PC6
       
All PCs are in the same net: 192.168.1.0

I fetched the experimental snapshot 22 April 2005 from the openwrt site and installed it on the router. I follwed the instructions from  [ http://woz.gs/wifi/openwrtbridge.html ].

Results:

- Any PC (PC4, PC5, PC6) on the WRT54GS can ping all the other PCs (PC1, PC2,PC3) and the internet. So far so good.
- PC1, PC2, PC3 can ping PC4, PC5, PC6 BUT with packet loss. In fact, follwing can be observed: If only one of (PC4, PC5, PC6) gets pinged, all is ok.
  If multiple of (PC4, PC5, PC6) get pinged, the pings are not done simultaneously! One gets pinged for some seconds, then the next and so on. The package
  loss is about 70%!
- If a Ping from PC1 or PC2 or PC3 is performed to one PC behind the WRT, and i perform a ping using the serial console from the WRT to one of the connected to
  the DLink router, all other pings get interrupted.
 
Anyone experienced something similar?

I've got the same problem with experimental (build from march 28), it seems there is an ARP problem somewhere:
I'm running a WRT54GS as AP and a WRT54G as a bridge/client, with a PC behind. Pinging both the G and the PC at the same time results in packet loss.

Another (possibly related) problem is the transmission of multicast traffic (i.e. IPv6 neighbor discovery), which only works from the WET to the AP, but not the other way around.

Did you find a work-around ?

I only work with one machine at the same time wink not that hard, having only one behind the WRT...

Maybe I'll switch to pure client mode with proxy arp... but then again, that will be less clean of a solution

Thanks for your quick answers! I spent already 3 weekends on this problem, thinking i'm doing something wrong.
Only one PC it's not an option for me. I'll try to find some information on proxy arp, but i've to admit that i know nothing about.