I am open to other ideas.
Please know I have already tried everything suggested in this thread, short of buying new hardware.
didn't read the whole thread, but here's my take:
It seems that temporary all switch-ports are tagged to the same vlan or that both ethwan and ethlan are temporary joined to the same bridge.
afaics (by quickly browsing / searching the firmware), the switch and bridge are configured in /etc/init.d/opmode.
this already sits faily early in the boot proces:
Code:
root@R7800:/rom$ ls /etc/rc.d/S*
/etc/rc.d/S10boot
/etc/rc.d/S10ca-certificates
/etc/rc.d/S11ubus
/etc/rc.d/S13haveged
/etc/rc.d/S19enet
/etc/rc.d/S20detcable
/etc/rc.d/S20opmode
But before /etc/init.d/opmode is started, all the switch ports are indeed all in the same vlan.
(checked by adding
swconfig dev switch0 show >> /tmp/bootlogsw.txt to the start of /etc/init.d/opmode and looking at that log after boot)
Also tested it by adding the same command to the beginning and end of /etc/init.d/boot.
At the beginning of that boot script, it returns nothing. but at the end of the script it also shows all ports in the same vlan.
So one solution would be to try to find where exactly in /etc/init.d/boot the switch is brought online. and then immediatelly after that, already add some lines to call swconfig to apply the correct VLAN config. (And hope this is fast enough)
Or you could try at the end of /etc/init.d/opmode to add something like:
Code:
ifconfig ethwan down
sleep 10
ifconfig ethwan up
(i.e. bring down the wan interface, wait 10 seconds and bring up the wan interface, and hope that this also triggers the cable modem to reassign an IP-address)