Responding to my own post as well.
Since I couldn't come up with a working WDS solution I had to find an alternative. I ended up putting the wireless adapter in the so-called STA mode. In this mode, the OpneWRT router acts as a client to the other access point. It has some advantages and some disadvantages compared to WDS.
STA advantages
- the other router does not need to be reconfigured (useful if it is not an OpenWRT)
- actually works (at least for me)
- can be WPA PSK encrypted (as opposed to WDS - only WEP possible (I believe!))
STA disadvantages
- you have to configure different subnets and therefore need to implement routing or NAT (I used NAT since my other access point is not manageable)
- you have 2 ssids, so no "on the fly roaming" possible. You have a little disconnect in between.
So, here is my complete setup:
Internet
| (via DHCP)
| 192.168.2.1 192.168.2.2 192.168.3.1 (br-lan)
------------------ / \ ------------------- /
| Modem |/ \| |/
| + |- - - - - - | OpenWRT |
| Access Point | (wireless)| Kamikaze 7.09 |
| non-OpenWRT | | STA Mode |
| DHCP enabled | | DHCP enabled |
------------------ -------------------
| \ / |
| \ / |
Wireless Clients Wireless Clients
(192.168.2.0/24) (192.168.3.0/24)
(via DHCP) (via DHCP)
First of all, you have to setup the STA link (i.e. connect your OpenWRT router to your shithole router). Therfore enter the correct ssid and key for your non-OpenWRT router in your /etc/config/wireless. Also make sure that you use 'wan' as option network, since you want to connect to the internet with this link.
Secondly, you have to configure your wireless adapter to act as a usual access point as well, so your wireless clients can connect.
more /etc/config/wireless
-------------------------
config wifi-device wl0
option type broadcom
option channel 5
option disabled '0'
config wifi-iface
option device wl0
option network 'wan'
option mode 'sta'
option ssid 'non-OpenWRT'
option encryption 'psk'
option hidden '0'
option isolate '0'
option key 'ClearText-Password'
option bgscan '0'
option wds '0'
config "wifi-iface" ""
option device 'wl0'
option mode 'ap'
option ssid 'OpenWRT'
option hidden '0'
option encryption 'psk'
option key 'ClearText-Password'
option network 'lan'
option isolate '0'
option bgscan '0'
option wds '0'
Once you finished configuring your wireless setup, go ahead and change your WAN interface from eth0.1 to wl0 (since this will be our interface for the default route)
more /etc/config/network (excerpt only)
------------------------
#### WAN configuration
config interface wan
# option ifname "eth0.1"
option ifname "wl0"
option proto dhcp
As I mentioned earlier, you have to setup routing or NAT if you want to allow your wireless clients of your OpenWRT AP to connect to the internet. Either use the route command on both routers (or if that is not possible as in my case) use the following command to enable NAT on your OpenWRT box:
iptables -t nat -A POSTROUTING -o wl0 -j MASQUERADE
Now run /etc/init.d/network restart or reboot (i had to use reboot)
You can check your setup with multiple commands:
route
-----
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.0 * 255.255.255.0 U 0 0 0 br-lan
192.168.2.0 * 255.255.255.0 U 0 0 0 wl0
default 192.168.2.1 0.0.0.0 UG 0 0 0 wl0
wlc ifname wl0 ap --> should return 1 (means your OpenWRT box is configured as AP)
wlc ifname wl0 apsta --> should return 1 (means your OpenWRT box is configured as AP and STA)
Hope this helps someone. Was a pain in the a$$ to setup.