Subject: Re: Current kernel has routing problems?
To: Dave Huang <khym@bga.com>
From: enami tsugutomo <enami@ba2.so-net.or.jp>
List: current-users
Date: 10/27/1996 20:56:59
Dave Huang <khym@bga.com> writes:

> I just upgraded to current, and now when I boot, I get this error:
> 
> Oct 15 20:48:11 dahan routed[78]: sendto(ep0, 224.0.0.2): No route to host

I also got this with my i486 or alpha box (both machine has single
network interface and on which routed is invoked with -q option and
neither of them are build with options GATEWAY).  So to suppress it I
told the `routed' not to use rdisc, by creating the file /etc/gateways
containing the line:
	no_rdisc

> Then when I start pppd to connect to my ISP, I get:
> 
> Oct 15 20:57:31 dahan routed[78]: IP_ADD_MEMBERSHIP ALLHOSTS: Can't assign requested address
> Oct 15 20:57:31 dahan routed[78]: setsockopt(IP_ADD_MEMBERSHIP RIP): Can't assign requested address

I also got this with my gateway i586 machine (which have two network
interface and kernel build with options GATEWAY and routed is invoked
without any option).  So to suppress it, I told `routed' not to try to
send/recieve RIP through the ppp line by adding following line to the
file /etc/gateways:
	if=ppp0 passive

because my ISP doesn't provides it.  (I also give no_rdisc on this
machine because the routed on it says that `there is no route to
224.0.0.1; yes it's not 224.0.0.2 but 224.0.0.1).

> And pppd doesn't add a default route for me, even though I have
> "defaultroute" in /etc/ppp/options. The same file worked just fine in
> 1.2.

I also got this and apply following patch pppd so that it installs
default route as static:

Index: sys-bsd.c
===================================================================
RCS file: /a/cvsroot/NetBSD/usr.sbin/pppd/sys-bsd.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 sys-bsd.c
--- sys-bsd.c	1996/10/17 14:40:22	1.1.1.4
+++ sys-bsd.c	1996/10/26 10:55:38
@@ -1070,7 +1070,7 @@
 
     memset(&rtmsg, 0, sizeof(rtmsg));
     rtmsg.hdr.rtm_type = cmd == 's'? RTM_ADD: RTM_DELETE;
-    rtmsg.hdr.rtm_flags = RTF_UP | RTF_GATEWAY;
+    rtmsg.hdr.rtm_flags = RTF_UP | RTF_GATEWAY | RTF_STATIC;
     rtmsg.hdr.rtm_version = RTM_VERSION;
     rtmsg.hdr.rtm_seq = ++rtm_seq;
     rtmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK;

I don't read the source of new routed or kernel routing code in detail
yet, so I can't say they are right thing or not...

P.S. all machine I mentioned above are running NetBSD 1.2A.
enami