Subject: Routing problem
To: NetBSD Users <>
From: Jukka Marin <>
List: netbsd-users
Date: 07/15/2000 18:39:18

Problems, as always.  NetBSD's route command doesn't allow for specifying
a network interface, only a gateway address.  I'm trying to route a subnet
behind a separate gateway machine (NetBSD), but route always picks the wrong
network interface and things don't work.

Here's the setup:

Internet <---PPP---> <.135 NetBSD1 .135> <---Ethernet--->
<.140 NetBSD2 .193> <--- NetGear ---> <.194 NetBSD3>

This C network has been divided into four subnets, one used by NetBSD1 and
NetBSD2, one used by NetBSD2 and NetBSD3.

When I say

route add -net a.b.c.192 a.b.c.140 -netmask 0xffffffc0

on NetBSD1, it adds the route, but via interface ppp0.  So, when I try to
ping NetBSD3, the packets don't go to local Ethernet and to NetBSD2, but
to ppp link (which is also the default route on NetBSD1).

How can I tell NetBSD to add a route via de0, not ppp0?  This is on
NetBSD 1.4.2 for now.