Operating System - Linux
1827840 Members
1440 Online
109969 Solutions
New Discussion

How can I use two default gateway for backup uplink?

 
Arkady_1
Advisor

How can I use two default gateway for backup uplink?

Hi!

I want to use two default gateways with different metric for backup uplink.

I have following configuration.

[root@gw-003 /]# /sbin/route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
. . .
0.0.0.0 195.22.245.1 0.0.0.0 UG 1 0 0 vadapt2
0.0.0.0 82.2.216.2 0.0.0.0 UG 2 0 0 vadapt0

Vadapt0 and Vadapt2 are virtual interfaces on one Ethernet card.

I thought that if 195.22.245.1 is rebooted active route is 82.2.216.2.

But it does not work. Anybody can help me?

Thanks!
2 REPLIES 2
Stuart Browne
Honored Contributor

Re: How can I use two default gateway for backup uplink?

You want the Advanced Routing HOWTO (see http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/ ).

Section 4.2 specifically.

As for metrics, and automatic failover.. If you aren't using some sort of routing daemon, then I don't think it'll be doing much for you.

You could set up monitoring scripts which do it for you, but that defeats the purpose really, doesn't it ;)
One long-haired git at your service...
Arkady_1
Advisor

Re: How can I use two default gateway for backup uplink?

Thanks for you!