Thanks to everyone who responded either asking for the answer or attempting to
answer the question. I received an excellent reply from Ian.Piumarta_at_inria.fr
which included all the comments made by the other respondees. So I have included
Ian's email as the summary.
I have implemented Ian's suggestions and we now have a semi-fault-tolerant
routing situation.
Thanks to:
Ian.Piumarta_at_inria.fr
sweber_at_mr.picker.com
semery_at_BayNetworks.com
Original Post:
===========
Hello All,
Last week the company I work for had a failure in both of the hub routers at the
same time which understandably caused sever problems. They have now installed a
third router into the network and the networking group have asked that all the
system administrators add static routes to the servers so that should the
default route fail an alternative route is tried. I have read through the
'Network Configuration' manual and there is no mention of having a setup where
by which the system always uses the default route and in the event that that
route
does no work it will try another route. Has anyone does this under Digital UNIX
3.2?
BTW. We run routed (not gated) in quiet mode (-q) therefore there is no RIP.
If this is not possible in Digital UNIX then how do people solve this?
SUMMARY from Ian Piumarta:
=======================
> Can anyone make a definitive statement as to what the behaviour of routed >
is? More particuarlly - does the order of routes matter?
The order of entries does not matter. But the routing tables do not behave the
way you think they do, and the route command is not the way to solve your
problem.
The routing table is used to route packets to hosts (or more usually, to
networks). The default route is the address of the gateway to which packets
addressed to unknown hosts or networks will be forwarded. NO DESTINATION
ADDRESS IS ASSOCIATED WITH A DEFAULT ROUTE. (Having a single default route to a
gateway will cause all traffic to be sent there.) Static routes associate
particular hosts/networks with a particular gateway. These always override the
default gateway, and ALWAYS HAVE AN ASSOCIATED DESTINATION ADDRESS.
These are used in practice *not* for fault-tolerance and dynamic configuration
of routes, but for specifying special gateways for particular networks. For
example, you would add a default route to your gateway connected to the outside
world. If you had other gateways, connected to other subnets in your
organisations, you would add static routes to these interior gateways for the
interior networks -- overriding the default gateway.
Dynamic configuration is handled by the routing daemons: routed, gated, egp, and
so on. These programs modify the initial routing table set up using the route
command. (So even the entries you make with the route command, let alone the
order, become largely irrelevant when you run a routing daemon!) These programs
are not often run on non-gateway machines. If you want your machine to
dynamically change its routing behaviour, you need to run one of these daemons
even though your machine is not a gateway.
Let's assume you want to run routed. Since your machine isn't a gateway, be
sure to start it as
routed -q
which stops routed from trying to advertise routes to other gateways. The
cofiguration file is /etc/gateways, which must (at the very least) define a
default active gateway:
net 0.0.0.0 gateway <your-gateway's-ip-address> metric 1 active
More than one active gateway can be defined, and would correspond to the
redundant two gateways that you have:
net 0.0.0.0 gateway <your-second-gateway-address> metric 2 active
net 0.0.0.0 gateway <your-third-gateway-address> metric 3 active
The metric numbers give the "cost" associated with sending a packet via each
gateway, and can be used to prioritize the order in which gateways are tried.
(With static routing this number is all but ignored -- with dynamic routing it
is important, and is actually used to make routing decisions!) If all three of
your gateways are interchangable, give them the same metric -- if routing
information determines one to be better than the others, the metrics will be
adjusted accordingly, automatically. The metrics are adjusted based on routed's
current idea about which gateway is the best for a given destination address.
If one of your gateways fails, by not responding to routing protocol requests
for some time, then routed will remove it from the routing tables altogether.
Also, *avoid passive routes* if you want your dynamic routing to behave
correctly during gateway failures. See the routed manual page for the full
story.
Note that routed will take some time to discover that a gateway has failed:
about 180 seconds in most cirsumstances, which cannot be reduced. It's part of
the protocol.
So, in a nutshell:
+ put *only* your default gateway and any special internal routes
in /etc/routes
+ declare your gateways to /etc/gateways
+ run "routed -q" from your favorite rc file
and one time only:
+ unplug your #1 gateway and check that the routing tables
reconfigure, then plug it back in and unplug the other two and
check that the table goes back the way they started.
> I will post a summary after I get a clear answer.
Why not save yourself a lot of trouble and confusion, and buy "TCP/IP Network
Administration" from O'Reilly? ISBN 0-937175-82-X. You'll be an expert
overnight. In fact I'd go so far as to say that you're being very, very
optimistic if you try to administer even one machine connected to a TCP/IP
network without this, or a similar, book.
BTW: I did order the book!
Ben
Received on Wed Sep 06 1995 - 10:35:17 NZST