multihomed linux box
i have this setup on 2 machines
\ eth0 ---> Switch --> Router A(65.xxx.xx.x.x) --> Internet
\ eth1 --> Switch --> Router B (63.xx.x.x.x.x) --> Internet
\ eth0 --> Switch --> Router A (65.xx.x.x.x.x) --> internet
\ eth1 --> Switch --> Router B (63.xx.x.x.x) --> internet
what i can't figure out is how to get it so if one route fails
it will take the other. i have routed installed but im not sure
if it will do what i want.
what i have:
/sbin/route add -net 0.0.0.0 netmask 0.0.0.0 gw MY_GATEWAY metric 0
/sbin/route add -net 0.0.0.0 netmask 0.0.0.0 gw ALT_GATEWAY metric 1
so i ssh to a machien it shows me comming from MY_GATEWAY's ip
network. so i unplug the router, and try to ssh. nothing. try
to ping using -i, nothing. once i remove the route to MY_GATEWAY
i can ping/ssh again. each interface has a different IP address.
its not really multihomed in the sense that to the outside world
i have 1 ip address and it can be reached through either provider
(2 different T1 providers) i just want failover route setup.
/etc/gateways is comprised of a series of lines, each in
the following format:
[ net | host ] name1 gateway name2 metric value [ passive
| active | external ]
The net or host keyword indicates if the route is to a
network or specific host.
Name1 is the name of the destination network or host.
This may be a symbolic name located in /etc/networks or
that doesn't seem to do what i want as both networks will
from route's manpage:
set the metric field in the routing table (used by
routing daemons) to M.
from the looks of it routed just does RIP on linux which is not
what i want. my routers are setup to use static routing, so there
is no routing protocols in use.
in simple: if route 1 fails i want to use route 2 instead.
oh and im running debian 2.2r3/linux.2.2.19 on 1 machine
and debian testing(a month or so old) with 2.2.19 on the
maybe there is another 'routing daemon' that i could use?