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
1,170 views 2 comments
by
Hello

I would like to get the failover status of a RUT955 through JSON RPC. Basically I would like to know how I can reproduce the "WAN Failover Status" (below the image of the device) from the WAN Information page. https://wiki.teltonika.lt/view/RUT955_Network#WAN

So not only do I want to know which connection is in use, I also like to get the status of all other failover connections.

Is there a single command for this? Can I get this from the 'ip route' command? Or do I need more than one command to get this information? If so which commands would I need?

1 Answer

0 votes
by anonymous

Hi,

Using 'ip route' you could get active networks:

root@Teltonika~# ip route

default via 192.168.5.1 dev eth1

default via 10.133.153.104 dev wwan0  metric 10

Metric 10 means that it is backup.
by

I was hoping there was a better way. I tested using "ip route", however I saw the output below when using mobile as primary and wired as failover. When triggering the failover.

# ip route
default via 192.168.1.254 dev eth1
default via 192.168.1.254 dev eth1  proto static  src 192.168.1.252  metric 10

So that means wired is the active connection, but also the backup? It seems to me that parsing the "ip route" output is rather error prone.

And I would also need to get the config for the failover. because in my tests I saw no difference when a connection is not used as failover or the connection is used but not connected. Eg. wired is used as failover, but no cable is connected vs wired is not used as failover. Both scenarios have no line for eth1 in the "ip route" output.

So if there is a better option?

by anonymous

So that means wired is the active connection, but also the backup?

It means that it is not primary wan.

And I would also need to get the config for the failover.

root@Teltonika:~# cat /etc/config/multiwan

root@Teltonika:~# uci show multiwan

So if there is a better option?
Unfortunately no.