OpenWrt Forum Archive

Topic: [Howto] Configure WDS with WPA2 (Atheros WiFi)

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

Configure WDS with WPA2 (Atheros WiFi)

This guide describe how to configure WDS with WPA2 between two routers with Kamikaze installed. Also both routers must have a Atheros WiFi card.

Hardware used in this howto:
WDS AP: Soekris net4801 (Wistron CM9)
WDS STA: La Fonera

Note: The MAC address used in 'option bssid' comes from 'ifconfig ath0'. 192.168.178.1 is my main router/gateway (AVM FRITZ!Box Fon WLAN 7170) which is doing DSL, DNS and DHCP).

WDS AP

For WPA2 encryption you have to install the hostapd package (dependencies: libopenssl, zlib).

ipkg install hostapd

/etc/config/network

# Copyright (C) 2006 OpenWrt.org

config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface lan
        option ifname   'eth0 eth1 eth2'
        option type     bridge
        option proto    static
        option ipaddr   '192.168.178.3'
        option netmask  255.255.255.0
        option gateway  '192.168.178.1'
        option dns      '192.168.178.1'

/etc/config/wireless

config wifi-device  wifi0
        option type     atheros
        option channel  5

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     'ap'
        option ssid     OpenWrt
        option encryption       'psk2'
        option bssid    '00:18:84:14:39:95'
        option wds      '1'
        option key      '<password>'

WDS STA

For WPA2 encryption you have to install the wpa-supplicant package (dependencies: libopenssl, zlib).

ipkg install wpa-supplicant

/etc/config/network

# Copyright (C) 2006 OpenWrt.org

config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface lan
        option ifname   eth0
        option type     bridge
        option proto    static
        option ipaddr   '192.168.178.4'
        option netmask  255.255.255.0
        option gateway  '192.168.178.1'
        option dns      '192.168.178.1'

/etc/config/wireless

config wifi-device  wifi0
        option type     atheros
        option channel  5
        option disabled '0'

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     'sta'
        option ssid     OpenWrt
        option encryption       'psk2'
        option bssid    '00:18:84:14:39:95'
        option wds      '1'
        option key      '<password>'

(Last edited by forum2006 on 29 Jul 2007, 10:40)

One question about WDS, is this only working in Atheros units right now? I tried making a WDS with two WRTs as you recommend (not changing the hardware references mind you) and this does not work. Are there any additiional packages or settings I must configure. Right now both routers just overlap each other (I can see one but can't see the other, until I unplug the first one).

I also fins it interesting that you keep the "option mode     'ap'" when there is supposedly an "option mode     'wds'", neither appears to work.

That is actually a client mode not a WDS link.  To be wds it would have to be option mode wds

this is a client interface in wds mode, so yes it is a wds link.

I'm a little confused.  Is the BSSID the MAC address of the other router (not the one configuring), or the address of the main router (same for both routers)?  (Here it's the same for both routers, but I wasn't sure which router it was the MAC address for.)

Also, does this work with more then 2 WDS routers?

it's of the other router. You don't need to tell a router it's own MAC.

Yes, it has to be set for both.

Yes you can have multiple, just separate them by spaces
'00:00:00:00:00:00 00:00:00:00:00:00'

Then is this possible too:?

Fonera1---wds---Fonera2---wds---Fonera3---wds---Fonera4---wds...

Yeah.

But don't expect a very fast connection for Fonera 4 if the internet is coming from Fonera1

I've tested this with 2 foneros.
Bridgeing is working, but wds seems to fail. If I get nearer to the wds-fonero, signal is getting worser, not better.

2nd strange thing is that if nothing is connected to eth0 of the wds-fonero ( from booting on )  it does not work at all. not even the eth0 of this box is answering.

wds-fonero : kamikaze 7.07
ap-fonero: kamikaze 7.09
Configuration is the same as above, but with only eth0 and without eth1 .. 2

The discussion might have continued from here.