Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jan 97 11:04:28 CST
From:      Joe Greco <jgreco@solaria.sol.net>
To:        jdp@polstra.com (jgfbsd)
Cc:        hackers@freebsd.org
Subject:   Re: Fault-tolerant network with 2 ethernets
Message-ID:  <199701241704.LAA28841@solaria.sol.net>
In-Reply-To: <199701222351.PAA04715@austin.polstra.com> from "jgfbsd" at Jan 24, 97 10:55:50 am

next in thread | previous in thread | raw e-mail | index | archive | help
> This is probably a routing 101 question.  But I've never had to do much
> with routing, so I could use some advice.

:-)

> A client wants a fault-tolerant LAN setup like this:
> 
>     ethernet A (100BaseT)
>     ---+------+------+------+------+------+---
>        |      |      |      |      |      |
>      host   host   host   host   host   host
>        |      |      |      |      |      |
>     ---+------+------+------+------+------+---
>     ethernet B (100BaseT)
> 
> The goal is that either ethernet could go down, yet all the hosts could
> still talk to each other.  Or, one of the ethernet cards on a host could
> go down, and it could still talk to all the other hosts.  In either
> case, it has to happen automatically, without manual intervention.  Load
> balancing isn't a goal, just fault-tolerance.
> 
> At first I was hoping that routed could do this for me, without
> the applications even being aware of it.  But now I'm not so sure.
> Each ethernet will have to have its own IP network number (right?),
> and so each host will have to have 2 IP addresses.  A given packet
> will be addressed to only a single IP address, and that implies
> it's headed for a particular ethernet.  If that ethernet is down,
> all addresses on it are down, and the packet won't be delivered
> no matter what routed does.
> 
> Is this analysis correct?  Is there a simple way to get what I want?
> How about a non-simple way?

Hi,

You are talking about something that I've been working on for a long
time, because I'm paranoid, I've experienced failures, and I hate single
points of failure.

You have a problem because you can legitimately run dual ethernets, but
each is addressed differently.  So when your application connects to
"box1", with IP addresses a.b.1.1 and a.b.2.1, it randomly picks one
address (maybe a.b.1.1).  So you are now bound to that interface, and if
the interface, wire, or hub goes away, you are toast.

You can get around that by putting a virtual interface on each machine
(maybe an alias for the loopback device, or a separate lo1 interface)
and numbering it uniquely (a.b.3.1).  Now, if you are real careful, you
make sure all your applications bind to this address.

In particular, when you open a socket, make sure that you are bound to
your local "virtual" interface.  Otherwise the kernel will conveniently
wire you down to a real one, which defeats all of this.

Now you are bound, on each end, to interfaces that are (theoretically)
100% reliable.

Enable packet forwarding, and use OSPF to fill in the holes.  OSPF will
allow you to route to your hearts content even through a very broken
network, as long as a path exists.

I'm not sure how easy it would be to make a third-party application 
"network-independent" in this manner.  You could do it, of course, with
a modified shared libc.

I hope this covers your question, it's the only "true" solution I know
of, and I hope my answer is clear.  ;-)  Drop me a line if not.

... Joe

-------------------------------------------------------------------------------
Joe Greco - Systems Administrator			      jgreco@ns.sol.net
Solaria Public Access UNIX - Milwaukee, WI			   414/342-4847



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701241704.LAA28841>