Multiple NICS - Real Servers

Julian Anastasov ja at
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
>    U    0    0    eth0
>    U    0    0    eth1
>         UG    1    0    eth0
>         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 dev eth0 src metric 1
ip route add 0/0 via dev eth1 src 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 and .2(eth1) before the above commands. You have
to experiment.

> Thanks, Mike


Julian Anastasov <ja at>

More information about the lvs-users mailing list