[PLUG] Two default gateways?

Stafford A. Rau srau at rauhaus.org
Mon Feb 7 18:19:54 UTC 2005


* Alex Daniloff <alex at daniloff.com> [050207 09:45]:
> 
> What I want to achieve is to specify two default gateways for the each
> host on internal network.
> In case if SW1 or SW2 server goes down, each host still will be able
> to access
> the Internet.

Your problem there is going to be that your internal hosts have no
mechanism to mark the failed gateway host as being down. They'll either
continue to load balance between the two gateways, and half your traffic
will be dropped, or they'll pick one of the two gateways for all of
their traffic, and continue to send all of it to that one even if it
goes down.

You could look into using VRRP for linux - if you can get that working,
your two gateway machines will each have a "real" internal ip address,
such as 192.168.1.2 and 192.168.1.3, and they will have an election so
that one of them will always respond to a virtual ip, such as
192.168.1.1.

You would then point just a single default on your internal hosts at the
virtual ip, 192.168.1.1. When one of your gateway hosts goes down, the
VRRP process informs the other one to take over the virtual ip address.

I've never done this with linux, but did get some Google hits with VRRP
and linux. This a very common configuration with dedicated router
hardware, like Ciscos using HSRP or (now that they support it) VRRP.

--Stafford



More information about the PLUG mailing list