Given the results of /proc/config.gz, I guess it is safe to say the Linksys MX4300 is DSA? Is there another authoritative way (maybe less-dependent on a special package being installed) to query the system for whether it is DSA or swconfig or something else?
From a practical perspective, the easiest way to determine if a multi-port device is DSA would be to look at the default /etc/config/network file and find the br-lan device definition. A DSA device that looks something like this (there are variations to the theme, but this is the general structure):
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
By contrast, swconfig will look something like this:
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
...
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 4 0t'
This comment (old, 2022) says the driver is faking independent network cards.
The MX4300 Luci UI reports them as "Ethernet adapters" rather than "switch ports"
I agree the MX4300 is definitely not swconfig (no switch configuration in /etc/config/network).
The reason this matters to me is because I am trying to correctly configure VLANs and trunk ports and the system being DSA/swconfig/no-switch affects the ports and names used to configure bridge devices and such.
Just a quick glance, and you may be right that the device doesn't use an actual switch chip. However, the structure of br-lan is setup by default with DSA syntax, so the kernel is presumably abstracting the hardware in the same way it does a switch.
That said, I don't think that it should matter... DSA/bridge-VLAN syntax should work for the VLANs.
I'd setup just one additional network so you have a total of 2 VLANs and verify that it is functioning as expected. If it doesn't work, post the configs (network, firewall, dhcp) here and we can review to ensure that there aren't any syntax or other config issues. And if there's no obvious cause, we can try another technique.
ipq807x/ ipq60xx/ ipq50xx do use a switch (apart from potential 1-2 >1 GBit/s ethernet ports), but currently neither swconfig nor DSA, but very rudimentary switchdev drivers (which make it look a bit like individual ports or DSA, it's still a switch though).
Thank you. I decided to configure like separate adapters, just because Luci is reporting them that way. Things are working for me.
One surprising thing I discovered: the "wan" adapter seems to have a stable MAC address (which I use for static DHCP), but the "lan" adapters seem to have unpredictable MAC addresses that are set at boot or something.
The firstboot configuration "hard-codes" their MAC addresses using option macaddr, but lacking that, they have unpredictable MAC addresses.
I discovered this because I had been adding the "lan" ports to the bridge device first, resulting in static DHCP not behaving as expected. Changing the configuration to add the "wan" adapter first solved that problem.
Are you configuring each port to carry just a single network, untagged -- basically treating them as individually routed ports? Or are you setting up trunk ports with 802.1q VLAN tags?
The above "style" of configuration seems to work for this MX4300 device (no configuration for switch or VLAN filtering). It is not working for my DSA device; I think I have to set up some form of VLAN filtering configuration on the bridge devices.
Would you be willing to try a different method on the MX4300? I think I can come up with the right recipe that should work on both this device and a real DSA system.
Hey, thanks! This is just a regular "DSA-style" config, correct? (Place all ports under a single bridge device, set up VLANs inside the bridge, then configure interfaces to point at the bridge VLANs.)
I suppose it could be nice to have a single config that works on both types of systems, but I'd rather have a "minimal" configuration, even that means multiple such configurations for different types of systems.
Yes. I'd recommend using this same method (bridge-vlans) for both devices. It's obviously required for true DSA, but it is good to use the same on both since it actually simplifies your config from a human/cognitive aspect. And another consideration is that the non-bridge-vlan approach absolutely won't work with a DSA device, so by keeping your configs the same will reduce the risk that you might try to use the incompatible approach on the DSA device.
Honestly, I would argue that the DSA + bridge-vlan method is no more complex than your non-bridge-vlan approach.