Subject: More information... Routing help needed! :)
To: None <port-i386@NetBSD.ORG, netbsd-help@NetBSD.ORG>
From: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
List: port-i386
Date: 01/27/1998 14:44:47
Okay. Here's more information.

The problem telnetting into my i386 box comes about only when I have
a default route set up.

In a script called from netstart.local, I set up the SLIP link, and then
add two routes - one is a route to the SE/30 that's on the other end of
the SLIP link, and the other is a default route that points to the SLIP
link as well, since the SE/30 is the machine that runs my PPP connection
to the outside world.

Here's how I'm setting these up:

route add -net 192.168 192.168.0.1
route add default 192.168.0.1

Here's how things are set up:

I have three machines on an EtherNet, one of which is the NetBSD/1386 box.
That box also runs a SLIP connection to my NetBSD/mac68k machine, which
doesn't have an EtherNet card. The NetBSD/mac68k machine has a modem and
handles my PPP connection, and it also runs IP-NAT to give access to the
rest of the network.

I have static routes on the NetBSD/i386 box that do the right thing in
general... Packets coming from anywhere on the EtherNet that aren't
addressed to a local machine are automatically sent through the NetBSD/i386
box to the NetBSD/mac68k box, which in turn passes them out to the net if
the PPP connection is alive.

This all works pretty well, except that, as mentioned above, with the
default route on the i386 in place, I can't generate new connections to the
i386. However, connections to the mac68k machine, which pass THROUGH the
i386, have no problems.

Another symptom is that when I type "netstat -r" or "route show" on the
i386, the process sits around forever after printing out the "Destination...
Gateway..." header line. However, "netstat -rn" gives me everything without
pause. If the default route on the i386 is *not* there, "netstat -r" and
"route show" behave normally.

I thought that maybe running routed would do the trick for me, but it
doesn't create the routes I need dynamically. Also, it complains about
several things, including:

sendto(we0, 224.0.0.1): No route to host
static route 0.0.0.0 --> 192.168.0.1 impossibly lacks ifp
static route 192.168.0.0/16 --> 192.168.0.1 impossibly lacks ifp

I'm not sure where the "224.0.0.1" is coming from - my SLIP link runs on
192.168.0.0, and my EtherNet is 10.0.0.0. If I don't have static routes
in place, routed simply tells me that there's no route to my host if I
try contacting the SE/30. (The SE/30 is also running routed. Both start
routed with the "-s" flag. I haven't tried "-g" yet - would that do the
trick for me??? I'll try it, anyway.)

Thanks in advance for the information. I'm pretty much baffled, and I'd
dearly love some advice from someone who has a clue about this stuff!
Also, FWIW, I'd like to get away with not running routing daemons. It
seems like this stuff *should* be able to be done with static routes.

BTW: I just noticed that I compiled my kernel with GATEWAY defined,
but without IPFORWARDING defined. Does this matter? The packets I want are
boing forwarded - the problem is that I can't get to the machine that's
doing to forwarding! Heh. I'm compiling a new kernel with IPFORWARDING
enabled, anyway, just in case that'll somehow solve my problem.

-- 
Mason Loring Bliss...mason@acheron.middleboro.ma.us...www.webtrek.com/mason
"In the drowsy dark cave of the mind dreams build their nest with fragments
 dropped from day's caravan."--Rabindranath Tagore...awake ? sleep : dream;