Linksys M8300 and VLAN assignment during boot

Hey,

I'm using a Linksys M8300 (OpenWrt 21.02.3) behind my OPNsense firewall with multiple VLAN. The routers uplink is connected on port 1 to a VLAN capable switch. The uplink is configured with VLAN 1 "LAN_MGMT" as native VLAN and all other VLANs tagged.
The switchports 2-4 are members of the VLAN 20 "LAN_IoT" (untagged).

When I restart the router, all devices that are connected to the switchports 2-4 are getting an IP address in VLAN 1. After the router is fully up, the devices are not reachable anymore because now the ports are members of VLAN 20. I've to unplug & plug or reboot the other devices as well to get them into the configured VLANs. Is this a normal behaviour, or is my configuration faulty?

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option description 'LAN_MGMT'
        option ports '0t 1'

config device
        option type 'bridge'
        option name 'br_vlan1'
        list ports 'eth0'
        option ipv6 '0'

config interface 'VLAN1'
        option proto 'dhcp'
        option device 'br_vlan1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '10'
        option description 'LAN_User'
        option ports '0t 1t'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '15'
        option description 'LAN_Guests'
        option ports '0t 1t'

config switch_vlan
        option device 'switch0'
        option vlan '4'
        option vid '20'
        option description 'LAN_IoT'
        option ports '0t 1t 2 3 4'

config device
        option type 'bridge'
        option name 'br_vlan10'
        list ports 'eth0.10'
        option ipv6 '0'

config device
        option type 'bridge'
        option name 'br_vlan15'
        list ports 'eth0.15'
        option ipv6 '0'

config device
        option type 'bridge'
        option name 'br_vlan20'
        list ports 'eth0.20'
        option ipv6 '0'

config interface 'VLAN10'
        option proto 'none'
        option device 'br_vlan10'

config interface 'VLAN20'
        option proto 'none'
        option device 'br_vlan20'

config interface 'VLAN15'
        option proto 'none'
        option device 'br_vlan15'

Thank you
Jas Man

I'm having almost similar config. I use static address in interface VLAN1. I have not experienced similar problem. I'm not sure whether this helps you.

1 Like

Still not sure why this happened. But I've found a solution: I've configured VLAN1 on the uplink port 1 as tagged instead of untagged/native VLAN. Now the devices on ports 2-4 are getting the correct IP address.

It seems that the port uplinks are up before the VLAN configuration is fully loaded, and therefore all connected devices are temporary in the native VLAN.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.