Configure single port accesspoint with vlan

Hi, i have a TP_link TL-WA801NDv3 single port accesspoint.

I can set it up with 2 vlans, 2 ssids, everything works. But after reboot i cant reach it and wlan is there but no traffic passes.

Default config:

/etc/config/network:

`config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fdb1:ab2f:b191::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'`

ifconfig:

br-lan Link encap:Ethernet HWaddr 18:D6:C7:CB:2D:99
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1212 errors:0 dropped:60 overruns:0 frame:0
TX packets:1044 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:107563 (105.0 KiB) TX bytes:302440 (295.3 KiB)

eth1 Link encap:Ethernet HWaddr 18:D6:C7:CB:2D:99
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1215 errors:0 dropped:3 overruns:0 frame:0
TX packets:1044 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:124711 (121.7 KiB) TX bytes:302440 (295.3 KiB)
Interrupt:4

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:288 errors:0 dropped:0 overruns:0 frame:0
TX packets:288 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:22752 (22.2 KiB) TX bytes:22752 (22.2 KiB)

swconfig list:

Found: switch0 - eth0

swconfig dev switch0 show:

Global attributes:
enable_vlan: 0
Port 0:
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
pvid: 0
link: port:1 link:down
Port 2:
pvid: 0
link: port:2 link:down
Port 3:
pvid: 0
link: port:3 link:down
Port 4:
pvid: 0
link: port:4 link:down
VLAN 0:
vid: 0
ports: 0 1 2 3 4

After i setup my vlan interface in luci an bridge a wlan everything works as desired.
/etc/confg/network looks like this:

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fdb1:ab2f:b191::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'

config interface 'Guest'
option type 'bridge'
option proto 'none'
option ifname 'eth1 eth1.222'
option auto '1'
option delegate '0'

ifconfig like this:

br-Guest Link encap:Ethernet HWaddr 18:D6:C7:CB:2D:99
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)

br-lan Link encap:Ethernet HWaddr 18:D6:C7:CB:2D:99
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4666 errors:0 dropped:60 overruns:0 frame:0
TX packets:4704 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:440692 (430.3 KiB) TX bytes:1482415 (1.4 MiB)

eth1 Link encap:Ethernet HWaddr 18:D6:C7:CB:2D:99
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4670 errors:0 dropped:4 overruns:0 frame:0
TX packets:4704 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:506256 (494.3 KiB) TX bytes:1482415 (1.4 MiB)
Interrupt:4

eth1.222 Link encap:Ethernet HWaddr 18:D6:C7:CB:2D:99
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)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:976 errors:0 dropped:0 overruns:0 frame:0
TX packets:976 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:77104 (75.2 KiB) TX bytes:77104 (75.2 KiB)

wlan0 Link encap:Ethernet HWaddr 18:D6:C7:CB:2D:98
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)

Everything works -> reboot -> can not ping the ap, no traffic through wlan
Whats my problem here? Do i have to use the switch0 in some way? How?

First quick guess: take eth1 out of the ifname option for the "Guest" interface.

I have no clue what your setting is supposed to do.

Use eth1.1 for LAN and eth1.222 for guest.
Don't mix eth1 and eth1.x. Not at all. Not on a single interface (which you did on guest), not on different interfaces (which you did when you compare lan and guest).

I don't want to try that myself, but I can image you're creating a loop just through a single interface.

If you use vlans as outlet of your AP, where is this port attached to and how is the attached device configured? Do you realize you need a vlan aware conterpart for that?

I'm kind of amazed you get any output from switch config. I didn't expect your AP to have a switch at all. To be honest, I don't know. But since your switch is set to "no vlans" anyway, that should be fine. If you enable vlans on your switch, you need to set all connected ports to "vlan 1 tagged, vlan 222 tagged". There's no need for that.

Regards,
Stephan.

1 Like