What's new

WANFailover Dual WAN Failover ***v2 Release***

  • 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!

In traces, you can see that wan-event script is called on router booting (i guess HW interface activation).
Wan-event script is called when the cable is disconnected (not in this test case), so i guess, permissions are correctly set ?!
rgds
 
In traces, you can see that wan-event script is called on router booting (i guess HW interface activation).
Wan-event script is called when the cable is disconnected (not in this test case), so i guess, permissions are correctly set ?!
rgds
Calling the script doesn't mean permissions are set it just means the command is being executed to run the script.
 
wan-event script permissions: -rwxrwxr-x

in this case, i have added addition logs when wan-event sript is called:

May 5 07:05:16 custom_script: Running /jffs/scripts/wan-event (args: 0 init)
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 0 init
May 5 07:05:17 custom_script: Running /jffs/scripts/wan-event (args: 0 connecting)
May 5 07:05:17 custom_script: Running /jffs/scripts/wan-event (args: 1 init)
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 0 connecting
May 5 07:05:17 custom_script: Running /jffs/scripts/wan-event (args: 1 connecting)
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 1 init
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 1 connecting

May 5 07:05:17 custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 0 disconnected
May 5 07:05:17 custom_script: Running /jffs/scripts/wan-event (args: 1 disconnected)
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 1 disconnected
 
wan-event script permissions: -rwxrwxr-x

in this case, i have added addition logs when wan-event sript is called:

May 5 07:05:16 custom_script: Running /jffs/scripts/wan-event (args: 0 init)
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 0 init
May 5 07:05:17 custom_script: Running /jffs/scripts/wan-event (args: 0 connecting)
May 5 07:05:17 custom_script: Running /jffs/scripts/wan-event (args: 1 init)
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 0 connecting
May 5 07:05:17 custom_script: Running /jffs/scripts/wan-event (args: 1 connecting)
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 1 init
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 1 connecting

May 5 07:05:17 custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 0 disconnected
May 5 07:05:17 custom_script: Running /jffs/scripts/wan-event (args: 1 disconnected)
May 5 07:05:17 nunu: MANU WAN-EVENT CALL - 1 disconnected
What are the contents of your wan-event script? Looks like they're being called properly.
 
this is call at router boot.

but if you check my traces (attached in a previous message), on wan-failover DISCONNECT state, there is (maybe 2 issues):
- WAN status is displayed as connected
- wan-event script not called....

Failure scenario starting here :
Dec 29 15:34:57 wan-failover: wan-failover is up to date - Version: v2.1.1-beta1
Dec 29 15:35:32 wan-failover: Packet Loss Detected - WAN0 Packet Loss: 50%
Dec 29 15:35:43 wan-failover: Failure Detected - WAN0 Packet Loss: 100%
Dec 29 15:35:43 wan-failover: Load Balance Monitor - Removing nexthop via 192.168.3.1 dev eth4 weight 9
Dec 29 15:35:43 wan-failover: Debug - Deleting Default Route
Dec 29 15:35:43 wan-failover: Debug - Adding nexthop via 192.168.2.1 dev eth0 weight 1
Dec 29 15:35:43 wan-failover: Load Balance Monitor - Removed nexthop via 192.168.3.1 dev eth4 weight 9
Dec 29 15:35:43 wan-failover: Debug - WAN0 Status: DISCONNECTED
Dec 29 15:35:43 wan-failover: Debug - WAN1 Status: CONNECTED
Dec 29 15:35:43 wan-failover: Debug - Function: failover
Dec 29 15:35:43 wan-failover: Debug - Function: switchdns
Dec 29 15:35:43 wan-failover: Debug - Setting parameters for wan0
 
this is call at router boot.

but if you check my traces (attached in a previous message), on wan-failover DISCONNECT state, there is (maybe 2 issues):
- WAN status is displayed as connected
- wan-event script not called....

Failure scenario starting here :
Oh your original messages were a little confusing so WAN Failover is running, have you verified your target IP for WAN0 is valid for that interface?
 
hi,
sorry ... my english can be confused :)

ips are valid:
  • 192.168.3.2 for WAN0
  • 192.168.3.1 for 4G router connected to WAN0
  • WAN0 Target: 8.8.8.8
1703925711793.png
 
maybe i was confused by wan-event script.

Which are the caller of this script ?

i have check in wan-failover script => it does not call wan-event ...
in fact, i thought that wan-event script was called on an event on the WAN .. but a ping timeout is not that kind of event ... a cable disconnection yes ...
an a ping timeout, maybe does not change the Status of a WAN (in amtm/wf/status) ?

regards
 
maybe i was confused by wan-event script.

Which are the caller of this script ?

i have check in wan-failover script => it does not call wan-event ...
in fact, i thought that wan-event script was called on an event on the WAN .. but a ping timeout is not that kind of event ... a cable disconnection yes ...
an a ping timeout, maybe does not change the Status of a WAN (in amtm/wf/status) ?

regards
wan-failover doesn’t call wan-event, it just uses it to launch initially. Also, you are getting 100% packet loss when trying to ping from WAN0 to 8.8.8.8, are you using 8.8.8.8 for anything else like a DNS Server, etc? Try another target IP for WAN0.
 
i think there is a misunderstood.

the 100% loss is normal as i have unplugged the sim card of my 4G router.

my "issue" is that, on 100% loss the WAN status of the wan0 is still displayed as connected (in wan-failover status)

I would like to know if the status connected is an HW status (i mean cable connected), or it means that internet access is OK ?
 
i think there is a misunderstood.

the 100% loss is normal as i have unplugged the sim card of my 4G router.

my "issue" is that, on 100% loss the WAN status of the wan0 is still displayed as connected (in wan-failover status)

I would like to know if the status connected is an HW status (i mean cable connected), or it means that internet access is OK ?
Send me a full debug log but I do know when you unplug the device it causes a lot of weird behavior on the router. It's not really designed to be "unplugged", what you could do is disable it within the GUI and then unplug it.
 
hi,
logs in the post here
regards
Ok, I see what you are saying, the Connected status in status console refers to physical connected state, not up and pinging successfully. I went through your logs and it looks like it worked fine and came back successfully so it appears everything is working for you.
 
ok,
thanks for your answer. This could made some confusion (connected but no internet access)

today 4G provider was down in the morning, and the router seems not have made things correctly as i hadn't access to internet though my adsl box.
Unfortunately i haven't traces because i had to make it work rapidly (remote work).

i will try to make more tests ...

i need to make the following test: reboot the router in dual wan load balancing with one of the WAN down at startup . The 4G provider was maybe down early in the morning, and the router had a schedule reboot after.
 
hello !
i made some tests.

set up:
- dual wan / load balancing
- WAN0: box 4G
- WAN1: box ADSL

initial state:
- WAN0 connected / no internet access
- WAN1 connected / internet access OK

I have notice that if the rooter reboot with WAN0 connected and no internet access :

- i do not have internet access at all (ping seems working from windows terminal to www.google.fr but not web access to same address ?!)

- wailfailover status took some minutes before being displayed and ping information takes time before being displayed.

1704314295913.png


If i plug the sim to get WAN0 with internet access (at 07:11), i get internet access through WAN0 and all seems working fine

if i unplug the SIM card again (at 21:33) (so no more internet access through WAN0), then it switchs to WAN1 without any problem.


Logs attached to the post

NB: i have made the test with WAN0 disconnected (BOX 4G power off), and this works fine. i have access to internet after a router reboot
 

Attachments

  • syslog (1).txt
    381.9 KB · Views: 13
hello,
i try to follow script execution but it is a huge script :)

i would like to know if the script is supposed to support starting in degraded condition ? (WAN0 Connected with loss at 100% & WAN 1 OK)

regards
 
hello,
i try to follow script execution but it is a huge script :)

i would like to know if the script is supposed to support starting in degraded condition ? (WAN0 Connected with loss at 100% & WAN 1 OK)

regards
WAN0 being stopped / disconnected is the default state on boot up of the router. The script handles starting it and making it usable where normally the ASUS Factory failover configuration does this.
 
hum ...

so, what the conclusion ?
it is a asuswrt firmware issue ?

regards
It's not an "issue" per say it's just how it works by design, the router starts up on WAN1 and uses factory failover to start WAN0 and switch over to it. My script handles this when the factory failover is turned off.
 

Latest threads

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