Ok, inspired by your solutions (that, sorry but don't worked for me) I found the solution for using MultiSSID VLAN Tagged with TP-Link WDR4300:
Once installed OpenWRT (OpenWrt Attitude Adjustment 12.09-rc1 / LuCI 0.11 Branch (0.11+svn9425)), firstly I created my WiFi Howtspot (by going on "Network" --> "WiFi" --> "Add") in LuCI web interface (default address 192.168.1.1).
Then i connected with telenet to the router ( telnet 192.168.1.1 ).
I upgrade opkg list
And I installed the nano application (a shell text editor)
Now, if you do "nano /etc/config/network" you should see something like this:
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.1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
config switch
option name 'eth0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'eth0'
option vlan '1'
option ports '0t 2 3 4 5'
config switch_vlan
option device 'eth0'
option vlan '2'
option ports '0t 1'
("ctrl + x" for exit nano editor)
Doing the same for wireless ( nano /etc/config/wireless ), you should see:
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option macaddr '64:70:02:e2:91:87'
option hwmode '11ng'
option htmode 'HT20'
list ht_capab 'LDPC'
list ht_capab 'SHORT-GI-20'
list ht_capab 'SHORT-GI-40'
list ht_capab 'TX-STBC'
list ht_capab 'RX-STBC1'
list ht_capab 'DSSS_CCK-40'
option disabled '1'
option txpower '27'
option country 'US'
config wifi-iface
option device 'radio0'
option mode 'ap'
option encryption 'none'
option network 'lan'
option ssid 'OpenWrt'
config wifi-device 'radio1'
option type 'mac80211'
option channel '36'
option macaddr '64:70:02:e2:91:88'
option hwmode '11na'
option htmode 'HT20'
list ht_capab 'LDPC'
list ht_capab 'SHORT-GI-20'
list ht_capab 'SHORT-GI-40'
list ht_capab 'TX-STBC'
list ht_capab 'RX-STBC1'
list ht_capab 'DSSS_CCK-40'
option disabled '1'
config wifi-iface
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
config wifi-iface
option device 'radio0'
option mode 'ap'
option encryption 'none'
option ssid 'OpenWrt2'
config wifi-iface
option device 'radio0'
option mode 'ap'
option encryption 'none'
option ssid 'OpenWrt3'
Now, let's create the VLAN and setting up the router configuration:
In MY case, I use a Debian server with isc-dhcp service, that provide dhcp in based on vLAN tag of each packet that receive.
So, firstly we have to set the correct network information!
## /etc/config/network
## That's the loopback interface...don't touch it!
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
## That's the lan virtual interface. you can modify the ipaddr, but pay attention...
## If you set it wrong, or if you forget it, you'll not able to enter on the router system!
config interface 'lan'
option ifname 'eth0.1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
## That's the external interface, that you have to connect with your switch or directly with your server!
## !IMPORTANT! If you have a managed switch that is between your DHCP server and your router,
## you have to set twice the managed switch port as Trunk (or better, Hybrid) port!...
## If you don't do this, normally managed switch change all VLAN tag of any packet setting the default vLANID (0).
config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
config switch
option name 'eth0'
option reset '1'
option enable_vlan '1' #Here we enable vLAN on the switch router interface
config switch_vlan
option device 'eth0'
option vlan '1'
option vid '1' # Here we set the TAG '1'
option ports '0t 1t 2 3 4 5' # Here we set witch port we tag
# We tag the 2nd 3rd 4th and 5th port...
# We set as trunk the 0 and 1st port
#Now we create the vLAN virtual interface
config interface 'vLAN50'
option type 'bridge'
option proto 'dhcp'
option ifname 'eth0.2 eth0.50' # Here we set witch interface we have to bridge.
# In this case we bridge the packet between eth eth0.2 interface (the WAN int.)
# and the virtual interface eth0.50 (a virtual interface where .50 is the vLAN ID)!
config interface 'vLAN51'
option type 'bridge'
option proto 'dhcp'
option ifname 'eth0.2 eth0.51'
config interface 'vLAN52'
option type 'bridge'
option proto 'dhcp'
option ifname 'eth0.2 eth0.52'
## Now we assign the bridge for any WiFi SSID created before:
## /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option macaddr 'XX:XX:XX:XX:XX:XX' # removed for privacy
option hwmode '11ng'
option htmode 'HT20'
list ht_capab 'LDPC'
list ht_capab 'SHORT-GI-20'
list ht_capab 'SHORT-GI-40'
list ht_capab 'TX-STBC'
list ht_capab 'RX-STBC1'
list ht_capab 'DSSS_CCK-40'
option txpower '27'
option country 'US'
config wifi-iface
option device 'radio0'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
option network 'vLAN50' # Assign to bridge vLAN50
config wifi-device 'radio1'
option type 'mac80211'
option channel '36'
option macaddr 'XX:XX:XX:XX:XX:XX' # removed for privacy
option hwmode '11na'
option htmode 'HT20'
list ht_capab 'LDPC'
list ht_capab 'SHORT-GI-20'
list ht_capab 'SHORT-GI-40'
list ht_capab 'TX-STBC'
list ht_capab 'RX-STBC1'
list ht_capab 'DSSS_CCK-40'
option disabled '1'
config wifi-iface
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
config wifi-iface
option device 'radio0'
option mode 'ap'
option encryption 'none'
option ssid 'OpenWrt2'
option network 'vLAN51' # Assign to bridge vLAN51
config wifi-iface
option device 'radio0'
option mode 'ap'
option encryption 'none'
option ssid 'OpenWrt3'
option network 'vLAN52' # Assign to bridge vLAN52
Ok, now we are going to test the configuration!
Remember, in this configuration you can NOT enter the wifi config by the network or wifi!
You must connect your PC in one of the four LAN interfaces of the route!
(if don't reboot at the first time, do it another one!)
Ok, now reconnect your PC to Router (use a LAN port, now the WAN one!).
And go to LuCI web interface (192.168.1.1).
Go to "Network" --> "Switch" and set up as photo the vLAN:
Then, go to "Network" --> "Firewall" --> "General Settings" --> "Add"
and create a new Firewall Zone:
Apply configuration, and then all should works fine!
For any question or suggestions please post! XD
Thanks a lot!