Multiple NICS - Real Servers
ja at ssi.bg
Tue Aug 7 23:14:33 BST 2001
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
> Thanks, Mike
Julian Anastasov <ja at ssi.bg>
More information about the lvs-users