Wuttier DD-WRT Novice
Joined: 26 Jun 2019 Posts: 3
|
Posted: Wed Jul 10, 2019 17:38 Post subject: LF Startup Script tweak to auto Release/Renew DHCP |
|
I had to power down my R7000 router to rearrange some wires. When I put the power back on, it should boot up the startup script with tweaks to my VLAN so I can make connection to my ISP. However, it doesn't automatically get the connection back. The way I fix it is to Release and Renew my DHCP, and then "Apply settings" at Setup->Networking.
Now, I'm kinda looking into automating it, but I'm a bit scared and a bit of noob to screw up my nicely configured router (so far). I do have a backup for restoring any settings but I'd rather automate it. And when I'm out of town, my family shouldn't need to do the above workaround.
I've checked the https://wiki.dd-wrt.com/wiki/index.php/Useful_Scripts at the Automatic Connection Repair, and read somewhere that this particular problem CAN happen, but so far I didn't find a solution.
Any suggestions or search terms would be helpful and appreciated.
My Start up script:
!/bin/sh
echo "" > /proc/switch/eth0/vlan/0/ports
echo "" > /proc/switch/eth0/vlan/2/ports
echo "1 2 3 4 5t*" > /proc/switch/eth0/vlan/1/ports
echo "0t 5t" > /proc/switch/eth0/vlan/300/ports
/sbin/ifconfig vlan2 down
/sbin/vconfig rem vlan2
/sbin/vconfig add eth0 300
/sbin/ifconfig vlan300 up
/sbin/ifconfig vlan300 txqueuelen 0 |
|