From owner-freebsd-questions Mon Jun 22 08:19:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA16535 for freebsd-questions-outgoing; Mon, 22 Jun 1998 08:19:49 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from lucy.bedford.net (lucy.bedford.net [206.99.145.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA16519 for ; Mon, 22 Jun 1998 08:19:41 -0700 (PDT) (envelope-from listread@lucy.bedford.net) Received: (from listread@localhost) by lucy.bedford.net (8.8.8/8.8.8) id LAA25437; Mon, 22 Jun 1998 11:13:25 -0400 (EDT) (envelope-from listread) Message-Id: <199806221513.LAA25437@lucy.bedford.net> Subject: Re: routing issue In-Reply-To: <199806221326.IAA05713@sierrahill.com> from Joe Schwartz at "Jun 22, 98 08:26:11 am" To: rjoe@sierrahill.com (Joe Schwartz) Date: Mon, 22 Jun 1998 11:13:25 -0400 (EDT) Cc: freebsd-questions@FreeBSD.ORG X-no-archive: yes Reply-to: djv@bedford.net From: CyberPeasant X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Joe Schwartz wrote: > > Folks, > > I want to use a FreeBSD machine as an Internet host with 2 > ethernet cards. One card on an Internet subnet and the other > card to service the internal private network. > > I'm having trouble getting it to route between the 2 interfaces. > > > I have 3 machines setup for a test. Where's the internet? Is there a third interface on machine b? > machine a: > ---------- > ifconfig -a > ep0: flags=8843 mtu 1500 > inet 207.8.11.165 netmask 0xfffffff8 broadcast 207.8.11.167 > ether 00:a0:24:11:c7:19 > > > machine b: > ---------- > ifconfig -a > ep0: flags=8843 mtu 1500 > inet 207.8.11.166 netmask 0xfffffff8 broadcast 207.8.11.167 > ether 00:10:4b:29:aa:a7 > ep1: flags=8843 mtu 1500 > inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255 > ether 00:10:4b:20:94:3a > > machine c: > ---------- > ifconfig -a > ep0: flags=8843 mtu 1500 > inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255 > ether 00:10:4b:29:ab:da > > > > machine a's default route is set to 207.8.11.166 This implies that B knows where the "world" is. Ok, where is it, and what is its IP? That should be B's default route. > machine c's default route is set to 192.168.1.1 OK > machine b has a route between the 2 interfaces by issuing: (but doesn't work) > > route add -net 192.168.1.0 207.8.11.166 0 This says "network 192 can be reached through interface ep0" That is wrong. Delete this route. Just by ifconfiging the cards, machine B knows where the subnets are. Or so I think :) > In /etc/rc.conf I've got: > > gateway_enable="YES" > router_enable="YES" Router_enable is probably not needed? Summary: (Assuming that machine B has a third interface to the "world"). Machine A: no gateway_ or router_ enable default route is to the 207 address on B Machine B: gateway_enable="YES" no router_enable no static routes (? depends on what that internet interface is) might need a static route to machine A default route is the internet interface's IPA Machine C: no gateway_ or router_ enable default route is to the 192 address on B I'm guessing, of course. Dave -- http://www.microsoft.com/security: `Microsoft Windows NT Server is the most secure network operating system available.' Don Quixote: `You are mistaken, Sancho.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message