Answer the question
In order to leave comments, you need to log in
2 Linux default gateways on the same subnet with different metrics on the same interface. Is it possible to?
There is one rather wonderful machine with one address in the LAN, which has 2 WAN addresses from two different routers from two different providers. From the Internet, this horror is available at both addresses and works great.
It looks something like this:
.
---------------
+----| 192.168.1.1 |--[port forwarding]-- [ WAN IP 1 ] -- (ISP 1)
-------------- | ---------------
| 192.168.1.20 | ----|
-------------- | ---------------
0/0 via .1 +----| 192.168.1.254 | ---------[Rev.NAT]-- [ WAN IP 2 ] -- (ISP 2)
---------------
Answer the question
In order to leave comments, you need to log in
You can specify two default routes with different metrics:
unix.stackexchange.com/questions/35713/adding-two
-...
sample command route add default gw 192.168.1.254 metric 2
from, for example, ping to 8.8.8.8, i.e. we make a route to 8.8.8.8 strictly through the first provider, we make a ping check script and if it is not there, we change the metrics for the def routes. In the details of the implementation of the script for niks, I will not tell you.
Whose routers? In the "right" networks, they must solve such problems among themselves ...
chris.olstrom.com/howto/setup-dual-wan you should read about this carefully.
Well, the rest of Google on the topic "linux 2 wan".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question