OpenWrt Forum Archive

Topic: HOW-TO: Setup Multiple WDS connections on one Kamikaze Router

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

@/etc/config/wireless sample

config wifi-device  wl0
        option type     broadcom
        option channel  2


config wifi-iface
        option device   wl0
        option network  lan
        option mode     ap
        option ssid     Snort-Spot
        option encryption none
        option isolate 1

config wifi-iface
        option device wl0
        option network lan
        option mode wds
        option hidden 1
        option ssid     wdsap
        option encryption psk2
        option key "xxxxxxxxxx"
        option bssid "00:1A:XX:XX:XX:XX"

config wifi-iface
        option device   wl0
        option netwok   lan
        option mode     wds
        option hidden   1
        option ssid     wdsap
        option encryption psk2
        option key "xxxxxxx"
        option bssid "00:1C:XX:XX:XX:XX"

END /etc/config/wireless

then create this script in /etc/wdsauto.sh

#!/bin/ash
let tocount=1
echo $tocount
let counter=$(uci show |grep mode=wds |sed -n '$=')
let counter=counter+1
echo $counter
while [ $tocount -lt $counter ]
do
ifconfig wds0.$tocount up
let tocount=tocount+1
echo $counter
done

ifconfig |grep wds|awk {'printf $1'} |sed 's/wds0/\nwds0/g'|grep '.' |sed 's/^/brctl addif br-lan /g' > /tmp/addwds.sh && chmod +x /tmp/addwds.sh && /tmp/addwds.sh

###END SCRIPT

chmod +x /etc/wdsauto.sh

then at the end of /etc/init.d/done but before the last "}" add

sh /etc/wdsauto.sh


and reboot

it's an ugly workaround, but it's tested

keep up the good work

i'm sorry, i posted this on the wrong section, can any admin move it to the HOWTO Section?

Will somebody explain what is happening in that script?

tread wrote:

Will somebody explain what is happening in that script?

With the actual Kamikaze-Releases (7.09pre) the wdsauto.sh-script is no longer required. The bridges are set in the right way.
Important is to set "brctl stp br-lan on" to get rid of the "wds0.x: received packet with  own address as source address"-messages.

In my setup works 4-Router in AP/WDS-Mode without Problems yet.


Regards
tetzlav

Wait, you have psk2 working on a Broadcom? Is this a 7.09 only feature? I thought that this was not possible at all.


Also did you have to modify the "20-broadcom_wds" script to get it working? In 707 you had to modify it to just get WPA1 WDS working.

(Last edited by napierzaza on 27 Sep 2007, 17:18)

tetzlav wrote:

Important is to set "brctl stp br-lan on" to get rid of the "wds0.x: received packet with  own address as source address"-messages.

I've made a tweak in /lib/network/config.sh to setup stp directly in /etc/config/network


# Setup bridging                                                     
        config_get iftype "$config" type                                     
        case "$iftype" in                                                   
                bridge)                                                     
                        config_get brstp "$config" brstp
...
...
                                        $DEBUG brctl addbr "br-$config"
                                        $DEBUG brctl setfd "br-$config" 0
                                        [ $brstp ] && $DEBUG brctl stp "br-$config" "$brstp"
...
...


And then in /etc/config/network:

config interface guest                 
        option ifname  'eth0.13' 
        option type      'bridge'   
        option brstp    'on'     
        option proto    'none'



Regards
SysReq

Hi,
i am new to kamikaze. where do i need to add/change "brctl stp br-lan on"? Can someone please post his configfiles ("network" and "wireless" of at least 2 devices)?

What additional packages do i need?

i am using wds with 2 devices on wr0.9rc5 right now. Now i need a to cover a larger area, so i want to switch to kamikaze with 3 devices total...

thanks a lot for your help!
Chris

I think I'm interested in that too.

I can't believe that nobody knows that

Hi!

It seems in Kamikaze 7.09 WDS works with PSK1 but not PSK2, haven't tried WEP.

Here's my working "wireless" for a WDS-bridge:

config wifi-device  wl0
        option type     broadcom
        option channel  6

config wifi-iface
        option device   wl0
        option network  lan
        option mode     ap
        option ssid     myap
        option encryption psk1
        option key      yourkey
        option isolate  1

config wifi-iface
        option device   wl0
        option network  lan
        option mode     wds
        option ssid     mywds
        option bssid    01:02:03:04:05:06
        option encryption psk1
        option key      yourkey

###END OF wireless
yourkey should be a good key (any string, at least letters and numbers work, don't know which special characters)
the bssid is the mac-address from the other AP (in the output of ifconfig)

Hope this will help some people searching for documentation of WDS-bridges in OpenWRT

Greetings,
Bjoern

dr.chaos wrote:

It seems in Kamikaze 7.09 WDS works with PSK1 but not PSK2.

That's because the hotplug script for WDS is broken. There was a fix posted in another thread a while ago, and I posted the fixed script in another thread the other day.

I have the same configuration. Is taht a problem that both Linksys have the same key and SSID?

I must be missing something.

Can you use WDS between different devices? I have a 500g (atlwap1)  and a wrt54g (atlwap2).

I see entries in the logs where they start up wds and complain about being on the same interface:
Jan  1 00:00:14 atlwap1 user.info kernel: device wds0.1 entered promiscuous mode
Jan  1 00:00:14 atlwap1 user.info kernel: wds0.1: attempt to add interface with same source address.
Jan  1 00:00:14 atlwap1 user.info kernel: br-lan: port 3(wds0.1) entering learning state
Jan  1 00:00:14 atlwap1 user.info kernel: br-lan: port 3(wds0.1) entering forwarding state

DHCP is off on atlwap2 (supposed to be, right)

I cannot get DHCP addr when the second one (atlwap2) is on. As soon as I shut it off, I get dhcp. It's like they're not talking.

I am posting my configs to be thorough. Any help would be great. Thanks in advance!

Atlwap1
/etc/config/network

#### VLAN configuration
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.100.1
        option netmask  255.255.255.0


#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
        option proto    dhcp

/etc/config/wireless
       
config wifi-device  wl0
        option type     broadcom
        option channel  5
        option disabled 0

        # REMOVE THIS LINE TO ENABLE WIFI:

config wifi-iface
        option device   wl0
        option network  lan
        option mode     ap
        option ssid     myssid                                               
        option encryption psk1                                           
        option key      password
        option isolate  1
     
config wifi-iface
        option device   wl0
        option network  lan
        option mode     wds
        option ssid     wdslink
        option bssid    00:0C:41:75:FB:35
        option encryption psk1
        option key      wdspassword

br-lan    Link encap:Ethernet  HWaddr 00:1E:8C:3D:FF:8D 
          inet addr:192.168.100.1  Bcast:192.168.100.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:638 errors:0 dropped:0 overruns:0 frame:0
          TX packets:430 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:59595 (58.1 KiB)  TX bytes:86676 (84.6 KiB)

eth0      Link encap:Ethernet  HWaddr 00:1E:8C:3D:FF:8D 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3336 errors:0 dropped:0 overruns:0 frame:0
          TX packets:357 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:272646 (266.2 KiB)  TX bytes:47081 (45.9 KiB)
          Interrupt:4

eth0.0    Link encap:Ethernet  HWaddr 00:1E:8C:3D:FF:8D 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:81 errors:0 dropped:0 overruns:0 frame:0
          TX packets:172 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7195 (7.0 KiB)  TX bytes:17392 (16.9 KiB)

eth0.1    Link encap:Ethernet  HWaddr 00:1E:8C:3D:FF:8D 
          inet addr:98.192.35.68  Bcast:255.255.255.255  Mask:255.255.248.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3255 errors:0 dropped:0 overruns:0 frame:0
          TX packets:185 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:205403 (200.5 KiB)  TX bytes:27561 (26.9 KiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:88 (88.0 B)  TX bytes:88 (88.0 B)

wds0.1    Link encap:Ethernet  HWaddr 00:1E:8C:3D:FF: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:1E:8C:3D:FF:8D 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:539 errors:0 dropped:0 overruns:0 frame:31011
          TX packets:486 errors:5 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:58607 (57.2 KiB)  TX bytes:102510 (100.1 KiB)
          Interrupt:2 Base address:0x2000


atlwap2

/etc/config/network

#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.100.2
        option netmask  255.255.255.0


#### WAN configuration
#config interface       wan
#       option ifname   "eth0.1"
#       option proto    dhcp

/etc/config/wireless

config wifi-device  wl0
        option type     broadcom
        option channel  5
        option disabled 0

        # REMOVE THIS LINE TO ENABLE WIFI:

config wifi-iface
        option device   wl0
        option network  lan
        option mode     ap
        option ssid     myssid                                               
        option encryption psk1                                           
        option key      password
        option isolate  1
     
config wifi-iface
        option device   wl0
        option network  lan
        option mode     wds
        option ssid     wdslink
        option bssid    00:1E:8C:3D:FF:8D
        option encryption psk1
        option key      wdspassword

/etc/init.d/dnsmasq disable

br-lan    Link encap:Ethernet  HWaddr 00:0C:41:75:FB:33 
          inet addr:192.168.100.2  Bcast:192.168.100.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:382 errors:0 dropped:0 overruns:0 frame:0
          TX packets:139 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:37019 (36.1 KiB)  TX bytes:17501 (17.0 KiB)

eth0      Link encap:Ethernet  HWaddr 00:0C:41:75:FB:33 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:266 errors:0 dropped:0 overruns:0 frame:0
          TX packets:140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:28159 (27.4 KiB)  TX bytes:19471 (19.0 KiB)
          Interrupt:3

eth0.0    Link encap:Ethernet  HWaddr 00:0C:41:75:FB:33 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:269 errors:0 dropped:0 overruns:0 frame:0
          TX packets:143 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:23613 (23.0 KiB)  TX bytes:19119 (18.6 KiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:204 (204.0 B)  TX bytes:204 (204.0 B)

wds0.1    Link encap:Ethernet  HWaddr 00:0C:41:75:FB:35 
          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:0C:41:75:FB:35 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:55 errors:0 dropped:0 overruns:0 frame:19582
          TX packets:70 errors:1 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6834 (6.6 KiB)  TX bytes:9436 (9.2 KiB)
          Interrupt:6 Base address:0x2000

The discussion might have continued from here.