FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
484 views 0 comments
by
Hello,

I'm currently setup the failover to use wwan wifi client as primary interface and switch on 4G connection when WiFi is disconnected. I have setup on GUI and it works fine but I'm also writing a python script to monitor the this connection state to know which interface (wifi or mobile) is used to transmit the data. Currently my script is connected to the router via ssh, what is the command I can use to get the status online/offline of client wifi in Failover status ? To be sure that the data is now switched on wifi client instead of mobile data and vis versa ?

Thank you in advance.

1 Answer

0 votes
by anonymous
Hi,

Unfortunately, there is no obvious way to do it. You'll have to check /etc/config/mwan3 config for metric settings. Lower the metric - the more priority interface has. So let's say you have failover set-up and one of the interfacess are down - failover will regroup them so that active network had a higher priority in that config.

Another way to do it would be pinging the WAN IP of all the interfaces and see which one responds, this way you will be able to detect which one of them is active.

You can use ifconfig command too, to see current traffic, detailed info about the interface and so on.

One more thing to check - syslog, run logread command to open system log and see what were the last events and what switched to what.

EB.