I think I'm maybe doing something wrong with vlan names but can't find anything differing from the config I have...
Vlans matching the ethernet ports work ok (e.g. eth0.3 or eth0.4) but as soon as I try anything like vlan eth0.8 or eth0.10 nothing happens.
The router is a BT Homehub 5A running OpenWrt 18.06.1.
I’m trying to set this up for an old D-Link DAP-2360 access point which does not support isolation of WiFI clients other than with vlans.
The AP works fine on vlan 4 but since I set it with a lan PVID of 10 I can no longer access its configuration. The vlan 4 route through that is still working fine though.
Testing has been via a managed switch and lots of cable swapping. There is an unmanaged port and a trunk port from the router to the switch.
The switch trunk ports (router & AP) is set to tagged on all 3 vlans.
Vlan 4 always provides a DHCP lease when the port connecting my laptop to the switch is set to vlan 4. Switching to vlan 8 or 10 provides no DHCP leases.
swconfig dev switch0 help:
switch0: eth0(Lantiq XRX200 Switch), ports: 7 (cpu @ 6), vlans: 64
--switch
Attribute 1 (int): enable_vlan (Enable VLAN mode)
Attribute 2 (none): apply (Activate changes in the hardware)
Attribute 3 (none): reset (Reset the switch)
--vlan
Attribute 1 (int): vid (VLAN ID (0-4094))
Attribute 2 (int): enable (Enable VLAN)
Attribute 3 (ports): ports (VLAN port mapping)
--port
Attribute 1 (int): uvr (Unknown VLAN Rule)
Attribute 2 (int): vsr (VLAN Security Rule)
Attribute 3 (int): vinr (VLAN Ingress Tag Rule)
Attribute 4 (int): tvm (Transparent VLAN Mode)
Attribute 5 (int): pvid (Primary VLAN ID)
Attribute 6 (unknown): link (Get port link information)
Config is as follows.
‘wifi’ (eth0.4) is the working vlan.
Network:
config interface 'wifi'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.40.1'
option ifname 'eth0.4'
option gateway '192.168.0.1'
config interface 'wifi_guest'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.41.1'
option ifname 'eth0.8'
option gateway '192.168.0.1'
config interface 'wifi_guest2'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.42.1'
option ifname 'eth0.10'
option gateway '192.168.0.1'
Firewall:
config zone
option name 'wifi'
option network 'wifi'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'wifi_guest'
option network 'wifi_guest'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'wifi_guest2'
option network 'wifi_guest2'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
config forwarding
option dest 'wan'
option src 'wifi'
config forwarding
option dest 'wan'
option src 'wifi_guest'
config forwarding
option dest 'wan'
option src 'wifi_guest2'
DHCP:
config dhcp 'wifi'
option interface 'wifi'
option limit '150'
option leasetime '1h'
option start '100'
config dhcp 'wifi_guest'
option interface 'wifi_guest'
option limit '150'
option leasetime '1h'
option start '100'
config dhcp 'wifi_guest2'
option interface 'wifi_guest2'
option limit '150'
option leasetime '1h'
option start '100'