Thanks a lot to taking the time to help me understand this.
IDK how it handles routes, but for this matter it uses ping to verify if a WAN/interface is reaching internet and can be used for load balancing and fail over. It relies on interface name for that, so it's not working because passing the interface name as parameter isn't working.
What's odd is that it was all working before. I'm not sure, but I believe it started when I moved this modem to bridge and changed network settings to PPPoE connect.
Anyway, so if I don't specify an interface to where the ping must use, as in ping -c 2 ipv6.google.com
, then OpenWRT just chooses the route randomly or by mwan3 rules.
But if I need to use a specific interface as in ping -c 2 -I eth0.3 ipv6.google.com
, then it doesn't work with permission denied message.
Indeed, if I use ping -c 2 -I 2804:14c:658b:5fed::1 ipv6.google.com
(ISP1 prefix + "suffix" [config interface lan option ip6ifaceid]) or ping -c 2 -I 2804:1b2:180:afc1::1 ipv6.google.com
(ISP2 prefix), both works. The same is valid for traceroute -i
.
What I don't understand is why ping -c 2 -I eth0.3 ipv6.google.com
doesn't work but ping -c 2 -I pppoe-wan ipv6.google.com
does.
The problem is that these global prefixes are dynamic. And my main use for this is precisely mwan3 pinging to verify if each WAN/interface is up and can be used.
Other than ping, it offers arping and httping to do the job. I'm gonna read about them before testing on my router.
But, isn't there a stable way to test if a WAN/interface is reaching internet, that can be used in scripts?
ddns is modular and allows us to use custom script to find out whatever IP address we wanna attribute for a domain name. mwan3 doesn't seem to have such feature. If needed be, I could add a feature request for that. Sadly I'm not good on sh/bash/python to help develop it