What's new

WANFailover Dual WAN Failover Script

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

It looks like both of your ping tests are going to 100% packet loss before it even gets to the failover monitoring. Yea the script will mark those as disconnected and go to a disabled state until they are no longer disconnected. Can you manually ping? If so how long does it take to get a response What is your ping timeout setting?
I cant ping 8.8.4.4 period from anything right now, no matter what interface, or from any computer? but everything else, like 8.8.8.8 works fine. I thought it might be down but someone said they can ping it fine. I have no idea whats going on now.. I changed wan1target to 8.8.8.8 also. rebooted router, pinged 8.8.8.8 fine, started wan-failover.sh.. can no longer ping 8.8.8.8 from anywhere..
This is using 1.4.1 which worked fine.. i definitely need to reset

Code:
admin@RT-AX86U-D7D0:/tmp/home/root# ping 8.8.4.4
PING 8.8.4.4 (8.8.4.4): 56 data bytes
^C
--- 8.8.4.4 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

admin@RT-AX86U-D7D0:/tmp/home/root# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=60 time=104.095 ms
64 bytes from 8.8.8.8: seq=1 ttl=60 time=76.006 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 76.006/90.050/104.095 ms

admin@RT-AX86U-D7D0:/tmp/home/root# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=0 ttl=58 time=84.059 ms
 
Last edited:
I cant ping 8.8.4.4 period from anything right now, no matter what interface, or from any computer? but everything else, like 8.8.8.8 works fine. I thought it might be down but someone said they can ping it fine. I have no idea whats going on now.. I changed wan1target to 8.8.8.8 also. rebooted router, pinged 8.8.8.8 fine, started wan-failover.sh.. can no longer ping 8.8.8.8 from anywhere..
This is using 1.4.1 which worked fine.. i definitely need to reset

Code:
admin@RT-AX86U-D7D0:/tmp/home/root# ping 8.8.4.4
PING 8.8.4.4 (8.8.4.4): 56 data bytes
^C
--- 8.8.4.4 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

admin@RT-AX86U-D7D0:/tmp/home/root# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=60 time=104.095 ms
64 bytes from 8.8.8.8: seq=1 ttl=60 time=76.006 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 76.006/90.050/104.095 ms

admin@RT-AX86U-D7D0:/tmp/home/root# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=0 ttl=58 time=84.059 ms
Does it stop working after it creates the routes? If so screenshot the routes and then try manually deleting the routes it created and see if they start pinging again.
 
Does it stop working after it creates the routes? If so screenshot the routes and then try manually deleting the routes it created and see if they start pinging again.
Yes, and it seems to be whatever WAN1TARGET uses, WAN0 seems fine. What route command to use? this? But really i just need to reset, this was all working saturday fine, and i havent touched it.
I noticed another small issue, that spdmerlin didnt come up once on boot.

Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         100.64.0.1      0.0.0.0         UG    0      0        0 eth0
1.1.1.1         100.64.0.1      255.255.255.255 UGH   1      0        0 eth0
8.8.4.4         192.168.10.1    255.255.255.255 UGH   0      0        0 eth5
8.8.8.8         100.64.0.1      255.255.255.255 UGH   1      0        0 eth0
34.120.255.244  *               255.255.255.255 UH    0      0        0 eth0
100.64.0.0      *               255.192.0.0     U     0      0        0 eth0
100.64.0.1      *               255.255.255.255 UH    0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
192.168.10.0    *               255.255.255.0   U     0      0        0 eth5
192.168.50.0    *               255.255.255.0   U     0      0        0 br0
192.168.100.1   *               255.255.255.255 UH    0      0        0 eth0
239.0.0.0       *               255.0.0.0       U     0      0        0 br0
Code:
May 31 13:17:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 13:17:00 wan-failover.sh: WAN Status - Route already exists for 8.8.8.8 via 100.64.0.1 dev eth0
May 31 13:17:05 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 13:17:05 wan-failover.sh: WAN Status - wan1 enabled
May 31 13:17:05 wan-failover.sh: WAN Status - Creating route 8.8.4.4 via 192.168.10.1 dev eth5
May 31 13:17:05 wan-failover.sh: WAN Status - Created route 8.8.4.4 via 192.168.10.1 dev eth5
May 31 13:17:10 wan-failover.sh: WAN Status - wan1 has 100% packet loss ***Verify 8.8.4.4 is a valid server for ICMP Echo Requests***
May 31 13:17:10 wan-failover.sh: WAN0 Active - Verifying WAN0
May 31 13:17:10 wan-failover.sh: WAN0 Failover Monitor - Monitoring WAN0 via 8.8.8.8 for Failure
 
Last edited:
Yes, and it seems to be whatever WAN1TARGET uses, WAN0 seems fine. What route command to use? this?
Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         100.64.0.1      0.0.0.0         UG    0      0        0 eth0
1.1.1.1         100.64.0.1      255.255.255.255 UGH   1      0        0 eth0
8.8.4.4         192.168.10.1    255.255.255.255 UGH   0      0        0 eth5
8.8.8.8         100.64.0.1      255.255.255.255 UGH   1      0        0 eth0
34.120.255.244  *               255.255.255.255 UH    0      0        0 eth0
100.64.0.0      *               255.192.0.0     U     0      0        0 eth0
100.64.0.1      *               255.255.255.255 UH    0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
192.168.10.0    *               255.255.255.0   U     0      0        0 eth5
192.168.50.0    *               255.255.255.0   U     0      0        0 br0
192.168.100.1   *               255.255.255.255 UH    0      0        0 eth0
239.0.0.0       *               255.0.0.0       U     0      0        0 br0
Code:
May 31 13:17:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 13:17:00 wan-failover.sh: WAN Status - Route already exists for 8.8.8.8 via 100.64.0.1 dev eth0
May 31 13:17:05 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 13:17:05 wan-failover.sh: WAN Status - wan1 enabled
May 31 13:17:05 wan-failover.sh: WAN Status - Creating route 8.8.4.4 via 192.168.10.1 dev eth5
May 31 13:17:05 wan-failover.sh: WAN Status - Created route 8.8.4.4 via 192.168.10.1 dev eth5
May 31 13:17:10 wan-failover.sh: WAN Status - wan1 has 100% packet loss ***Verify 8.8.4.4 is a valid server for ICMP Echo Requests***
May 31 13:17:10 wan-failover.sh: WAN0 Active - Verifying WAN0
May 31 13:17:10 wan-failover.sh: WAN0 Failover Monitor - Monitoring WAN0 via 8.8.8.8 for Failure
Same except it is configured for your Secondary WAN, it appears to create the route command but it seems nothing is able to ping out of your Secondary WAN perhaps? Unplug your primary and see if you are able to ping anything from it excluding your targets, they are hard coded to their respective interface. Maybe 1.1.1.1 or etc. Is eth5 the proper interface for your Secondary WAN?
 
Same except it is configured for your Secondary WAN, it appears to create the route command but it seems nothing is able to ping out of your Secondary WAN perhaps? Unplug your primary and see if you are able to ping anything from it excluding your targets, they are hard coded to their respective interface. Maybe 1.1.1.1 or etc. Is eth5 the proper interface for your Secondary WAN?
Ok. sorry for this big thread.. I havent touched the modem since saturday, when i even mentioned it was going back and forth between primary and secondary perfectly.. Just noticed this morning trying out 1.4.3.. But I also had a few weird issues, One time the router booted up, showed the primary in hot-standby, and secondary disconnected.. Then the spdmerlin tab dissapeared.. rebooted, and both those were fine.. Anyways, I just did a quick factory reset, cp'ed the same scripts and configs back to jffs and its all working fine. Wth
Guess I need to try 1.4.3 again. So the only issue through all those messages is secondary still has to be made hot running service restart_wan_if 1
 
Ok. sorry for this big thread.. I havent touched the modem since saturday, when i even mentioned it was going back and forth between primary and secondary perfectly.. Just noticed this morning trying out 1.4.3.. But I also had a few weird issues, One time the router booted up, showed the primary in hot-standby, and secondary disconnected.. Then the spdmerlin tab dissapeared.. rebooted, and both those were fine.. Anyways, I just did a quick factory reset, cp'ed the same scripts and configs back to jffs and its all working fine. Wth
Guess I need to try 1.4.3 again. So the only issue through all those messages is secondary still has to be made hot running service restart_wan_if 1
Instead of restarting the interface try the following command:
Code:
nvram set wan1_state_t=2
 
Instead of restarting the interface try the following command:
Code:
nvram set wan1_state_t=2
It was set at 4, i changed to 2,which didnt do anything, but then when i restarted script it went hot
 
Sorry for the Google translation. Faced with such a problem. After restarting the router, wan1 starts in cold mode and the script does not enter wan0 monitor mode, but constantly spams repeated messages.

Code:
May 31 22:36:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:36:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:36:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:36:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:36:04 wan-failover.sh: WAN Status - Creating route 77.88.8.1 via 10.100.0.1 dev eth2
May 31 22:37:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:37:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:37:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:37:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:37:04 wan-failover.sh: WAN Status - Creating route 77.88.8.1 via 10.100.0.1 dev eth2
May 31 22:38:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:38:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:38:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:38:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:38:04 wan-failover.sh: WAN Status - Creating route 77.88.8.1 via 10.100.0.1 dev eth2
...........................................................................

So far, to solve this problem, we have to make a short interval to activate the second line of asus dualwan:
Detect IntervalEvery 3 seconds
Failover Trigger ConditionWhen the current WAN fails 4 continuous times, failover to Secondary WAN

Then the router is loaded with wan1 already active, then the script switches to wan0 and everything works as it should, wan 1 switches to Hot-Standby mode.
It seems to me that this is not quite the right solution to the problem. But that's how it seems to work:

Code:
May 31 22:43:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:43:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:43:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:43:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:43:04 wan-failover.sh: WAN Status - Route already exists for 77.88.8.1 via 10.100.0.1 dev eth2
May 31 22:43:08 wan-failover.sh: WAN Status - wan1 has 0% packet loss
May 31 22:43:08 wan-failover.sh: WAN0 Active - Verifying WAN0
May 31 22:43:08 wan-failover.sh: WAN0 Failover Monitor - Monitoring WAN0 via 77.88.8.8 for Failure

my wan-failover.conf
Code:
WAN0TARGET=77.88.8.8
WAN1TARGET=77.88.8.1
PINGCOUNT=5
PINGTIMEOUT=3
WANDISABLEDSLEEPTIMER=10
WAN0_QOS_IBW=1024000
WAN1_QOS_IBW=51200
WAN0_QOS_OBW=1024000
WAN1_QOS_OBW=51200
WAN0_QOS_OVERHEAD=0
WAN1_QOS_OVERHEAD=0
WAN0_QOS_ATM=0
WAN1_QOS_ATM=0
PACKETLOSSLOGGING=1
 
Last edited:
Sorry for the Google translation. Faced with such a problem. After restarting the router, wan1 starts in cold mode and the script does not enter wan0 monitor mode, but constantly spams repeated messages.

Code:
May 31 22:36:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:36:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:36:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:36:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:36:04 wan-failover.sh: WAN Status - Creating route 77.88.8.1 via 10.100.0.1 dev eth2
May 31 22:37:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:37:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:37:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:37:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:37:04 wan-failover.sh: WAN Status - Creating route 77.88.8.1 via 10.100.0.1 dev eth2
May 31 22:38:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:38:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:38:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:38:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:38:04 wan-failover.sh: WAN Status - Creating route 77.88.8.1 via 10.100.0.1 dev eth2
...........................................................................

So far, to solve this problem, we have to make a short interval to activate the second line of asus dualwan:
Detect IntervalEvery 3 seconds
Failover Trigger ConditionWhen the current WAN fails 4 continuous times, failover to Secondary WAN

Then the router is loaded with wan1 already active, then the script switches to wan0 and everything works as it should, wan 1 switches to Hot-Standby mode.
It seems to me that this is not quite the right solution to the problem. But that's how it seems to work:

Code:
May 31 22:43:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:43:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:43:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:43:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:43:04 wan-failover.sh: WAN Status - Route already exists for 77.88.8.1 via 10.100.0.1 dev eth2
May 31 22:43:08 wan-failover.sh: WAN Status - wan1 has 0% packet loss
May 31 22:43:08 wan-failover.sh: WAN0 Active - Verifying WAN0
May 31 22:43:08 wan-failover.sh: WAN0 Failover Monitor - Monitoring WAN0 via 77.88.8.8 for Failure

my wan-failover.conf
Code:
WAN0TARGET=77.88.8.8
WAN1TARGET=77.88.8.1
PINGCOUNT=5
PINGTIMEOUT=3
WANDISABLEDSLEEPTIMER=10
WAN0_QOS_IBW=1024000
WAN1_QOS_IBW=51200
WAN0_QOS_OBW=1024000
WAN1_QOS_OBW=51200
WAN0_QOS_OVERHEAD=0
WAN1_QOS_OVERHEAD=0
WAN0_QOS_ATM=0
WAN1_QOS_ATM=0
PACKETLOSSLOGGING=1
Just sticking service "restart_wan_if=1" in like post-mount fixes it for me, isnt a big issue. I was just passing on to @Ranger802004 the script wasnt doing it
 
Just sticking service "restart_wan_if=1" in like post-mount fixes it for me,


for me, neither execute "nvram set wan1_state_t=2" nor adding service "restart_wan_if=1" to the post-mount service does not change the situation.
 
for me, neither execute "nvram set wan1_state_t=2" nor adding service "restart_wan_if=1" to the post-mount service does not change the situation.
weird, that some peoples just apparently come up hot.. while some of us its cold. If i use the builtin asus dualwan, it switches fine when cold.. Just takes a few seconds longer.
With the script it just wont work. Whats your router?
 
weird, that some peoples just apparently come up hot.. while some of us its cold. If i use the builtin asus dualwan, it switches fine when cold.. Just takes a few seconds longer.
With the script it just wont work. Whats your router?
Send me logs and output of all relevant nvram variables please when in this condition, it works for me and like @VIper_Rus said I do see where my wan1 goes hot first on a boot up and switches to wan0 but for me still works. I’m sure I can work on the logic some more for other conditions just need data to work with to build it.
 
Sorry for the Google translation. Faced with such a problem. After restarting the router, wan1 starts in cold mode and the script does not enter wan0 monitor mode, but constantly spams repeated messages.

Code:
May 31 22:36:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:36:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:36:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:36:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:36:04 wan-failover.sh: WAN Status - Creating route 77.88.8.1 via 10.100.0.1 dev eth2
May 31 22:37:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:37:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:37:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:37:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:37:04 wan-failover.sh: WAN Status - Creating route 77.88.8.1 via 10.100.0.1 dev eth2
May 31 22:38:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:38:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:38:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:38:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:38:04 wan-failover.sh: WAN Status - Creating route 77.88.8.1 via 10.100.0.1 dev eth2
...........................................................................

So far, to solve this problem, we have to make a short interval to activate the second line of asus dualwan:
Detect IntervalEvery 3 seconds
Failover Trigger ConditionWhen the current WAN fails 4 continuous times, failover to Secondary WAN

Then the router is loaded with wan1 already active, then the script switches to wan0 and everything works as it should, wan 1 switches to Hot-Standby mode.
It seems to me that this is not quite the right solution to the problem. But that's how it seems to work:

Code:
May 31 22:43:00 wan-failover.sh: WAN Status - wan0 enabled
May 31 22:43:00 wan-failover.sh: WAN Status - Route already exists for 77.88.8.8 via 45.31.73.254 dev eth0
May 31 22:43:04 wan-failover.sh: WAN Status - wan0 has 0% packet loss
May 31 22:43:04 wan-failover.sh: WAN Status - wan1 enabled
May 31 22:43:04 wan-failover.sh: WAN Status - Route already exists for 77.88.8.1 via 10.100.0.1 dev eth2
May 31 22:43:08 wan-failover.sh: WAN Status - wan1 has 0% packet loss
May 31 22:43:08 wan-failover.sh: WAN0 Active - Verifying WAN0
May 31 22:43:08 wan-failover.sh: WAN0 Failover Monitor - Monitoring WAN0 via 77.88.8.8 for Failure

my wan-failover.conf
Code:
WAN0TARGET=77.88.8.8
WAN1TARGET=77.88.8.1
PINGCOUNT=5
PINGTIMEOUT=3
WANDISABLEDSLEEPTIMER=10
WAN0_QOS_IBW=1024000
WAN1_QOS_IBW=51200
WAN0_QOS_OBW=1024000
WAN1_QOS_OBW=51200
WAN0_QOS_OVERHEAD=0
WAN1_QOS_OVERHEAD=0
WAN0_QOS_ATM=0
WAN1_QOS_ATM=0
PACKETLOSSLOGGING=1

I think I see the problem here, it is not able to create the route for wan1 because it is not hot, run the below command for me before and after you fix it with the ASUS failover checkbox. I’m confident we can resolve it with seeing what condition needs to be resolve once you send me the requested data.

Code:
nvram show | grep -e “wan1”
 
I think I see the problem here, it is not able to create the route for wan1 because it is not hot, run the below command for me before and after you fix it with the ASUS failover checkbox. I’m confident we can resolve it with seeing what condition needs to be resolve once you send me the requested data.

Code:
nvram show | grep -e “wan1”


Detect IntervalEvery 30seconds
Failover Trigger ConditionWhen the current WAN fails 4 continuous times, failover to Secondary WAN


after reboot Secondary WAN: Cold-Standby

Code:
link_wan1=1
switch_wan1prio=0
switch_wan1tagid=
wan1_6rd_ip4size=
wan1_6rd_prefix=
wan1_6rd_prefixlen=
wan1_6rd_router=
wan1_auth_x=
wan1_auxstate_t=0
wan1_clientid=
wan1_clientid_type=0
wan1_desc=
wan1_dhcp_qry=1
wan1_dhcpenable_x=1
wan1_dns=10.100.0.1
wan1_dns1_x=10.100.0.1
wan1_dns2_x=
wan1_dnsenable_x=1
wan1_enable=1
wan1_expires=86431
wan1_gateway=10.100.0.1
wan1_gateway_x=10.100.0.1
wan1_gw_ifname=eth2
wan1_gw_mac=8C:88:2B:СС:2E:2E
wan1_heartbeat_x=
wan1_hostname=
wan1_hwaddr=04:D4:CС:51:30:C9
wan1_hwaddr_x=
wan1_hwname=
wan1_ifname=eth2
wan1_ipaddr=10.100.0.2
wan1_ipaddr_x=10.100.0.2
wan1_is_usb_modem_ready=0
wan1_lease=86400
wan1_mroute=
wan1_mtu=1500
wan1_nat_x=1
wan1_netmask=255.255.255.0
wan1_netmask_x=255.255.255.0
wan1_phytype=
wan1_ppp_echo=1
wan1_ppp_echo_failure=10
wan1_ppp_echo_interval=6
wan1_ppp_phy=0
wan1_pppoe_ac=
wan1_pppoe_auth=
wan1_pppoe_hostuniq=
wan1_pppoe_idletime=0
wan1_pppoe_ifname=
wan1_pppoe_mru=1492
wan1_pppoe_mtu=1492
wan1_pppoe_options_x=
wan1_pppoe_passwd=
wan1_pppoe_relay=0
wan1_pppoe_service=
wan1_pppoe_username=
wan1_pptp_options_x=
wan1_primary=0
wan1_proto=dhcp
wan1_proto_t=
wan1_realip_ip=
wan1_realip_state=0
wan1_route=
wan1_sbstate_t=0
wan1_state_t=4
wan1_unit=1
wan1_upnp_enable=0
wan1_vendorid=
wan1_vpndhcp=1
wan1_wins=
wan1_xgateway=10.100.0.1
wan1_xipaddr=0.0.0.0
wan1_xnetmask=0.0.0.0

Detect IntervalEvery 3 seconds
Failover Trigger ConditionWhen the current WAN fails 4 continuous times, failover to Secondary WAN


after reboot Secondary WAN: Hot-Standby

Code:
link_wan1=1
switch_wan1prio=0
switch_wan1tagid=
wan1_6rd_ip4size=
wan1_6rd_prefix=
wan1_6rd_prefixlen=
wan1_6rd_router=
wan1_auth_x=
wan1_auxstate_t=0
wan1_clientid=
wan1_clientid_type=0
wan1_desc=
wan1_dhcp_qry=1
wan1_dhcpenable_x=1
wan1_dns=10.100.0.1
wan1_dns1_x=10.100.0.1
wan1_dns2_x=
wan1_dnsenable_x=1
wan1_enable=1
wan1_expires=86431
wan1_gateway=10.100.0.1
wan1_gateway_x=10.100.0.1
wan1_gw_ifname=eth2
wan1_gw_mac=8C:88:2B:СС:2E:2E
wan1_heartbeat_x=
wan1_hostname=
wan1_hwaddr=04:D4:CС:51:30:C9
wan1_hwaddr_x=
wan1_hwname=
wan1_ifname=eth2
wan1_ipaddr=10.100.0.2
wan1_ipaddr_x=10.100.0.2
wan1_is_usb_modem_ready=0
wan1_lease=86400
wan1_mroute=
wan1_mtu=1500
wan1_nat_x=1
wan1_netmask=255.255.255.0
wan1_netmask_x=255.255.255.0
wan1_phytype=
wan1_ppp_echo=1
wan1_ppp_echo_failure=10
wan1_ppp_echo_interval=6
wan1_ppp_phy=0
wan1_pppoe_ac=
wan1_pppoe_auth=
wan1_pppoe_hostuniq=
wan1_pppoe_idletime=0
wan1_pppoe_ifname=
wan1_pppoe_mru=1492
wan1_pppoe_mtu=1492
wan1_pppoe_options_x=
wan1_pppoe_passwd=
wan1_pppoe_relay=0
wan1_pppoe_service=
wan1_pppoe_username=
wan1_pptp_options_x=
wan1_primary=0
wan1_proto=dhcp
wan1_proto_t=dhcp
wan1_realip_ip=217.65.144.196
wan1_realip_state=2
wan1_route=
wan1_sbstate_t=0
wan1_state_t=2
wan1_unit=1
wan1_upnp_enable=0
wan1_vendorid=
wan1_vpndhcp=1
wan1_wins=
wan1_xgateway=10.100.0.1
wan1_xipaddr=0.0.0.0
wan1_xnetmask=0.0.0.0

I see few differences:
Code:
wan1_proto_t=
wan1_realip_ip=
wan1_realip_state=0
wan1_state_t=4

wan1_proto_t=dhcp
wan1_realip_ip=217.65.144.196
wan1_realip_state=2
wan1_state_t=2
 
Last edited:
Detect IntervalEvery 30seconds
Failover Trigger ConditionWhen the current WAN fails 4 continuous times, failover to Secondary WAN

after reboot Secondary WAN: Cold-Standby

Code:
link_wan1=1
switch_wan1prio=0
switch_wan1tagid=
wan1_6rd_ip4size=
wan1_6rd_prefix=
wan1_6rd_prefixlen=
wan1_6rd_router=
wan1_auth_x=
wan1_auxstate_t=0
wan1_clientid=
wan1_clientid_type=0
wan1_desc=
wan1_dhcp_qry=1
wan1_dhcpenable_x=1
wan1_dns=10.100.0.1
wan1_dns1_x=10.100.0.1
wan1_dns2_x=
wan1_dnsenable_x=1
wan1_enable=1
wan1_expires=86431
wan1_gateway=10.100.0.1
wan1_gateway_x=10.100.0.1
wan1_gw_ifname=eth2
wan1_gw_mac=8C:88:2B:СС:2E:2E
wan1_heartbeat_x=
wan1_hostname=
wan1_hwaddr=04:D4:CС:51:30:C9
wan1_hwaddr_x=
wan1_hwname=
wan1_ifname=eth2
wan1_ipaddr=10.100.0.2
wan1_ipaddr_x=10.100.0.2
wan1_is_usb_modem_ready=0
wan1_lease=86400
wan1_mroute=
wan1_mtu=1500
wan1_nat_x=1
wan1_netmask=255.255.255.0
wan1_netmask_x=255.255.255.0
wan1_phytype=
wan1_ppp_echo=1
wan1_ppp_echo_failure=10
wan1_ppp_echo_interval=6
wan1_ppp_phy=0
wan1_pppoe_ac=
wan1_pppoe_auth=
wan1_pppoe_hostuniq=
wan1_pppoe_idletime=0
wan1_pppoe_ifname=
wan1_pppoe_mru=1492
wan1_pppoe_mtu=1492
wan1_pppoe_options_x=
wan1_pppoe_passwd=
wan1_pppoe_relay=0
wan1_pppoe_service=
wan1_pppoe_username=
wan1_pptp_options_x=
wan1_primary=0
wan1_proto=dhcp
wan1_proto_t=
wan1_realip_ip=
wan1_realip_state=0
wan1_route=
wan1_sbstate_t=0
wan1_state_t=4
wan1_unit=1
wan1_upnp_enable=0
wan1_vendorid=
wan1_vpndhcp=1
wan1_wins=
wan1_xgateway=10.100.0.1
wan1_xipaddr=0.0.0.0
wan1_xnetmask=0.0.0.0

Detect IntervalEvery 3 seconds
Failover Trigger ConditionWhen the current WAN fails 4 continuous times, failover to Secondary WAN

after reboot Secondary WAN: Hot-Standby

Code:
link_wan1=1
switch_wan1prio=0
switch_wan1tagid=
wan1_6rd_ip4size=
wan1_6rd_prefix=
wan1_6rd_prefixlen=
wan1_6rd_router=
wan1_auth_x=
wan1_auxstate_t=0
wan1_clientid=
wan1_clientid_type=0
wan1_desc=
wan1_dhcp_qry=1
wan1_dhcpenable_x=1
wan1_dns=10.100.0.1
wan1_dns1_x=10.100.0.1
wan1_dns2_x=
wan1_dnsenable_x=1
wan1_enable=1
wan1_expires=86431
wan1_gateway=10.100.0.1
wan1_gateway_x=10.100.0.1
wan1_gw_ifname=eth2
wan1_gw_mac=8C:88:2B:СС:2E:2E
wan1_heartbeat_x=
wan1_hostname=
wan1_hwaddr=04:D4:CС:51:30:C9
wan1_hwaddr_x=
wan1_hwname=
wan1_ifname=eth2
wan1_ipaddr=10.100.0.2
wan1_ipaddr_x=10.100.0.2
wan1_is_usb_modem_ready=0
wan1_lease=86400
wan1_mroute=
wan1_mtu=1500
wan1_nat_x=1
wan1_netmask=255.255.255.0
wan1_netmask_x=255.255.255.0
wan1_phytype=
wan1_ppp_echo=1
wan1_ppp_echo_failure=10
wan1_ppp_echo_interval=6
wan1_ppp_phy=0
wan1_pppoe_ac=
wan1_pppoe_auth=
wan1_pppoe_hostuniq=
wan1_pppoe_idletime=0
wan1_pppoe_ifname=
wan1_pppoe_mru=1492
wan1_pppoe_mtu=1492
wan1_pppoe_options_x=
wan1_pppoe_passwd=
wan1_pppoe_relay=0
wan1_pppoe_service=
wan1_pppoe_username=
wan1_pptp_options_x=
wan1_primary=0
wan1_proto=dhcp
wan1_proto_t=dhcp
wan1_realip_ip=217.65.144.196
wan1_realip_state=2
wan1_route=
wan1_sbstate_t=0
wan1_state_t=2
wan1_unit=1
wan1_upnp_enable=0
wan1_vendorid=
wan1_vpndhcp=1
wan1_wins=
wan1_xgateway=10.100.0.1
wan1_xipaddr=0.0.0.0
wan1_xnetmask=0.0.0.0

Put your router back in the state where secondary is in cold standby, run my script and then after it gets in the broken loop run this command.
Code:
nvram set wan1_state_t=2 && service “restart_wan_if 1”
 
weird, that some peoples just apparently come up hot.. while some of us its cold. If i use the builtin asus dualwan, it switches fine when cold.. Just takes a few seconds longer.
With the script it just wont work. Whats your router?
I'm just worried that choosing a shorter response time for the stock asus automatic switch may cause problems in the future. Now everything works for me right now. An ax88 router and two ax86.
 
I'm just worried that choosing a shorter response time for the stock asus automatic switch may cause problems in the future. Now everything works for me right now. An ax88 router and two ax86.
I didnt use the stock stuff for long, but from what i could tell it was basically ok. What i didnt like was no notification of switching,etc
 
I didnt use the stock stuff for long, but from what i could tell it was basically ok. What i didnt like was no notification of switching,etc
The main problem with the stock config is the fallback condition is just looking an active Ethernet cable
 
The main problem with the stock config is the fallback condition is just looking an active Ethernet cable
Im sure you know it more then me, but when starlink would lose signal, it would switchover. And the basic router/ethernet connection was still up.
Why would it do ping monitoring to like google or microsoft if it just wanted a link?
 
Put your router back in the state where secondary is in cold standby, run my script and then after it gets in the broken loop run this command.
Code:
nvram set wan1_state_t=2 && service “restart_wan_if 1”
execute: nvram set wan1_state_t=2 && service “restart_wan_if=1”
The second WAN in the router's web interface became hot, but the script did not exit the loop.

off and on the second wan in the web interface and the script started working normally.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top