Switch active before it's configured - avoidable?

At some point you really need to recognize and accept that these are purpose-built, consumer devices, not enterprise-grade switches.

I do. And I don't intend to question that. I just think it's better to understand the consequences and document them here as I come across them. Because this wasn't obvious to me.

And I appreciate very much that you share your deep knowledge.

To better understand the IPQ40xx and similar devices, take a look at its core DTS, qcom-ipq4019.dtsi, as patched in your build tree. Pay attention to the switch_*_bmp in the ess-switch section, as well as the gmac0 and gmac1 definitions. You'll need to understand how the switch, phys, and MACs are "wired" and how the phy tagging works (which is different than VLAN tagging). See also http://wiki.dreamrunner.org/public_html/Embedded-System/Qcom-ipq40xx/ipq40xx-ethernet-analysis.html

yes is was but i have lost it long ago
my comment was mainly to say that with device's directly connected to it's lan ports you can instigate the interface to reset to trigger them to request a new dhcp address
I know this was possible on a DIR-645

Not with the bare kernel. While the drivers are built-in (physically integrated in the kernel image) for most devices in OpenWrt, there is no way to configure the switch without a userspace application to ask the kernel to do it.

On a Linux server or anything running a full Linux distro you usually have an initramfs for that (a minimal read-only OS image loaded on boot which contains basic stuff to initialize software raid with mdadm, LVM volumes or ZFS filesystems or network shares or VLAN or whatever else) and then when the root partition is ready it will mount it.

Afaik on OpenWrt there is no initramfs because of space-saving reasons (OpenWrt fits a whole firmware in the size of a initramfs used by the average Linux distro, just to give a sense of scale).
But on OpenWrt you can do an extroot over network folders, and it will be basically the same thing. https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

1 Like