View previous topic :: View next topic |
Author |
Message |
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Tue Oct 20, 2020 12:19 am Post subject: Fallback default route ? |
|
|
Hello,
My ADSL line is currently broken so I'm using my 4G phone to connect to the internet and one of my machines (192.168.0.15) is able to connect to both to WiFi and ethernet.
On ethernet only machine, I have this kind of configuration :
Code: | config_eth0="192.168.0.12/24"
routes_eth0="default via 192.168.0.10"
dns_servers_eth0="192.168.0.3 8.8.8.8"
|
where 192.168.0.10 is the IP adress of my ADSL router.
It is possible to define 192.168.0.15 as fallback default route if 192.168.0.10 is not reachable ?
Thanks
Laurent |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Tue Oct 20, 2020 10:15 am Post subject: |
|
|
destroyedlolo,
All things are possible but is it worth the effort?
You decide.
netifrc provides preup, predown and postup, postdown hooks where you can do your own thing.
Leave you net file alone.
Write a postup script that pings 192.168.0.10 and does nothing if it gets a response, otherwise swaps the default route.
Read /usr/share/doc/netifrc-<your-ver>/net.example.bz2 _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Tue Oct 20, 2020 10:43 am Post subject: |
|
|
Quote: | It is possible to define 192.168.0.15 as fallback default route if 192.168.0.10 is not reachable ? |
Most routers will still be reachable via ping if the WAN connection goes down. You'll probably have to ping the first router behind the ASDL connection or a well-known destination in the internet.
A much better solution would be a router that automatically switches to a backup LTE connection if the DSL connection goes down. Fritzboxes (very popular in Germany) can do that. |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Tue Oct 20, 2020 11:50 am Post subject: |
|
|
mike155 wrote: | Most routers will still be reachable via ping if the WAN connection goes down. You'll probably have to ping the first router behind the ASDL connection or a well-known destination in the internet. |
Mine (Freebox) doesn't respond when not synchronised
Anyway, I'm facing another issue : my home network is v4 only (because I have old machines like Amiga or Vax that doesn't support IPv6) ... but my phone network is only routing V6 : yyyeeaahhhh !) |
|
Back to top |
|
|
|