0

I have installed Ubuntu 20 server in my Raspberry pi board which I have connected with Wifi. I have installed a 3G Dongle to the ubuntu server. Now the 3G Dongle connection is also working fine. Right now, what I need to do is When the Wifi is down it should automatically connect to 3G Dongle and once the Wifi is back it should connect to the Wifi again.

I don't have a clue on how to do this do we need to write any script to switch the connection between two automatically. Could anyone pls help me on this? Thanks in advance.

1 Answer 1

1

You need to specify more in detail what you mean with "wifi down"

ifconfig wlan0 down = wifi down
AP/Router no internet = wifi down
...

But I guess you mean when the internetconnection via wifi is broken, it should use the 3g dongle instead.

Haven't thought in detail about this. But what you could do is ping your external ip and see if its reachable. If you don't have static one, you could use dyndns instead

  1. if ping works = do nothing
  2. if ping fails = disable wifi interface && enable 3d dongle
  3. if ping on non 3g line works again, switch over the connection

But I am pretty sure there is software which can be used. You want to search for multipathrouting, failover, loadbalancer, and maybe bonding

Cheers

fastboot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .