From owner-freebsd-isp Mon Oct 6 15:34:15 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA04808 for isp-outgoing; Mon, 6 Oct 1997 15:34:15 -0700 (PDT) (envelope-from owner-freebsd-isp) Received: from gatekeeper.tsc.tdk.com (root@gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA04800 for ; Mon, 6 Oct 1997 15:34:07 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from sunrise.gv.tsc.tdk.com (root@sunrise.gv.tsc.tdk.com [192.168.241.191]) by gatekeeper.tsc.tdk.com (8.8.4/8.8.4) with ESMTP id PAA15166; Mon, 6 Oct 1997 15:33:36 -0700 (PDT) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by sunrise.gv.tsc.tdk.com (8.8.5/8.8.5) with ESMTP id PAA18816; Mon, 6 Oct 1997 15:33:35 -0700 (PDT) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id PAA00567; Mon, 6 Oct 1997 15:33:33 -0700 (PDT) From: Don Lewis Message-Id: <199710062233.PAA00567@salsa.gv.tsc.tdk.com> Date: Mon, 6 Oct 1997 15:33:32 -0700 In-Reply-To: "Daniel O'Callaghan" "Re: routing between networks" (Oct 6, 10:41pm) X-Mailer: Mail User's Shell (7.2.6 alpha(3) 7/19/95) To: "Daniel O'Callaghan" , chrw Subject: Re: routing between networks Cc: freebsd-isp@FreeBSD.ORG Sender: owner-freebsd-isp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Oct 6, 10:41pm, "Daniel O'Callaghan" wrote: } Subject: Re: routing between networks } } On Mon, 6 Oct 1997, chrw wrote: } } > Hello, I have a small question to ask. I do not fully understand how } > routing between 2 logical networks works. Lets say I got net 194.19.1, with } > default gateway and router to the internet at 194.19.1.1. Now, I want to } > add another C net, 194.19.2 with the same gateway as net .1. This new net } > cannot see the other net, so I need to setup a box to route between these } > 2 nets.. right? } } Yes. Not necessarily. If you have two (or some power of two) adjacent network numbers that start on a power of two boundary, and if all the boxes on the network understand classless routing ({Free,Open,Net}BSD should all qualify, as does Solaris 2.6, and I imagine that Linux probably does as well), then the best solution is to just change the network mask to do supernetting. In this case, you would just need to do: ifconfig interface 194.19.{1,2}.xxx netmask 255.255.254.0 The next best solution is to use the route command. On your 194.19.1.* hosts, you would need to do: route add net 194.19.2.0 address-of-this-host-on-194.19.2 metric 0 and on your 194.19.2.* hosts, you would need to do: route add net 194.19.1.0 address-of-this-host-on-194.19.1 metric 0 I've never attempted this, but I think most TCP stacks support this. In this scheme I don't know if your 194.19.2.* hosts can use a 194.19.1.1 as a default gateway, so you may need to create an interface alias on the 194.19.2.* network for it and point the default route to that address. The advantage of either of these schemes is that each host on the network can communicate directly with any other host on the network. If you route between the networks, any packets sent from one logical network number to another will traverse the physical network twice. } > Do I need to setup a box with 2 NICS, one for each net? The } } Yes. No. } > way I prefer it, is to route between the nets, but stay with a single NIC. } } You may *think* you prefer it, but if you do it that way you'll find that } 1 NIC per network is best. Any particular reason that you think 2 NICs are better than 1? I can think of several reasons why 1 is better: Less hardware to purchase (NICs, hub ports or transceivers, cables) Fewer cables to hook up Fewer slots used Better performance (with two NICs, if both decide to transmit at the same time, you'll get a collision and both will back off for some random amount of time, but with one NIC the packets will be sent out back to back) --- Truck