From owner-freebsd-questions Fri Nov 22 10:43:32 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA09178 for questions-outgoing; Fri, 22 Nov 1996 10:43:32 -0800 (PST) Received: from relay5.UU.NET (relay5.UU.NET [192.48.96.15]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id KAA09150 for ; Fri, 22 Nov 1996 10:43:06 -0800 (PST) Received: from mail.kcwc.com by relay5.UU.NET with SMTP (peer crosschecked as: h1.kcwc.com [206.139.252.2]) id QQbqys13524; Fri, 22 Nov 1996 13:42:24 -0500 (EST) Received: by mail.kcwc.com (NX5.67c/NeXT-2.0-KCWC-1.0) id AA02301; Fri, 22 Nov 96 13:42:20 -0500 Date: Fri, 22 Nov 96 13:42:20 -0500 From: curt@kcwc.com (Curt Welch) Message-Id: <9611221842.AA02301@mail.kcwc.com> Received: by NeXT.Mailer (1.87.1) Received: by NeXT Mailer (1.87.1) To: questions@FreeBSD.org Subject: Re: IP routing thoery: ping pong effect. Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > 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.