Date: Thu, 8 Apr 1999 11:33:32 -0700 (PDT) From: Dan Busarow <dan@dpcsys.com> To: Adam Nealis <adamn@csl.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: routed/gated confusion Message-ID: <Pine.BSF.3.96.990408111832.9203I-100000@java.dpcsys.com> In-Reply-To: <370CE58D.540A4DF3@csl.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 Apr 1999, Adam Nealis wrote:
> I've read the on-line handbook, the FAQ, searched the mail
> list archives and I'm still awaiting delivery of my copy of
> "Complete FreeBSD". But I'm still unclear on a couple of
> things. Mainly to do with when/why I should use routed or
> gated. And then how to tell them to do what I want them to
> do.
> 
> I have two PCs with 'BSD 3.1 on 'em. They are both dual
> homed. Call them IN and OUT, with their "NIC names" IN-e0
> IN-e1, OUT-e0 OUT-e1.
> 
> I want these two to function as routers. Specifically, to be
> screening routers in a test bed network I'm setting up to
> play with firewall configurations. So I have:
> 
> OUT			| IN
> ___________________________________________
> e0	192.168.0.1	| e0	192.168.0.4
> e1	192.168.1.1	| e1	10.0.0.1
> ___________________________________________
> 
> and the layout is like this:
> 
> "Internet end"                                         "LAN
> end"
>                    _________           ________
> 192.168.1.0 ----- |e1|OUT|e0| ------- |e0|IN|e1| ----- 10.0.0.0
>                    ---------           --------
> 
> I obviously need to set up routes on each machine so that I
> can ping 10.0.0.1 from machine OUT, and also ping
On OUT
route add 10.0.0.0 netmask 255.255.0.0 192.168.0.4
> 192.168.1.1 from machine IN. So how do I do this? If I
On IN
route add default 192.168.0.1
> understand correctly I only need static routes, no? I can't
> work out from the /etc/rc{,.conf} stuff how this is supposed
> to be done.
> 
>  o Should I be using gated or routed?
Nope
>  o If I use routed, how do I get the routes into the kernel
> at boot time (man routed is vague [to me] on this) - do I
> just run route add ... a few times?
Don't
>  o If I use route add, what do I add? Where do I put these
> commands so /etc/rc runs them?
In /etc/rc.conf, oops, /etc/defaults/rc.conf
static_routes="IN"
route_IN="10.0.0.0 -netmask 255.255.0.0 192.168.0.4"
That's on OUT, on IN just set defaultrouter to 192.168.0.1
The -netmask 255.255.0.0 is only needed if you are using something 
other than 255.0.0.0 as the netmask on 10.0.0.0
And set gateway_enable="YES" on both.
>  o How do I stop routed from trying to send to the mcast
> 224.0.0.0 network?
Don't run it :)
Dan
-- 
 Dan Busarow                                                  949 443 4172
 Dana Point Communications, Inc.                            dan@dpcsys.com
 Dana Point, California  83 09 EF 59 E0 11 89 B4   8D 09 DB FD E1 DD 0C 82
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?Pine.BSF.3.96.990408111832.9203I-100000>
