OpenWrt Forum Archive

Topic: Dynamic VLAN hostapd

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

Hi everyone,

Currently iam trying to setup a WLAN with WPA2 and dynamic VLAN assignment via Radius.
So far the RADIUS assignment is working fine.
hostapd with the debug paramater tells me the following:
IEEE 802.11: updated existing dynamic VLAN interface 'wlan0.3'
IEEE 802.11: binding station to interface 'wlan0.3'

It sets up a bridge with the virtual WLAN interface + the virtual eth0 interface.

just after that it reaches the point where iam stuck.

although the bridge is setup and the virtual eth0 interface is working fine the wireless virtual interface doesnt seem to work at all.
so it might be a mistake on my side but i just dont know where to search. Once i assign the physical wlan0 interface to the bridge its working with the associated STA. But as soon as i add the wlan0.3 interface its not getting through.
Currently iam using Kamikaze 8.09 from trunk on a WRT54GL 1.1
Hostapd 0.6.9 with the following config:

interface=wlan0
driver=80211
hw_mode=g
channel=6
ssid=test
ieee8021x=1
nas_identifier=test
auth_server_addr=x.x.x.x
auth_server_port=1812
auth_server_shared_secret=xxxxx
acct_server_addr=x.x.x.x
acct_server_port=1813
acct_server_shared_secret=xxxxx
dynamic_vlan=2
vlan_file=/etc/hostapd.vlan
vlan_tagged_interface=eth0
wpa=3
wpa_key_mgmt=WPA-EAP
wpa_pairwise=TKIP

/etc/hostapd.vlan:
*      wlan0.#

cat /proc/switch/eth0/vlan/2/ports
"1t 5t"
cat /proc/switch/eth0/vlan/3/ports
"1t 5"

I hope anyone around can help me with that issue.

best regards
Kevin

Any updates on this issue? After scouring the internet and doing some packet analysis it seems that packets don't get tagged coming into the wlan0.* interface.

(Last edited by tarwatirno on 29 Jul 2009, 21:18)

This is probably old news but I managed to get this working. There were some bugs in hostapd.

Hi x.sci

can you please provide your solution

config-files and probably a patch for hostapd

thanks

leo

Hy, i know this is old, but can anyone help me with a dir 825-b1?

I have build openwrt from trunk and from atitute with the patches from rpc link but i cannot get it to work (brvlan410 won come up, also my wifi wont authenticate with this patch now) sad

this is my network config (on port 1 and 2 i can confirm vlan are working)

config switch_vlan
        option device 'switch0'
        option vlan '410'
        option ports '1t 2t 5t'

config switch_vlan
        option device 'switch0'
        option vlan '411'
        option ports '1t 2t 5t'

config switch_vlan
        option device 'switch0'
        option vlan '412'
        option ports '1t 2t 5t'

i have a freeradius running on router and auth works :

Sending Access-Request of id 162 to 192.168.1.1 port 1812
        User-Name = "littlej"
        User-Password = "xxxxx"
rad_recv: Access-Accept packet from host 192.168.1.1 port 1812, id=162, length=71
        Tunnel-Type:0 = VLAN
        Tunnel-Medium-Type:0 = IEEE-802
        Tunnel-Private-Group-Id:0 = "410"
        Reply-Message = "Welcome to the intranet, littlej"

and here is my wireless config

config wifi-device  radio0
        option type     mac80211
        option channel  11
        option hwmode   11ng
        option path     'pci0000:00/0000:00:11.0'
        option htmode   HT20
        list ht_capab   SHORT-GI-40
        list ht_capab   TX-STBC
        list ht_capab   RX-STBC1
        list ht_capab   DSSS_CCK-40
        # REMOVE THIS LINE TO ENABLE WIFI:

config wifi-iface
        config 'wifi-iface'
        option 'device' 'radio0'
        option 'network' 'intra'
        option 'ssid' 'eap_vl'
        option 'mode' 'ap'
        option 'encryption' 'wpa2'
        option 'server' '192.168.1.1'
        option 'port' '1812'
        option 'key' 'testing123'
        option 'dynamic_vlan' '2'
        option 'vlan_file' '/etc/config/hostapd.vlan'
        option 'vlan_tagged_interface' 'eth0'

and my hostapd.vlan

root@OpenWrt:/lib/wifi# cat /etc/config/hostapd.vlan
* Wlan0. #

also the config run by hostapd

root@OpenWrt:/lib/wifi# cat /var/run/hostapd-phy0.conf
ctrl_interface=/var/run/hostapd-phy0
driver=nl80211
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
tx_queue_data3_aifs=7
tx_queue_data3_cwmin=15
tx_queue_data3_cwmax=1023
tx_queue_data3_burst=0
tx_queue_data2_aifs=3
tx_queue_data2_cwmin=15
tx_queue_data2_cwmax=63
tx_queue_data2_burst=0
tx_queue_data1_aifs=1
tx_queue_data1_cwmin=7
tx_queue_data1_cwmax=15
tx_queue_data1_burst=3.0
tx_queue_data0_aifs=1
tx_queue_data0_cwmin=3
tx_queue_data0_cwmax=7
tx_queue_data0_burst=1.5
hw_mode=g
channel=11




ieee80211n=1
ht_capab=[HT20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

interface=wlan0
auth_server_addr=192.168.1.1
auth_server_port=1812
auth_server_shared_secret=testing123
nas_identifier=
eapol_key_index_workaround=1
radius_acct_interim_interval=300
dynamic_vlan=2
vlan_file=/etc/config/hostapd.vlan
vlan_tagged_interface=eth0
ieee8021x=1
auth_algs=1
wpa_key_mgmt=WPA-EAP
wpa_group_rekey=300
wpa_gmk_rekey=640
wpa=2
wpa_pairwise=CCMP
ssid=eap_vl
wmm_enabled=1
bssid=84:c9:b2:6b:3f:24
ignore_broadcast_ssid=0

anyone has any sugestion ?

The discussion might have continued from here.