[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 2 default gateway on two diffrent nic

On Wed, Aug 17, 2005 at 08:36:22PM +0200, Jean-Philippe Egger wrote:
> Hi,
> I've been trying to set up a full redundant web system using loadbalancing
> technics (ultramonkey). To incorporate a redundancy in the network itself
> (in case a switch fails) each machine behind the loadbalancer has two
> internal nics on two diffrent networks.

Giving the machine multiple IP-Addresses will only add to the confusion. I
recommend to use a bonding interface. Wit bonding, the server will use one
of the NICs by default and switch to the other NIC in case of failure of the
first NIC. This technique is transparent to IP and you should be able to set
it up with minimal effort.

My /etc/network/interfaces contains one bond0 stanza:

  auto bond0
  iface bond0 inet static
    address xxx.xxx.xxx.2
    gateway xxx.xxx.xxx.1
    up ifenslave bond0 eth0 eth1

All important here is the 'up' command which creates the bond0 interface and
binds the interfaces eth0 and eth1 to bond0. The seperate stanzas for eth0
and eth1 are not used anymore and are commented out. Read 'ifenslave -h' for
more info.


Reply to: