Story:
I have 3 Asus routers as my home network set in AIMesh configuration. The ISP is Hotwire fiber into garage low-voltage panel, and then the RT-AX88U (with 10 LAN ports to connect the wired connections in the house, as well as to the other 2 RT-AX56U's) serves as my Main Router.
As you guys know, there is a known issue with Asus Routers constantly disconnecting from internet and only reboot fixes this.... mainly due to DHCP query to ISP modem, which I've already tried to play with Ad Naseum (changed to "normal", then to "Continuous"... getting a static IP.... you name it
). Several threads about this including:
www.snbforums.com
and I'm in the same boat as this guy:
www.snbforums.com
ANYWAYS.... I don't want to install Merlin or DDWRT or anything, just keep the darn thing stock, or else pull everything out and just go with Unifi or something. But before doing that, I went ahead and did a modified simpler version of this technique which supposedly is a good alternative to automatically reboot when the WAN connnection is disrupted:
github.com
Here is what I've done:
Wrote a very basic Script (internetcheck.sh) to check WAN connection:
and saved it to
/jffs/scripts/
Next, I created the init-start script to add it to the CRON jobs, and to run it every 5 mins:
and also saved it there in the same directory.
Changed the permissions and all looks good:
-rwxr-xr-x 1 ShervinA root 79 May 6 12:13 init-start
-rwxr-xr-x 1 ShervinA root 359 May 7 12:18 internetcheck.sh
Question 1: Does the init-start script look correct to run the check script every 5 mins?
The system log shows that it's indeed trying:
Since there is no direct way to hook into a bootup script, But there is an option to run a script every time a USB drive is mounted, which happens on boot, I added this:
Question 2: Isn't this supposed to make it load the init-start script at start up once the Router goes thru it's phase of mounting the USB drive???
When I manually add the job, it shows up fine:
ShervinAsusRouter@RT-AX88U-0598:/# cru l
*/5 * * * * /jffs/scripts/internetcheck.sh #internetcheck.sh#
but after a reboot, the script doesn't automatically show up!
ShervinAsusRouter@RT-AX88U-0598:/# cru l
ShervinAsusRouter@RT-AX88U-0598:/#
WHAT AM I MISSING???
I have 3 Asus routers as my home network set in AIMesh configuration. The ISP is Hotwire fiber into garage low-voltage panel, and then the RT-AX88U (with 10 LAN ports to connect the wired connections in the house, as well as to the other 2 RT-AX56U's) serves as my Main Router.
As you guys know, there is a known issue with Asus Routers constantly disconnecting from internet and only reboot fixes this.... mainly due to DHCP query to ISP modem, which I've already tried to play with Ad Naseum (changed to "normal", then to "Continuous"... getting a static IP.... you name it


ASUS firmware DHCP "Continuous Mode" potential fix for "ISP's DHCP did not function properly"
FYI - creating this thread because I can't find this issue/solution concisely documented anywhere else, please add any info below. I can see a number Australians on the new NBN (a government run, centrally managed ISP 'platform') are experiencing issues with DHCP and asus routers in particular...


ASUS firmware DHCP "Continuous Mode" potential fix for "ISP's DHCP did not function properly"
Agree. In the past the method of turning off and on wan has worked rarely. Rebooting router is usually needed. Hopefully 386 firmware line will be better. Well bad news... I use 386 official now, so can't say much yet(installed it today), but in beta 386 I had those issues also.

ANYWAYS.... I don't want to install Merlin or DDWRT or anything, just keep the darn thing stock, or else pull everything out and just go with Unifi or something. But before doing that, I went ahead and did a modified simpler version of this technique which supposedly is a good alternative to automatically reboot when the WAN connnection is disrupted:
Restart WAN interface when internet is down
Third party firmware for Asus routers (newer codebase) - RMerl/asuswrt-merlin.ng
Here is what I've done:
Wrote a very basic Script (internetcheck.sh) to check WAN connection:
Code:
#!/bin/sh
logger -s CHECKING INTERNET CONNECTIION VIA SHERVIN SCRIPT
ping -c5 google.com
if [ $? -eq 0 ]; then
date +"%Y-%m-%d %r - internet connection UP"
logger -s Internet connection UP
else
date +"%Y-%m-%d %r - internet connection DOWN ... REBOOT" >> /jffs/scripts/check.log
logger -s Internet connection DOWN - REBOOT
reboot
fi
/jffs/scripts/
Next, I created the init-start script to add it to the CRON jobs, and to run it every 5 mins:
Code:
#!/bin/sh
cru a internetcheck.sh "*/5 * * * * /jffs/scripts/internetcheck.sh"
Changed the permissions and all looks good:
-rwxr-xr-x 1 ShervinA root 79 May 6 12:13 init-start
-rwxr-xr-x 1 ShervinA root 359 May 7 12:18 internetcheck.sh
Question 1: Does the init-start script look correct to run the check script every 5 mins?
The system log shows that it's indeed trying:
Code:
May 7 12:35:00 ShervinAsusRouter: CHECKING INTERNET CONNECTIION VIA SHERVIN SCRIPT
May 7 12:35:04 ShervinAsusRouter: Internet connection UP
May 7 12:40:00 ShervinAsusRouter: CHECKING INTERNET CONNECTIION VIA SHERVIN SCRIPT
May 7 12:40:04 ShervinAsusRouter: Internet connection UP
May 7 12:45:00 ShervinAsusRouter: CHECKING INTERNET CONNECTIION VIA SHERVIN SCRIPT
May 7 12:45:04 ShervinAsusRouter: Internet connection UP
Since there is no direct way to hook into a bootup script, But there is an option to run a script every time a USB drive is mounted, which happens on boot, I added this:
Code:
nvram set script_usbmount="/jffs/scripts/init-start"
nvram commit
Question 2: Isn't this supposed to make it load the init-start script at start up once the Router goes thru it's phase of mounting the USB drive???
When I manually add the job, it shows up fine:
ShervinAsusRouter@RT-AX88U-0598:/# cru l
*/5 * * * * /jffs/scripts/internetcheck.sh #internetcheck.sh#
but after a reboot, the script doesn't automatically show up!

ShervinAsusRouter@RT-AX88U-0598:/# cru l
ShervinAsusRouter@RT-AX88U-0598:/#
WHAT AM I MISSING???