LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Multiple NICS - Real Servers

To: Michael McConnell <michaelm@xxxxxxxxxxx>
Subject: Re: Multiple NICS - Real Servers
Cc: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Julian Anastasov <ja@xxxxxx>
Date: Tue, 7 Aug 2001 22:14:33 +0000 (GMT)
        Hello,

On Mon, 6 Aug 2001, Michael McConnell wrote:

> The real servers routing table looks something like this
>
> 192.168.0.0    0.0.0.0    255.255.255.0    U    0    0    eth0
> 192.168.0.0    0.0.0.0    255.255.255.0    U    0    0    eth1
> 0.0.0.0           192.168.0.1   0.0.0.0        UG    1    0    eth0
> 0.0.0.0           192.168.0.2   0.0.0.0        UG    2    0    eth1
>
> This routing table would work fine for a Router, in the event that eth0 did 
> not work it would go to the next metric eth1. But unforchunately PING and 
> Apache are not going to do this, they are trying to send there packets out 
> the first listed interface and that is it.

        Off topic. You have to switch from "route" to "ip route"

> Any idea how I can actually have the 2nd metric used in the event that the 
> first default gw is offline.

ip route add 0/0 via 192.168.0.1 dev eth0 src 192.168.0.10 metric 1
ip route add 0/0 via 192.168.0.2 dev eth1 src 192.168.0.20 metric 2

        Never rely on "route", Linux 2.2+ recommends all routes to
have preferred source address and not to rely on the device list for
the source address autoselection. This is achieved only with "ip route".

> Anyone have any suggestions as to how I can solve this?

        I'm not sure but may be you will need to add host routes for
192.168.0.1(eth0) and .2(eth1) before the above commands. You have
to experiment.

> Thanks, Mike


Regards

--
Julian Anastasov <ja@xxxxxx>



<Prev in Thread] Current Thread [Next in Thread>