I'm trying to setup multiple wireless interfaces/SSIDs (private and guest) on a WL-500gx running OpenWrt Kamikaze r7213
The first interface (wl0) for private use should be bridged to the lan interface (eth0.0) and the second (wl0.1) should not be member of any bridge and have it's own IP.
snippet from /etc/config/network
#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.0"
option proto static
option ipaddr 192.168.10.1
option netmask 255.255.255.0
config interface guest
option ifname "wl0.1"
option proto static
option ipaddr 192.168.11.1
option netmask 255.255.255.0
/etc/config/wireless
config wifi-device wl0
option type broadcom
option channel 1
# disable radio to prevent an open ap after reflashing:
option disabled 0
config wifi-iface
option device wl0
option network lan
option mode ap
option ssid "main"
option hidden "0"
option encryption "psk"
option key "test"
config wifi-iface
option device "wl0"
option mode "ap"
option ssid "guest"
option hidden "0"
option encryption "psk"
option key "test"
The nas binary for wl0.1 is not running after a reboot of the router.
The problem seems to be with the nas binary, it cannot run with command line parameters for the second wl0.1 interface.
root@OpenWrt:~# /usr/sbin/nas -P /var/run/nas.wl0.1.pid -H 34954 -i wl0.1 -A -m 4 -w 2 -s guest -g 3600 -k test
Command line parsing error. Quitting...
The wl0.1 interface is up and configured with its IP.
If I remove the definition for guest/wl.01 from /etc/config/network, the nas command is successfully started automatically with the following parameters:
/usr/sbin/nas -P /var/run/nas.wl0.1.pid -H 34954 -l br-lan -i wl0.1 -A -m 4 -w 2 -s guest -g 3600 -k test
But why the parameter "-l br-lan"? It shouldn't be part of the lan bridge!
brctl shows it's not member of br-lan:
bridge name bridge id STP enabled interfaces
br-lan 8000.0013d4103a42 no eth0.0
wl0
Associating with this SSID and getting an IP via DHCP is not possible at this stage.
If I add the IP of wl0.1 manually via ifconfig wl0.1 192.168.11.1, it is still not possible to get an IP via DHCP.
If I kill the nas process for wl0.1 and restart it with the following parameters, DHCP and internet access works fine:
/usr/sbin/nas -P /var/run/nas.wl0.1.pid -H 34954 -i wl0.1 -A -m 4 -w 2 -s guest -g 3600 -k test
And what's the difference to my initial configuration? Just the order of starting nas, setting up the ip for wl0.1?
And why is there a "-l br-lan" parameter for the automatic nas startup, even if it's not member of a bridge?
Is there any working configuration variant, without doing it all by myself?