Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1] 2
Author Topic: Multiple SSID how to?
k.v.varlam-
ov
Newbie
Posts: 5
Permalink
Post Multiple SSID how to?
on: August 5, 2012, 15:50
Quote

Hi, Team!
My network needs two WLANs (different SSIDs) on box: one open for guests and one WPA2-PSK for staff. SSIDs should be bridged to different L3 interfaces, routing and iptables filtering between them. I've tried different combinations of /etc/network/interfaces options and different nas parameters but no result.
I didn't find any way how to run more than one nas instance in parallel. Moreover I had no success in running nas instance without security parameters for open network.
So could you please advice me direction for my efforts? How is it usually done? On similar dd-wrt installation I see only one nas instance for secured WLAN, so open network is configured in another manner? how should it be done?
Thanks! DebWRT, Asus RT-N13, BCM4329 chip

k.v.varlam-
ov
Newbie
Posts: 5
Permalink
Post Re: Multiple SSID how to?
on: August 8, 2012, 22:12
Quote

anybody here? 🙂

amain
Administrator
Posts: 222
Permalink
Post Re: Multiple SSID how to?
on: August 8, 2012, 22:25
Quote

Hi. I have no experience with multiple WLANs. However, the rule of thumb is that if it works in OpenWrt, it is possible in DebWrt. How about using VAPs? The nas deamon is only required for encryption (WPA, etc. ). A guest network would not require nas. Just user wireless tools to initialize the interface. I don't recall if the nas daemon has a parameter to select the physical wireless interface in case you want to run multiple encrypted networks. You may want to have a look at hosted. DebWrt has several examples for some default configurations, encrypted and unencrypted.

k.v.varlam-
ov
Newbie
Posts: 5
Permalink
Post Re: Multiple SSID how to?
on: August 9, 2012, 08:28
Quote

Thank you Amain for response!
I've found broadcom.sh script in broadcom-wl package and found that it invokes binary named wlc (it's a main tool of broadcom-wl package). Usage of it is not documented well. I achieved creation wl0.1 interface, it has wireless extensions. Tools like iwconfig can interact with it and get statistics. Commands of initialization of both adapters are something like

iface wl0 inet manual
    pre-up    /usr/sbin/pciunbind
    pre-up    /usr/sbin/wlc ifname wl0 enabled 1
    pre-up    /usr/sbin/wlc ifname wl0 vif 0
    pre-up    /usr/sbin/wlc ifname wl0 ap 1
    pre-up    /usr/sbin/wlc ifname wl0 channel 5
    pre-up    /usr/sbin/wlc ifname wl0 ssid DebWrt
    pre-up    /usr/sbin/wlc ifname wl0 up
    pre-up    /sbin/ip link set wl0 up

auto wl0.1
iface wl0.1 inet manual
    pre-up    /usr/sbin/wlc ifname wl0 vif 1 ap 1 ssid FREEd up
    pre-up    /usr/sbin/wlc ifname wl0.1 up
    pre-up    /sbin/ip link set wl0.1 up

But problem is that this construction doesn't work - wl0.1 and wl0 are both seen in system, but wl0.1 doesn't broadcast radio. difference in Access-Point: field. I've tried different options but no result.

root@debwrt:~# iwconfig
wl0.1     IEEE 802.11bgn  ESSID:"FREEd"
          Mode:Master  Frequency:2.432 GHz  Access Point: Not-Associated
          Bit Rate:16 Mb/s   Tx-Power:32 dBm
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Link Quality=5/5  Signal level=0 dBm  Noise level=-85 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wl0       IEEE 802.11bgn  ESSID:"DebWRT"
          Mode:Master  Frequency:2.432 GHz  Access Point: BC:AE:C5:E7:E7:DB
          Bit Rate=16 Mb/s   Tx-Power:32 dBm
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Link Quality=5/5  Signal level=0 dBm  Noise level=-85 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


root@debwrt:~#

Nas doesn't run over wl0.1 too (Over wl0 runs well). Have you any idea on proper usage of wlc binary? Maybe you feel possible to deep dive into broadcom.sh script to find out how it does this magic? The lack of documentation on it is a problem. Maybe it's time to document it and make Howto on multiple VIFs topic? 🙂
Thanx

k.v.varlam-
ov
Newbie
Posts: 5
Permalink
Post Re: Multiple SSID how to?
on: August 11, 2012, 23:05
Quote

Solution found. Could you please add this to wiki for reuse? It was difficult to check all possible options and find out working one.
This is a piece of configuration file /etc/network/interfaces for broadcom driver (works on Asus RT-N16). This portion of file only initializes two virtual wireless interfaces - main wl0 and additional wl0.1 as isolated instances with different SSIDs.

auto wl0
iface wl0 inet manual
    pre-up    /usr/sbin/pciunbind
    pre-up    /usr/sbin/wlc ifname wl0 mssid 1
    pre-up    /usr/sbin/wlc ifname wl0 vif 0
    pre-up    /usr/sbin/wlc ifname wl0 enabled 1
    pre-up    /usr/sbin/wlc ifname wl0 ap 1
    pre-up    /usr/sbin/wlc ifname wl0 channel 11
    pre-up    /usr/sbin/wlc ifname wl0 ssid DebWrt
    pre-up    /usr/sbin/wlc ifname wl0 up
    pre-up    /sbin/ip link set wl0 up

    post-up   touch /etc/network/run/wl0
    post-down /sbin/ip link set wl0 down
    post-down /usr/sbin/wlc ifname wl0 down
    post-down rm -f /etc/network/run/wl0

auto wl0.1
iface wl0.1 inet manual
    pre-up    /usr/sbin/wlc ifname wl0 vif 1 ap 1 ssid FREE
    pre-up    /usr/sbin/wlc ifname wl0 vif 1 enabled 1
    pre-up    /usr/sbin/wlc ifname wl0 vif 1 up
    pre-up    /sbin/ip link set wl0.1 up

Further bridging or routing depends on your network design and ommitted.

amain
Administrator
Posts: 222
Permalink
Post Re: Multiple SSID how to?
on: August 12, 2012, 10:06
Quote

Thanks for sharing. I sure belief it was difficult to figure out. I took me hours to come up with the default /etc/network/interfaces files for DebWrt. I created a new wiki page: http://dev.debwrt.net/wiki/DocNetBroadcomVAP and added it to the document index ( http://dev.debwrt.net/wiki/Doc ). Is suppose you are using NAS daemon on wl0? And wl0.1 as is? Maybe you can elaborate a little more on your setup and how to use it. Some routing example would be nice, even though it will differ per situation.

asusfan
Newbie
Posts: 17
Permalink
Post Re: Multiple SSID how to?
on: October 3, 2012, 09:34
Quote

How would I go about securing the new interface wl0.1 with nas just like is done for br-lan currently?

amain
Administrator
Posts: 222
Permalink
Post Re: Multiple SSID how to?
on: October 3, 2012, 12:35
Quote

Quote from asusfan on October 3, 2012, 09:34
How would I go about securing the new interface wl0.1 with nas just like is done for br-lan currently?

The wl and wlc tools are used to setup the proprietary Broadcom wireless driver. wl if from Broadcom and wlc from OpenWrt. For setting up a secured wireless network:

[list]

  • Hostapd is used when using the opensource b43 driver (b43.ko).
  • And nas is used when using the proprietary Broadcom driver ( wl.ko )
  • [/list>

    See https://wiki.openwrt.org/doc/faq/before.installation, Section "What is the difference between brcm-2.4 and brcm47xx" for more information.

    In the example from k.v.varlam-ov I assume nas is used on wl0. Wl0.1 is used for a Free network. I don't know if it is possible to setting 2 NAS daemons on the same device on different interfaces. This leaves you with routing, packet filtering, mac address filtering, vpn solutions etc. However, I think the idea in above setup is to have one free and one secured network. A setup commonly used.

    asusfan
    Newbie
    Posts: 17
    Permalink
    Post Re: Multiple SSID how to?
    on: October 3, 2012, 19:27
    Quote

    This is what I tried and did not work:

    auto wl0
    iface wl0 inet manual
        pre-up    /usr/sbin/pciunbind
        pre-up    /usr/sbin/wlc ifname wl0 mssid 1
        pre-up    /usr/sbin/wlc ifname wl0 vif 0
        pre-up    /usr/sbin/wlc ifname wl0 enabled 1
        pre-up    /usr/sbin/wlc ifname wl0 ap 1
        pre-up    /usr/sbin/wlc ifname wl0 channel 11
        pre-up    /usr/sbin/wlc ifname wl0 ssid DebWrt
        pre-up    /usr/sbin/wlc ifname wl0 up
        pre-up    /sbin/ip link set wl0 up
    
        post-up   touch /etc/network/run/wl0
        post-down /sbin/ip link set wl0 down
        post-down /usr/sbin/wlc ifname wl0 down
        post-down rm -f /etc/network/run/wl0
    
    auto wl0.1
    iface wl0.1 inet manual
        pre-up    /usr/sbin/wlc ifname wl0 vif 1 ap 1 ssid FREE
        pre-up    /usr/sbin/wlc ifname wl0 vif 1 enabled 1
        pre-up    /usr/sbin/wlc ifname wl0 vif 1 up
        pre-up    /sbin/ip link set wl0.1 up
        post-up   touch /etc/network/run/wl0.1
        post-up        [ -f /etc/network/run/wl0.1 ] && \
                          start-stop-daemon --start      \
                                            --background \
                                            --oknodo     \
                                            --quiet      \
                                            --pidfile /var/run/nas.wl0.1.pid \
                                            --exec /usr/sbin/nas \
                                              -- -P /var/run/nas.wl0.1.pid -H 34954 -l wl0.1 -i wl0.1 -A -m 128 -w 4 -g 3600 -k 'debwrtdebwrt' -s FREE
        pre-down       [ -f /etc/network/run/wl0.1 ] && \
                          start-stop-daemon --stop \
                                            --signal HUP  \
                                            --pidfile /var/run/nas.wl0.1.pid \
                                            --exec /usr/sbin/nas 
    
    

    I have tried with and without the "-l" flag (This site seems to suggest it's required: http://www.freewrt.org/trac/wiki/Documentation/Packages/broadcom-nas) but no luck. See anything wrong with my approach?

    amain
    Administrator
    Posts: 222
    Permalink
    Post Re: Multiple SSID how to?
    on: October 3, 2012, 22:35
    Quote
  • Why starting NAS on vif with SSSID of Free?
  • -l is used to specify a linux network bridge interface. For example br-lan. Probably not a good idea to specify wl0.1 there.
  • See http://dev.debwrt.net/browser/trunk/debian/package/debwrt-net/etc/network/interfaces.broadcom for DebWrt debfault wireless config for Broadcom
  • Are you aware of the debwrt-net package? http://dev.debwrt.net/wiki/Networking
  • Pages: [1] 2
    Mingle Forum by cartpauj
    Version: 1.0.34 ; Page loaded in: 0.038 seconds.