Many devices supported by OpenWrt contain an Ethernet network switch. Most switches are configurable and driver options are available. Typical features include ethernet frame tagging and VLAN support. We require two software components:
The preferred contemporary driver architecture for ethernet switches in the Linux kernel is DSA (distributed switch architecture).
For a user the main difference to past OpenWrt switch drivers is that all the switch ports that on a consumer router have names such as LAN1, LAN2, … or WAN also appear as independent network interfaces in userspace and those can be handled like any other network interfaces using the
ip tool or
The Linux kernel also has userspace configuration examples on how to use the DSA switches in Linux.
DSA support will be introduced along with kernel 5.4 support, but there is no full feature parity with swconfig yet as of writing (2020-05-12). Changing VLAN tags is not supported yet at the moment, e.g..
Tagging support is more complex than with swconfig; see the kernel documentation for configuration instructions. It looks like at this point there is no automation for this yet and it needs to be configured through /etc/rc.local.
Only master targets actually having DSA enabled are listed.
|Ramips/mt7621||5.4||See Github PR #2942 for improvements|
The previous switch driver model invented by OpenWrt was switchdev and the corresponding configuration utility was
swconfig. This is used in legacy patches and userspace, but is not recommended when implementing switch drivers for new devices. Please write new code using DSA and help out to convert old drivers to DSA if you can.
Note: Atheros Switch-Chips with the 'N' designation include the Hardware NAT function.