I don't see it log creating the Routing Table default route for Table 200 or IP Rule for Target IP 1.1.1.1 for WAN1, it checks WAN1 for a null / 0.0.0.0 IP and then immediately goes to pinging it. Run these commands and verify that those prereqs are in place.It's in State 2 according to logs which is Connected and Dual WAN Mode will show this as "Hot-Standby" as opposed to "Cold-Standby" when it is the Secondary WAN and not Primary, that is correct. The problem is the inability to ping 1.1.1.1 out of WAN1.
ip route show default table 200
ip rule list
That's while WAN Failover script is running? It logged saying it created the IP Rule for 8.8.8.8 but I don't see it in there, it logged it successfully created it and didn't have an error. The script will delete the rules when it is terminated/killed.Here is the output:
Code:admin@RT-AC86U-9AD0:/tmp/home/root# ip route show default table 200 admin@RT-AC86U-9AD0:/tmp/home/root# ip rule list 0: from all lookup local 32766: from all lookup main 32767: from all lookup default
admin@RT-AC86U-9AD0:/tmp/home/root# ip route show default table 200
default via 192.168.8.1 dev eth7
admin@RT-AC86U-9AD0:/tmp/home/root# ip rule list
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
admin@RT-AC86U-9AD0:/tmp/home/root#
admin@RT-AC86U-9AD0:/tmp/home/root# ip route show default table 200
default via 192.168.8.1 dev eth7
admin@RT-AC86U-9AD0:/tmp/home/root# ip rule list
0: from all lookup local
100: from all to 8.8.8.8 iif lo oif ppp0 lookup wan0
100: from all to 9.9.9.9 iif lo oif eth7 lookup wan1
32766: from all lookup main
32767: from all lookup default
admin@RT-AC86U-9AD0:/tmp/home/root#
Ok try this, add this IP Rule manually and see if you can ping out of WAN1.Sorry, no. I run these commands after I uninstalled the script.
Now, I re-installed the latest beta and run these commands again, here is the output:
Code:admin@RT-AC86U-9AD0:/tmp/home/root# ip route show default table 200 default via 192.168.8.1 dev eth7 admin@RT-AC86U-9AD0:/tmp/home/root# ip rule list 0: from all lookup local 32766: from all lookup main 32767: from all lookup default admin@RT-AC86U-9AD0:/tmp/home/root# admin@RT-AC86U-9AD0:/tmp/home/root# ip route show default table 200 default via 192.168.8.1 dev eth7 admin@RT-AC86U-9AD0:/tmp/home/root# ip rule list 0: from all lookup local 100: from all to 8.8.8.8 iif lo oif ppp0 lookup wan0 100: from all to 9.9.9.9 iif lo oif eth7 lookup wan1 32766: from all lookup main 32767: from all lookup default admin@RT-AC86U-9AD0:/tmp/home/root#
ip rule add from all iif lo to 9.9.9.9 lookup wan1 priority 100
ping -I eth7 9.9.9.9
ip rule del from all iif lo to 9.9.9.9 lookup wan1 priority 100
admin@RT-AC86U-9AD0:/tmp/home/root# ip rule add from all iif lo to 9.9.9.9 lookup wan1 priority 100
admin@RT-AC86U-9AD0:/tmp/home/root# ping -I eth7 9.9.9.9
PING 9.9.9.9 (9.9.9.9): 56 data bytes
64 bytes from 9.9.9.9: seq=2 ttl=60 time=38.196 ms
64 bytes from 9.9.9.9: seq=3 ttl=60 time=48.198 ms
64 bytes from 9.9.9.9: seq=4 ttl=60 time=48.153 ms
64 bytes from 9.9.9.9: seq=5 ttl=60 time=58.189 ms
64 bytes from 9.9.9.9: seq=6 ttl=60 time=58.180 ms
64 bytes from 9.9.9.9: seq=7 ttl=60 time=48.174 ms
64 bytes from 9.9.9.9: seq=8 ttl=60 time=45.188 ms
64 bytes from 9.9.9.9: seq=9 ttl=60 time=38.179 ms
64 bytes from 9.9.9.9: seq=10 ttl=60 time=48.202 ms
64 bytes from 9.9.9.9: seq=11 ttl=60 time=57.926 ms
^C
--- 9.9.9.9 ping statistics ---
12 packets transmitted, 10 packets received, 16% packet loss
round-trip min/avg/max = 38.179/48.858/58.189 ms
admin@RT-AC86U-9AD0:/tmp/home/root# ip rule del from all iif lo to 9.9.9.9 lookup wan1 priority 100
Does it still ping after deleting the test rule?Here is the output while the script was running:
Code:admin@RT-AC86U-9AD0:/tmp/home/root# ip rule add from all iif lo to 9.9.9.9 lookup wan1 priority 100 admin@RT-AC86U-9AD0:/tmp/home/root# ping -I eth7 9.9.9.9 PING 9.9.9.9 (9.9.9.9): 56 data bytes 64 bytes from 9.9.9.9: seq=2 ttl=60 time=38.196 ms 64 bytes from 9.9.9.9: seq=3 ttl=60 time=48.198 ms 64 bytes from 9.9.9.9: seq=4 ttl=60 time=48.153 ms 64 bytes from 9.9.9.9: seq=5 ttl=60 time=58.189 ms 64 bytes from 9.9.9.9: seq=6 ttl=60 time=58.180 ms 64 bytes from 9.9.9.9: seq=7 ttl=60 time=48.174 ms 64 bytes from 9.9.9.9: seq=8 ttl=60 time=45.188 ms 64 bytes from 9.9.9.9: seq=9 ttl=60 time=38.179 ms 64 bytes from 9.9.9.9: seq=10 ttl=60 time=48.202 ms 64 bytes from 9.9.9.9: seq=11 ttl=60 time=57.926 ms ^C --- 9.9.9.9 ping statistics --- 12 packets transmitted, 10 packets received, 16% packet loss round-trip min/avg/max = 38.179/48.858/58.189 ms admin@RT-AC86U-9AD0:/tmp/home/root# ip rule del from all iif lo to 9.9.9.9 lookup wan1 priority 100
That's strange, what is your PACKETSIZE, PINGCOUNT, and PINGTIMEOUT set to? If it isn't set PACKETSIZE to default of 56 and PINGCOUNT maybe 10?Yes.
Read my edit to that comment and that means it's default 56.I don't know my PACKETSIZE.
During script install, I chose PINGCOUNT=3, PINGTIMEOUT=1
The Double NAT shouldn't be an issue but the MTU you need to make sure you have it specified for that WAN Interface.It's not working, regardless of which target IP adress I chose.
Another, maybe useful information. When I manually switch to WAN1, my router does not get a public WAN IP. I think the LTE USB stick is getting a public WAN IP and my router a local 192.168.x.x IP. Does this help maybe?
admin@RT-AC86U-9AD0:/tmp/home/root# /usr/sbin/curl -s "https://raw.githubusercontent.com/Ranger802004/asusmerlin/main/wan-failover_v1.5.6-beta14.sh" -o "/jffs/scripts/wan-failover.sh" && chmod 755 /jffs/scripts/wan-failover.sh && sh /jff
s/scripts/wan-failover.sh install
wan-failover.sh - Install Mode
Press any key to continue to install...Administration > System > Enable JFFS custom scripts and configs is enabled...
Creating /jffs/configs/wan-failover.conf...
/jffs/configs/wan-failover.conf created.
Setting Custom Variables...
***WAN Target IP Addresses will be routed via WAN Gateway dev WAN Interface***
Configure WAN0 Target IP Address - Will be routed via 0.0.0.0 dev eth7: 8.8.8.8
Configure WAN1 Target IP Address - Will be routed via 88.116.190.96 dev ppp1: 9.9.9.9
Configure Ping Count - This is how many consecutive times a ping will fail before a WAN connection is considered disconnected: 3
Configure Ping Timeout - Value is in seconds: 1
Configure WAN0 QoS Download Bandwidth - Value is in Mbps: 30
Configure WAN1 QoS Download Bandwidth - Value is in Mbps: 30
Configure WAN0 QoS Upload Bandwidth - Value is in Mbps: 20
Configure WAN1 QoS Upload Bandwidth - Value is in Mbps: 20
Adding Custom Settings to /jffs/configs/wan-failover.conf...
Custom Variables added to /jffs/configs/wan-failover.conf.
Creating Wan-Event script...
Wan-Event script already exists...
Adding wan-failover.sh to Wan-Event...
wan-failover.sh added to Wan-Event.
Creating /jffs/configs/profile.add...
/jffs/configs/profile.add already exists...
wan-failover.sh - Install: Creating Alias for /jffs/scripts/wan-failover.sh as wan-failover...
wan-failover.sh - Install: Created Alias for /jffs/scripts/wan-failover.sh as wan-failover...
admin@RT-AC86U-9AD0:/tmp/home/root# wan-failover.sh: Cron - Creating Cron Job
wan-failover.sh: Cron - Created Cron Job
Looks like it is staying in Cold State. Try issuing it a restart command.I think the MTU is not the problem.
Another approach, I just switched my primary WAN to USB and secondary WAN to WAN.
View attachment 43508
And tried to install the latest beta:
Code:admin@RT-AC86U-9AD0:/tmp/home/root# /usr/sbin/curl -s "https://raw.githubusercontent.com/Ranger802004/asusmerlin/main/wan-failover_v1.5.6-beta14.sh" -o "/jffs/scripts/wan-failover.sh" && chmod 755 /jffs/scripts/wan-failover.sh && sh /jff s/scripts/wan-failover.sh install wan-failover.sh - Install Mode Press any key to continue to install...Administration > System > Enable JFFS custom scripts and configs is enabled... Creating /jffs/configs/wan-failover.conf... /jffs/configs/wan-failover.conf created. Setting Custom Variables... ***WAN Target IP Addresses will be routed via WAN Gateway dev WAN Interface*** Configure WAN0 Target IP Address - Will be routed via 0.0.0.0 dev eth7: 8.8.8.8 Configure WAN1 Target IP Address - Will be routed via 88.116.190.96 dev ppp1: 9.9.9.9 Configure Ping Count - This is how many consecutive times a ping will fail before a WAN connection is considered disconnected: 3 Configure Ping Timeout - Value is in seconds: 1 Configure WAN0 QoS Download Bandwidth - Value is in Mbps: 30 Configure WAN1 QoS Download Bandwidth - Value is in Mbps: 30 Configure WAN0 QoS Upload Bandwidth - Value is in Mbps: 20 Configure WAN1 QoS Upload Bandwidth - Value is in Mbps: 20 Adding Custom Settings to /jffs/configs/wan-failover.conf... Custom Variables added to /jffs/configs/wan-failover.conf. Creating Wan-Event script... Wan-Event script already exists... Adding wan-failover.sh to Wan-Event... wan-failover.sh added to Wan-Event. Creating /jffs/configs/profile.add... /jffs/configs/profile.add already exists... wan-failover.sh - Install: Creating Alias for /jffs/scripts/wan-failover.sh as wan-failover... wan-failover.sh - Install: Created Alias for /jffs/scripts/wan-failover.sh as wan-failover... admin@RT-AC86U-9AD0:/tmp/home/root# wan-failover.sh: Cron - Creating Cron Job wan-failover.sh: Cron - Created Cron Job
I noticed 0.0.0.0 for WAN0.
Why is that?
service "restart_wan_if 0"
Maybe not for this particular issue but you will 100% have connection issues if you don't specify MTU for that interface.I think the MTU is not the problem.
Another approach, I just switched my primary WAN to USB and secondary WAN to WAN.
View attachment 43508
And tried to install the latest beta:
Code:admin@RT-AC86U-9AD0:/tmp/home/root# /usr/sbin/curl -s "https://raw.githubusercontent.com/Ranger802004/asusmerlin/main/wan-failover_v1.5.6-beta14.sh" -o "/jffs/scripts/wan-failover.sh" && chmod 755 /jffs/scripts/wan-failover.sh && sh /jff s/scripts/wan-failover.sh install wan-failover.sh - Install Mode Press any key to continue to install...Administration > System > Enable JFFS custom scripts and configs is enabled... Creating /jffs/configs/wan-failover.conf... /jffs/configs/wan-failover.conf created. Setting Custom Variables... ***WAN Target IP Addresses will be routed via WAN Gateway dev WAN Interface*** Configure WAN0 Target IP Address - Will be routed via 0.0.0.0 dev eth7: 8.8.8.8 Configure WAN1 Target IP Address - Will be routed via 88.116.190.96 dev ppp1: 9.9.9.9 Configure Ping Count - This is how many consecutive times a ping will fail before a WAN connection is considered disconnected: 3 Configure Ping Timeout - Value is in seconds: 1 Configure WAN0 QoS Download Bandwidth - Value is in Mbps: 30 Configure WAN1 QoS Download Bandwidth - Value is in Mbps: 30 Configure WAN0 QoS Upload Bandwidth - Value is in Mbps: 20 Configure WAN1 QoS Upload Bandwidth - Value is in Mbps: 20 Adding Custom Settings to /jffs/configs/wan-failover.conf... Custom Variables added to /jffs/configs/wan-failover.conf. Creating Wan-Event script... Wan-Event script already exists... Adding wan-failover.sh to Wan-Event... wan-failover.sh added to Wan-Event. Creating /jffs/configs/profile.add... /jffs/configs/profile.add already exists... wan-failover.sh - Install: Creating Alias for /jffs/scripts/wan-failover.sh as wan-failover... wan-failover.sh - Install: Created Alias for /jffs/scripts/wan-failover.sh as wan-failover... admin@RT-AC86U-9AD0:/tmp/home/root# wan-failover.sh: Cron - Creating Cron Job wan-failover.sh: Cron - Created Cron Job
I noticed 0.0.0.0 for WAN0.
Why is that?
Yea that is normal, the router's firmware boots with WAN1 as Primary and uses failback to switch over....same thing my script does except it can't determine if your WAN0 is properly working because the router can't ping out of your USB Modem. Try adjusting PINGTIMEOUT to 10 and test please.OK, will do, but have a look at that:
As I said I switched to my LTE USB stick as my primary wan and my regular ISP to secondary. I tried to install the latest beta:
Aug 13 17:12:28 wan-failover.sh: Debug - Script Mode: installAug 13 17:12:28 w - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.pastebin.com
The script says, I'm not connected to WAN0, but I am.
- Aug 13 17:13:00 wan-failover.sh: Debug - Default Route: default via 88.116.190.96 dev ppp1
- Aug 13 17:13:00 wan-failover.sh: Debug - WAN1 Primary Status: 1
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!