Hello there!
I have heard that swconfig ("Switch" tab under "Network") is somewhat obsolete (I do believe since OpenWRT 21), but my Asus RT-AC51U with freshly installed OpenWRT 24.10 still has it. VLANs work both through the swconfig (with some WiFi issues) and virtual bridge filtering.
So, main question is: should not be there only single VLAN solution in such case?
Perhaps swconfig is obsolete just for newer devices, that support DSA?
If I go to the Interface/Device tab, to create VLANs, I have only two devices: "eth0.1" which is all (4) LAN ports and "eth0.2" which is single WAN port.
So, I can configure VLANs here, but not per LAN port, but only per all LAN ports and per WAN port.
I firstly did a weird swconfig + virtual bridge VLANning, at OpenWRT subreddit post first, where I first had an idea, to assign each port in swconfig to VLANs "111, 222, 333, 444" and then put each newly created VLAN in a bridge, where they would have additional VLANs, but thankfully @BIGFAT helped me to understand, that is not the best way by resource usage.
When I tried to configure VLANs on this router, I could go either way, with VLANs per all ports, or per port, but in swconfig.
With swconfig, though, I had an issue with WiFi, that I had to create a bridge with single VLAN interface, and assign this interface to WiFi's network. But, I guess this is a normal procedure.
Additional info about the router, if needed:
ubus call system board:
{
"kernel": "6.6.93",
"hostname": "RT-AC51U_OpenWRT",
"system": "MediaTek MT7620A ver:2 eco:6",
"model": "Asus RT-AC51U",
"board_name": "asus,rt-ac51u",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "24.10.2",
"revision": "r28739-d9340319c6",
"target": "ramips/mt7620",
"description": "OpenWrt 24.10.2 r28739-d9340319c6",
"builddate": "1750711236"
}
}
cat /etc/config/network:
(WAN interfaces are disabled, but included for future use)
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 'fd4b:ee08:5853::/48'
option packet_steering '1'
config device
option name 'eth0.1'
option macaddr 'de:ad:be:ef:13:37'
config interface 'lan'
option device 'eth0.40'
option proto 'none'
option type 'bridge'
option defaultroute '0'
config interface 'wan'
option device 'eth0.10'
option proto 'dhcp'
option disabled '1'
option auto '0'
option hostname '*'
config interface 'wan6'
option device 'eth0.10'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option norelease '1'
option disabled '1'
option auto '0'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '6t'
option vid '1'
option description 'Hardcoded_LANs'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '6t'
option vid '2'
option description 'Hardcoded_WAN'
config interface 'IoT'
option proto 'none'
option device 'eth0.45'
option defaultroute '0'
config route
option interface 'lan'
option target '0.0.0.0/0'
option gateway '192.168.40.1'
option source '192.168.40.2'
config device
option type '8021q'
option ifname 'eth0'
option vid '41'
option name 'eth0.41'
config interface 'LoL'
option proto 'none'
option device 'eth0.41'
option auto '0'
option defaultroute '0'
config switch_vlan
option device 'switch0'
option vlan '3'
option vid '40'
option ports '0t 1 6t'
option description 'LAN'
config switch_vlan
option device 'switch0'
option vlan '4'
option vid '41'
option ports '0t 2 6t'
option description 'LoL1'
config switch_vlan
option device 'switch0'
option vlan '5'
option ports '0t 6t'
option vid '45'
option description 'IoT'
config switch_vlan
option device 'switch0'
option vlan '6'
option ports '0t'
option vid '10'
option description 'WAN_notUsed'
config switch_vlan
option device 'switch0'
option vlan '7'
option vid '50'
option ports '0t 6t'
option description 'Guest'
config switch_vlan
option device 'switch0'
option vlan '8'
option vid '5'
option ports '0t 6t'
option description 'Default2'
config switch_vlan
option device 'switch0'
option vlan '9'
option ports '0t 6t'
option vid '99'
option description 'MNGT'
config interface 'MNGT'
option proto 'static'
option device 'eth0.99'
option ipaddr '192.168.99.2'
option netmask '255.255.255.0'
option gateway '192.168.99.1'
list dns '192.168.99.1'
config device
option type 'bridge'
option name 'br-lan_wifi'
option bridge_empty '1'
list ports 'eth0.40'
config interface 'int_lan_wifi'
option proto 'none'
option device 'br-lan_wifi'
option defaultroute '0'
config device
option type 'bridge'
option name 'br-IoT_wifi'
list ports 'eth0.45'
config interface 'int_IoT_wifi'
option proto 'none'
option device 'br-IoT_wifi'
option defaultroute '0'
config switch_vlan
option device 'switch0'
option vlan '10'
option vid '55'
option ports '0t 3 6t'
option description 'Test1'
config switch_vlan
option device 'switch0'
option vlan '13'
option vid '56'
option ports '0t 4 6t'
option description 'Test2'
cat /etc/config/wireless:
config wifi-device 'radio0'
option type 'mac80211'
option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
option band '5g'
option channel '36'
option htmode 'VHT80'
option country 'SE'
option cell_density '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'int_lan_wifi'
option mode 'ap'
option ssid 'Vi-Fi_50'
option encryption 'sae'
option key 'password'
option ocv '0'
config wifi-device 'radio1'
option type 'mac80211'
option path 'platform/10180000.wmac'
option band '2g'
option channel '13'
option htmode 'HT20'
option country 'SE'
option cell_density '0'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'int_lan_wifi'
option mode 'ap'
option ssid 'Vi-Fi_24'
option encryption 'sae'
option key 'password'
option ocv '0'
config wifi-iface 'wifinet2'
option device 'radio1'
option mode 'ap'
option ssid 'Vi-Ti_24'
option encryption 'sae-mixed'
option key 'password'
option network 'lan_wifi_int int_lan_wifi'
option ocv '0'
config wifi-iface 'wifinet3'
option device 'radio0'
option mode 'ap'
option ssid 'Vi-Ti_50'
option encryption 'sae-mixed'
option network 'int_lan_wifi'
option key 'password'
option ocv '0'
config wifi-iface 'wifinet4'
option device 'radio1'
option mode 'ap'
option ssid 'Vi-Fi_IoT'
option encryption 'sae'
option key 'password'
option ocv '0'
option network 'int_IoT_wifi'
wifinet2 seems to have double interface. I can guess this is because of the renaming I did a while ago. This SSID (LAN & Internet access) works fine, though.

