Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jun 1998 11:13:25 -0400 (EDT)
From:      CyberPeasant <djv@bedford.net>
To:        rjoe@sierrahill.com (Joe Schwartz)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: routing issue
Message-ID:  <199806221513.LAA25437@lucy.bedford.net>
In-Reply-To: <199806221326.IAA05713@sierrahill.com> from Joe Schwartz at "Jun 22, 98 08:26:11 am"

next in thread | previous in thread | raw e-mail | index | archive | help
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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         inet 207.8.11.166 netmask 0xfffffff8 broadcast 207.8.11.167
>         ether 00:10:4b:29:aa:a7 
> ep1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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



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