The problem is that every time I reboot or apply *some* of the changes (e.g. for WiFi) VLAN1 changes back to
Code:
VLAN 1:
ports: 0t 1t 2t 3t 4t 5t
, I assume this is b/c swconfig was executed in the background.
To mitigate startup issue I have a startup script which runs swconfig commands above at startup. It all works.
What would be the best way to run the same commands every time swconfig is executed by the Apply script, or, in general, after system executes swconfig ?
1. Copy the executable to /tmp.
2. Create a script that calls the copied executable, adding any other actions you'd like to take in response to that executable being called.
3. Bind the script to the original executable so the system calls your script rather than the original executable.
The following is a basic outline. You'd have to refine it according to your specific needs.
cat << 'EOF' > $SCRIPT
#!/bin/sh
echo '### your code can go before … ###'
$NEW_EXE "$@"
echo '### … and/or after the original executable ###'
EOF
chmod +x $SCRIPT
sed -i "s:\$NEW_EXE:$NEW_EXE:g" $SCRIPT
mount --bind $SCRIPT $OLD_EXE
Ideally this would execute as early as possible in the startup script.
You can use the same code/technique w/ any other executable you might want to intercept. That's why the script is generalized except for the first line, where I specify the executable.
Then you have to deactivate VLANs support in the “Switch config tab” and configure your VLANs manually.
It is logical that both together lead to conflicts.
Quote:
, i.e. this does not work for trunk ports.
Of course this is not true, it is not written anywhere that a trunk must provide a untagged VLAN.
Basically, this is also nonsense because you have to connect devices that are capable of IEEE 802.1Q to a trunk port anyway in order to be able to use the tagged VLANs.
And if the device understands 1 tagged VLAN then it also understands 1000.
Then you have to deactivate VLANs support in the “Switch config tab” and configure your VLANs manually.
Thanks, this is a good suggestion! I was not sure if there is anything else triggered when I enable VLAN on Switch Config page. If I can just disable it and configure it manually this should solve the problem. Anybody can confirm this should work? Thanks!
ho1Aetoo wrote:
It is logical that both together lead to conflicts.
There is no fundamental problem per se - I have Cisco managed switch and FreshTomato working OK in this configuration. The problem is that dd-wrt's Switch Config GUI does not support it, and there is an earlier thread with discussion and GUI mockups on how to enable it - thread is somewhat old, not sure if there was any folloup.