From owner-freebsd-questions Tue Feb 6 07:57:24 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA20180 for questions-outgoing; Tue, 6 Feb 1996 07:57:24 -0800 (PST) Received: from crh.cl.msu.edu (crh.cl.msu.edu [35.8.1.24]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA20167 for ; Tue, 6 Feb 1996 07:57:18 -0800 (PST) Received: (from henrich@localhost) by crh.cl.msu.edu (8.6.12/8.6.12) id KAA10232; Tue, 6 Feb 1996 10:57:08 -0500 From: Charles Henrich Message-Id: <199602061557.KAA10232@crh.cl.msu.edu> Subject: Re: Static routes for multiple subnets? To: ptroot@uswest.com (Paul T. Root) Date: Tue, 6 Feb 1996 10:57:08 -0500 (EST) Cc: freebsd-questions@freebsd.org In-Reply-To: <9602061330.AA02222@kermit.acs.uswest.com> from "Paul T. Root" at Feb 6, 96 07:30:30 am X-Mailer: ELM [version 2.4 PL24 ME8a] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org Precedence: bulk > Sounds pretty easy. Some numbers would be nice though. Ok. Lets say > your 1st class C is 192.100.1.0 and your 2nd is 192.100.2.0. Your default > gateway (to the internet) will be 192.100.1.1 and your gateway to the 2 net > will be 192.100.1.2. So: > > route add default 192.100.1.1 > route add -net 192.100.2.0 192.100.1.2 Thats was my point, I dont want a second gateway at .2. I want my machine to know that the second class C is also locally attached ethernet. The solution turns out to be: route add -net 198.100.2.0 -interface hostname or 0 (not ed0 as one would expect!) -Crh Charles Henrich Michigan State University henrich@crh.cl.msu.edu http://rs560.msu.edu/~henrich/