Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Nov 96 13:42:20 -0500
From:      curt@kcwc.com (Curt Welch)
To:        questions@FreeBSD.org
Subject:   Re: IP routing thoery: ping pong effect.
Message-ID:  <9611221842.AA02301@mail.kcwc.com>

next in thread | raw e-mail | index | archive | help


>  My question is: how is it possible for Hb and He to route
>  packages to each other? Obviously theoretically they can
>  because it happens on the Internet.  Thus, how can this
>  theoretically be accomplished.

>  The answer I think must have to do with dynamic routing
>  tables in Ha.  Or is it done with distributed routing
>  tables (like DNS)?

Yes, it's done by configuring the routing tables in Ha correctly.
For a small network that doesn't change, you can configure them
by hand.  Normally however, it's done with one of the various
routing daemons which use the routing protocols to talk to the
other hosts.

> Is this why Ha is a router rather than a mere gateway?

No.  Any system that links two IP networks is a router.  Ha,
Hc, and Hd are all acting as routers in your example.  And
they can all be thought of as gateways.  It's just that
the simple default route approach won't work once the routes
get too complex.  Ha is the only host in your example that
has reached this point.

> How would this work? I would appreciate a concise answer. 


To make your example network work, all hosts would need to
known the correct route to all networks.  The two leaf node
hosts, He and Hb, could just use default routes to Hc and Hd
respectfully.  Hc and Hd could also just have a default route
to Ha.

Ha, as you pointed out, can't get by with only a default route.
It's connected to N1 and N3, so it "knows" the correct route
for hosts on those two networks.  But it needs to know the
correct route for N4 an N2.  For hosts on N4, it needs to known
to use host Hc as the gateway, and for hosts on N2, it should
use Hd.  This can be done with with route add commads something
like this:

  route add x.x.2.0 Hd
  route add x.x.4.0 Hc

If  your x.x is really a class B net, then you might have to
do something like this (I'm not really sure how it all works
these days...)

  route add -net x.x.2.0 -netmask 255.255.255.0 Hd

If you run routing deamons, they need to run on Ha, Hc, and Hd.
The ones on Hc and Hd tell the one on Ha about the N4 and N2
networks.  I think the simple routed deamon that comes with
FreeBSD should be able to do this for you, but it has been awhile
since I had to deal with this so I'm not sure of the details.



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