Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fallback default route ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Tue Oct 20, 2020 12:19 am    Post subject: Fallback default route ? Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Tue Oct 20, 2020 10:15 am    Post subject: Reply with quote

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
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue Oct 20, 2020 10:43 am    Post subject: Reply with quote

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
View user's profile Send private message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Tue Oct 20, 2020 11:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum