Hallo, I am trying to setup VLAN with DSA on a Linksys E8450 running OpenWrt 22.03-SNAPSHOT r19338-ae64d0624c / LuCI openwrt-22.03 branch git-22.119.37115-66994a5. I am trying for days to make VLAN work, following several tutorials.
The switches in my setup are properly configured to route the VLAN tagged traffic, which I was able to verify using a computer directly connected to a switch. ALso, the openWRT devices in my network all work as dumb APs, connected to OPNsense though manageable switches. The VLANs are setup in OPNsense and the DHCP server is enabled for each of them, providing a DHCP lease when requested from a VLAN device.
This is my current network configuration:
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd4c:c9ec:2f25::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.11.3'
option gateway '192.168.11.1'
list dns '192.168.11.10'
config device
option type 'bridge'
option name 'vlan-bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
option ipv6 '0'
config interface 'guest'
option device 'vlan-bridge.20'
option proto 'static'
option ipaddr '192.168.30.3'
option netmask '255.255.255.0'
option gateway '192.168.30.1'
option broadcast '192.168.30.255'
config device
option type '8021q'
option ifname 'vlan-bridge'
option vid '20'
option name 'vlan-bridge.20'
option ipv6 '0'
config bridge-vlan
option device 'vlan-bridge'
option vlan '20'
list ports 'lan1:t'
currently I am stuck because I am getting a "Network device is not present" error.
I can't find the reason for this, trying to set up VLAN on the APs since two days.
Thanks for helping me solve this!
EDIT: diagnostic information
{
"kernel": "5.10.113",
"hostname": "wlanog.home",
"system": "ARMv8 Processor rev 4",
"model": "Linksys E8450 (UBI)",
"board_name": "linksys,e8450-ubi",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "22.03-SNAPSHOT",
"revision": "r19338-ae64d0624c",
"target": "mediatek/mt7622",
"description": "OpenWrt 22.03-SNAPSHOT r19338-ae64d0624c"
}
}
network.loopback=interface
network.loopback.device='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fd4c:c9ec:2f25::/48'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='lan1' 'lan2' 'lan3' 'lan4'
network.lan=interface
network.lan.device='br-lan'
network.lan.proto='static'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.lan.ipaddr='192.168.11.3'
network.lan.gateway='192.168.11.1'
network.lan.dns='192.168.11.10'
network.@device[1]=device
network.@device[1].type='bridge'
network.@device[1].name='vlan-bridge'
network.@device[1].ports='lan1' 'lan2' 'lan3' 'lan4'
network.@device[1].ipv6='0'
network.guest=interface
network.guest.device='vlan-bridge.20'
network.guest.proto='static'
network.guest.ipaddr='192.168.30.3'
network.guest.netmask='255.255.255.0'
network.guest.gateway='192.168.30.1'
network.guest.broadcast='192.168.30.255'
network.@device[2]=device
network.@device[2].type='8021q'
network.@device[2].ifname='vlan-bridge'
network.@device[2].vid='20'
network.@device[2].name='vlan-bridge.20'
network.@device[2].ipv6='0'
network.@bridge-vlan[0]=bridge-vlan
network.@bridge-vlan[0].device='vlan-bridge'
network.@bridge-vlan[0].vlan='20'
network.@bridge-vlan[0].ports='lan1:t'
WIFI SETTINGS REDACTED
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].localservice='1'
dhcp.@dnsmasq[0].ednspacket_max='1232'
dhcp.@dnsmasq[0].noresolv='1'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcpv4='server'
dhcp.lan.ignore='1'
dhcp.lan.dynamicdhcp='0'
dhcp.lan.ra_flags='none'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'
HOSTS REDACTED
firewall.@defaults[0]=defaults
firewall.@defaults[0].syn_flood='1'
firewall.@defaults[0].input='ACCEPT'
firewall.@defaults[0].output='ACCEPT'
firewall.@defaults[0].forward='REJECT'
firewall.@zone[0]=zone
firewall.@zone[0].name='lan'
firewall.@zone[0].input='ACCEPT'
firewall.@zone[0].output='ACCEPT'
firewall.@zone[0].forward='ACCEPT'
firewall.@zone[0].network='lan'
firewall.@zone[1]=zone
firewall.@zone[1].name='wan'
firewall.@zone[1].input='REJECT'
firewall.@zone[1].output='ACCEPT'
firewall.@zone[1].forward='REJECT'
firewall.@zone[1].masq='1'
firewall.@zone[1].mtu_fix='1'
firewall.@forwarding[0]=forwarding
firewall.@forwarding[0].src='lan'
firewall.@forwarding[0].dest='wan'
firewall.@rule[0]=rule
firewall.@rule[0].name='Allow-DHCP-Renew'
firewall.@rule[0].src='wan'
firewall.@rule[0].proto='udp'
firewall.@rule[0].dest_port='68'
firewall.@rule[0].target='ACCEPT'
firewall.@rule[0].family='ipv4'
firewall.@rule[1]=rule
firewall.@rule[1].name='Allow-Ping'
firewall.@rule[1].src='wan'
firewall.@rule[1].proto='icmp'
firewall.@rule[1].icmp_type='echo-request'
firewall.@rule[1].family='ipv4'
firewall.@rule[1].target='ACCEPT'
firewall.@rule[2]=rule
firewall.@rule[2].name='Allow-IGMP'
firewall.@rule[2].src='wan'
firewall.@rule[2].proto='igmp'
firewall.@rule[2].family='ipv4'
firewall.@rule[2].target='ACCEPT'
firewall.@rule[3]=rule
firewall.@rule[3].name='Allow-DHCPv6'
firewall.@rule[3].src='wan'
firewall.@rule[3].proto='udp'
firewall.@rule[3].src_ip='fc00::/6'
firewall.@rule[3].dest_ip='fc00::/6'
firewall.@rule[3].dest_port='546'
firewall.@rule[3].family='ipv6'
firewall.@rule[3].target='ACCEPT'
firewall.@rule[4]=rule
firewall.@rule[4].name='Allow-MLD'
firewall.@rule[4].src='wan'
firewall.@rule[4].proto='icmp'
firewall.@rule[4].src_ip='fe80::/10'
firewall.@rule[4].icmp_type='130/0' '131/0' '132/0' '143/0'
firewall.@rule[4].family='ipv6'
firewall.@rule[4].target='ACCEPT'
firewall.@rule[5]=rule
firewall.@rule[5].name='Allow-ICMPv6-Input'
firewall.@rule[5].src='wan'
firewall.@rule[5].proto='icmp'
firewall.@rule[5].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type' 'router-solicitation' 'neighbour-solicitation' 'router-advertisement' 'neighbour-advertisement'
firewall.@rule[5].limit='1000/sec'
firewall.@rule[5].family='ipv6'
firewall.@rule[5].target='ACCEPT'
firewall.@rule[6]=rule
firewall.@rule[6].name='Allow-ICMPv6-Forward'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='*'
firewall.@rule[6].proto='icmp'
firewall.@rule[6].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type'
firewall.@rule[6].limit='1000/sec'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].target='ACCEPT'
firewall.@rule[7]=rule
firewall.@rule[7].name='Allow-IPSec-ESP'
firewall.@rule[7].src='wan'
firewall.@rule[7].dest='lan'
firewall.@rule[7].proto='esp'
firewall.@rule[7].target='ACCEPT'
firewall.@rule[8]=rule
firewall.@rule[8].name='Allow-ISAKMP'
firewall.@rule[8].src='wan'
firewall.@rule[8].dest='lan'
firewall.@rule[8].dest_port='500'
firewall.@rule[8].proto='udp'
firewall.@rule[8].target='ACCEPT'
firewall.@rule[9]=rule
firewall.@rule[9].name='Support-UDP-Traceroute'
firewall.@rule[9].src='wan'
firewall.@rule[9].dest_port='33434:33689'
firewall.@rule[9].proto='udp'
firewall.@rule[9].family='ipv4'
firewall.@rule[9].target='REJECT'
firewall.@rule[9].enabled='false'
firewall.@include[0]=include
firewall.@include[0].path='/etc/firewall.user'
firewall.@zone[2]=zone
firewall.@zone[2].name='guest'
firewall.@zone[2].input='ACCEPT'
firewall.@zone[2].output='ACCEPT'
firewall.@zone[2].forward='REJECT'
firewall.@zone[2].network='guest'
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc fq_codel state UP group default qlen 1000
link/ether e8:9f:80:d5:db:13 brd ff:ff:ff:ff:ff:ff
inet6 fe80::ea9f:80ff:fed5:db13/64 scope link
valid_lft forever preferred_lft forever
3: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether e8:9f:80:d5:db:13 brd ff:ff:ff:ff:ff:ff
4: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether e8:9f:80:d5:db:13 brd ff:ff:ff:ff:ff:ff
5: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN group default qlen 1000
link/ether e8:9f:80:d5:db:13 brd ff:ff:ff:ff:ff:ff
6: lan4@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether e8:9f:80:d5:db:13 brd ff:ff:ff:ff:ff:ff
7: wan@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether e8:9f:80:d5:db:12 brd ff:ff:ff:ff:ff:ff
10: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether e8:9f:80:d5:db:13 brd ff:ff:ff:ff:ff:ff
inet 192.168.11.3/24 brd 192.168.11.255 scope global br-lan
valid_lft forever preferred_lft forever
inet6 fd4c:c9ec:2f25::1/60 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::ea9f:80ff:fed5:db13/64 scope link
valid_lft forever preferred_lft forever
12: vlan-bridge: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 8a:86:20:a1:4a:c9 brd ff:ff:ff:ff:ff:ff
13: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether e8:9f:80:d5:db:14 brd ff:ff:ff:ff:ff:ff
inet6 fe80::ea9f:80ff:fed5:db14/64 scope link
valid_lft forever preferred_lft forever
14: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether e8:9f:80:d5:db:15 brd ff:ff:ff:ff:ff:ff
inet6 fe80::ea9f:80ff:fed5:db15/64 scope link
valid_lft forever preferred_lft forever
15: wlan1-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether ea:9f:80:d5:db:15 brd ff:ff:ff:ff:ff:ff permaddr e8:9f:80:d5:db:15
inet6 fe80::e89f:80ff:fed5:db15/64 scope link
valid_lft forever preferred_lft forever
16: wlan1-2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether ee:9f:80:d5:db:15 brd ff:ff:ff:ff:ff:ff permaddr e8:9f:80:d5:db:15
inet6 fe80::ec9f:80ff:fed5:db15/64 scope link
valid_lft forever preferred_lft forever
17: wlan1-3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether e2:9f:80:d5:db:15 brd ff:ff:ff:ff:ff:ff permaddr e8:9f:80:d5:db:15
inet6 fe80::e09f:80ff:fed5:db15/64 scope link
valid_lft forever preferred_lft forever
18: wlan1-4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether e6:9f:80:d5:db:15 brd ff:ff:ff:ff:ff:ff permaddr e8:9f:80:d5:db:15
inet6 fe80::e49f:80ff:fed5:db15/64 scope link
valid_lft forever preferred_lft forever
19: wlan1-5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether fa:9f:80:d5:db:15 brd ff:ff:ff:ff:ff:ff permaddr e8:9f:80:d5:db:15
inet6 fe80::f89f:80ff:fed5:db15/64 scope link
valid_lft forever preferred_lft forever
20: wlan0-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether ea:9f:80:d5:db:14 brd ff:ff:ff:ff:ff:ff permaddr e8:9f:80:d5:db:14
inet6 fe80::e89f:80ff:fed5:db14/64 scope link
valid_lft forever preferred_lft forever
21: wlan0-2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
link/ether ee:9f:80:d5:db:14 brd ff:ff:ff:ff:ff:ff permaddr e8:9f:80:d5:db:14
inet6 fe80::ec9f:80ff:fed5:db14/64 scope link
valid_lft forever preferred_lft forever
default via 192.168.11.1 dev br-lan proto static
192.168.11.0/24 dev br-lan proto kernel scope link src 192.168.11.3
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.11.0 dev br-lan table local proto kernel scope link src 192.168.11.3
local 192.168.11.3 dev br-lan table local proto kernel scope host src 192.168.11.3
broadcast 192.168.11.255 dev br-lan table local proto kernel scope link src 192.168.11.3
fd4c:c9ec:2f25::/64 dev br-lan proto static metric 1024 pref medium
unreachable fd4c:c9ec:2f25::/48 dev lo proto static metric 2147483647 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev br-lan proto kernel metric 256 pref medium
fe80::/64 dev wlan1 proto kernel metric 256 pref medium
fe80::/64 dev wlan1-1 proto kernel metric 256 pref medium
fe80::/64 dev wlan1-2 proto kernel metric 256 pref medium
fe80::/64 dev wlan1-3 proto kernel metric 256 pref medium
fe80::/64 dev wlan1-4 proto kernel metric 256 pref medium
fe80::/64 dev wlan1-5 proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
fe80::/64 dev wlan0-1 proto kernel metric 256 pref medium
fe80::/64 dev wlan0-2 proto kernel metric 256 pref medium
local ::1 dev lo table local proto kernel metric 0 pref medium
anycast fd4c:c9ec:2f25:: dev br-lan table local proto kernel metric 0 pref medium
local fd4c:c9ec:2f25::1 dev br-lan table local proto kernel metric 0 pref medium
anycast fe80:: dev eth0 table local proto kernel metric 0 pref medium
anycast fe80:: dev br-lan table local proto kernel metric 0 pref medium
anycast fe80:: dev wlan1 table local proto kernel metric 0 pref medium
anycast fe80:: dev wlan1-3 table local proto kernel metric 0 pref medium
anycast fe80:: dev wlan1-4 table local proto kernel metric 0 pref medium
anycast fe80:: dev wlan1-1 table local proto kernel metric 0 pref medium
anycast fe80:: dev wlan1-2 table local proto kernel metric 0 pref medium
anycast fe80:: dev wlan1-5 table local proto kernel metric 0 pref medium
anycast fe80:: dev wlan0 table local proto kernel metric 0 pref medium
anycast fe80:: dev wlan0-2 table local proto kernel metric 0 pref medium
anycast fe80:: dev wlan0-1 table local proto kernel metric 0 pref medium
local fe80::e09f:80ff:fed5:db15 dev wlan1-3 table local proto kernel metric 0 pref medium
local fe80::e49f:80ff:fed5:db15 dev wlan1-4 table local proto kernel metric 0 pref medium
local fe80::e89f:80ff:fed5:db14 dev wlan0-1 table local proto kernel metric 0 pref medium
local fe80::e89f:80ff:fed5:db15 dev wlan1-1 table local proto kernel metric 0 pref medium
local fe80::ea9f:80ff:fed5:db13 dev eth0 table local proto kernel metric 0 pref medium
local fe80::ea9f:80ff:fed5:db13 dev br-lan table local proto kernel metric 0 pref medium
local fe80::ea9f:80ff:fed5:db14 dev wlan0 table local proto kernel metric 0 pref medium
local fe80::ea9f:80ff:fed5:db15 dev wlan1 table local proto kernel metric 0 pref medium
local fe80::ec9f:80ff:fed5:db14 dev wlan0-2 table local proto kernel metric 0 pref medium
local fe80::ec9f:80ff:fed5:db15 dev wlan1-2 table local proto kernel metric 0 pref medium
local fe80::f89f:80ff:fed5:db15 dev wlan1-5 table local proto kernel metric 0 pref medium
multicast ff00::/8 dev eth0 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev br-lan table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan1 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan1-1 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan1-2 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan1-3 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan1-4 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan1-5 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan0 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan0-1 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan0-2 table local proto kernel metric 256 pref medium
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
-ash: iptables-save: not found
==> /etc/resolv.conf <==
# Interface lan
nameserver 192.168.11.10
==> /tmp/resolv.conf <==
# Interface lan
nameserver 192.168.11.10
==> /tmp/resolv.conf.d <==
head: /tmp/resolv.conf.d: I/O error
==> /tmp/resolv.conf.d/resolv.conf.auto <==
# Interface lan
nameserver 192.168.11.10