This is part of a project I am working on but wanted to ask this question by itself. I have setup failover interface option and when I run "ifdown wan" it will failover to wwan (wlan0) but if I simply disconnect the cable from wan (eth0) it will not failover to wwan (wlan0). Not sure why that is. It does show the port is down.
Topic: How do I failover from WAN (eth0) to WWAN(wlan0) in OpenWrt
The content of this topic has been archived on 5 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
Use MWAN3 package.
https://forum.openwrt.org/viewtopic.php?id=39052
Download here: http://www.mediafire.com/folder/fvd0r4i8n4ikg/mwan3
Thanks I will try this when I get home
general problem to detect interface status depending much on driver
there are some solutions incl. watchdog/cron ping gateway/internet and /or watch traffic
ref:
https://forum.openwrt.org/viewtopic.php?id=49888
https://forum.openwrt.org/viewtopic.php?id=49440
search : interface status detect up down
brings you more
at the moment activation of interface(dhcp) is detected in getting a dhcp-response
to a dhcp-request send by udhcpc which triggers /lib/netifd/dhcp.script
IMHO there is no mechanism to detect interface down/inactive through hotplug / netifd
Though some drivers do send log-messages with interfacestatus-change (ramips chipsets)
regards
3zl
The discussion might have continued from here.