OpenWrt Forum Archive

Topic: [HowTo] use atheros-wifi as wireless-repeater with WPA/WDS

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

For a long time I was looking for a simple wireless repeater which would extend the range of my main AP. Plus, I needed to get my settop-box into the network, which only has RJ-45. A Fonera would be ideal to connect the settop-box per WLAN and ideally function as a wireless repeater. This all should work with WPA encryption.

So, recent commits from nbd provide very easy WDS configuration. You'll need trunk > 12285 and atheros wifi on both sides. I tested this with two foneras.

Main AP

/etc/config/network:
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    dhcp

/etc/config/wireless:
config wifi-device  wifi0
        option type     atheros
        option channel  11

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     ap
        option wds      1
        option ssid     OpenWrt
        option encryption psk
        option key      'xxxxx'

This is basically a normal AP which handles WDS-clients as well.  It's totally sufficient to only add 'option wds 1', the rest will be handled automatically by openwrt.

Now to the wds-client:
WDS-Client

/etc/config/network:
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  dhcp

/etc/config/wireless:
config wifi-device  wifi0
        option type     atheros
        option channel  auto

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     sta
        option wds      1
        option ssid     OpenWrt
        option encryption psk
        option key      'xxx'

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option encryption psk  
        option key      'xxx'

This adds a bridge where three interfaces are included. The WDS-STA interface which is connected to the main AP, a new ap-interface which we will connect to per wlan (repeater) and the eth0-interface where the settop-box is connected via RJ-45.

Have fun!

Thanks for sharing this information.

Hi !

Nice post !
Is there a real WDS link between AP et clients ? What about BSSID identification ?

Thanks
--
Jopa

I am interested to know how to make WDS link repeater with bssid. Is there a configuration /etc/config/wireless setup for WDS link using atheros
wifi card ?

I had to reinstate a repeater link resently, so a fresh WDS installation that is not specific to which device type is used (but only wep encryption).

I don't think their is a WDS in the original posts config
- but I could be wrong.

On both devices, add a wifi-iface to an existing ap config, the bssid being the only difference between them and should be equal to the MAC address of the the other device's wireless interface.
A ifconfig will show a new wds0.1 interface after restarting network.

Also, on the device that is not connected to Internet, disable firewall and dnsmasq
- and add a default gateway and dns entry so ipkg still works ...

# continuing from device specific and ap config

config wifi-iface
    option device    wl0
    option network    lan
    option mode    wds
    option bssid    XX:XX:XX:XX:XX:XX
    option ssid    wds
    option encryption wep
    option key    1
    option key    YYYYYYYYYYYYYYYYYYYYYYYYYY
wds0.1    Link encap:Ethernet  HWaddr 00:17:31:E1:FB:8D  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wl0       Link encap:Ethernet  HWaddr 00:17:31:E1:FB:8D  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:294681 errors:0 dropped:0 overruns:0 frame:78807
          TX packets:407799 errors:7 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:28756467 (27.4 MiB)  TX bytes:533595810 (508.8 MiB)
          Interrupt:2 Base address:0x2000
#### LAN configuration
config interface lan
    option type     bridge
    option ifname    "eth0.0"
    option proto    static
    option ipaddr    192.168.1.2
    option netmask    255.255.255.0
    option gateway    192.168.1.1
    option dns    192.168.1.1

(Last edited by oxo on 13 Oct 2008, 19:05)

oxo: this was written for the binary driver from atheros, NOT broadcom

Hi all, first post wink

We've been using Mikrotik/RouterOS widely, we are using RouterOS' "ap bridge/wds" mode for point-to-point links. I've been trying to set up a wds link to one of this routers (ROuterOS) with a nanostation5 (atheros) + OpenWRT.  Results of my "wds testings" may be usefull, as it's wds with atheros.

SVNed trunk (rev 13003) and built.

So I had a RouterOS with an atheros 802.11a card (channel 60), MAC 00:80:48:7E:8F:8A. wlan1 was configured as APBridge, and a wds link with nanostation5 MAC address. It had 172.25.32.6/30 for that wds interface. No problem there, we've got a lot configured like this

Prob was at OpenWRT+Nanostation5. There was no way to set up the wds link through /etc/config/wireless. After several testings I set it up in a manual way:

wifi down
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ap
iwconfig ath0 channel 60 essid myapssid
iwpriv ath0 wds 1
ifconfig ath0 up
iwpriv ath0 wds_add 00:80:48:7E:8F:8A    
ifconfig ath0.wds0 172.25.32.5 netmask 255.255.255.252

To make it work, "ifconfig ath0 up" MUST BE performed before "iwpriv ath0 wds_add". Iwconfig shows:

ath0      IEEE 802.11a  ESSID:"myapssid"  Nickname:""
          Mode:Master  Frequency:5.3 GHz  Access Point: 00:15:6D:B6:69:4F
          Bit Rate:0 kb/s   Tx-Power:19 dBm   Sensitivity=1/1
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ath0.wds0  IEEE 802.11a  Nickname:""
          Mode:Repeater  Frequency:5.3 GHz  Access Point: 00:80:48:7E:8F:8A
          Bit Rate:0 kb/s   Tx-Power:19 dBm   Sensitivity=1/1
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

And it works. Ping works ;-) I can set up two Atheros APs in WDS mode in a manual way, but haven't find a way to put it in /etc/config/wireless to make it work at boot time.

thanks for your post. I have an RB133 w openwrt and a 433 with routeros on my desk and had assumed openWRT and routeros WDS would be incompatible. Thanks for your efforts

Hi
In this scenario u need to have same channels on both the devices so its not good for p2mp scenario. Anyway to connect with mikrotik os and wrt with mode sta and wds=1 on atheros
regards
norms

(Last edited by normunds on 6 Dec 2008, 09:48)

The discussion might have continued from here.