Date: Tue, 22 Aug 1995 20:52:51 -0400 (EDT) From: John Capo <jc@irbs.com> To: brian@mediacity.com (Brian Litzinger) Cc: freebsd-questions@freebsd.org Subject: Re: A question of routing Message-ID: <199508230052.UAA27490@irbs.irbs.com> In-Reply-To: <199508220005.AAA18383@easy4.easynet.com> from "Brian Litzinger" at Aug 22, 95 00:05:46 am
next in thread | previous in thread | raw e-mail | index | archive | help
Brian Litzinger writes: > > I have a machine with lots of network interfaces: > > ed0, ed1, tun0-15, de0. > > Also, the ed0 interface is aliased to all sorts of IP address while > the rest are all the same IP. > > > ed0 10.0.0.1 and 10.0.0.2 - 10.0.0.79 > ed1 10.0.0.1 > tun0-15 10.0.0.1 > de0 10.0.0.1 > > -net 10.0.1 is reachable via ed1 > -net 10.0.2 is reachable via de0 > various nets on tun0, tun1, etc. > > machine 10.0.1.30 is on the "other side" of ed1 and have several other > nets hooked to it via various interfaces. > > The problem I run into is > > route add -net 10.1.0 -netmask 255.255.255.0 10.0.1.30 > > results in the netstat entry > > 10.1.0.0 10.0.1.30 UG 3 275517 tun0 > > unfortunately, 10.0.1.30 is reachable via ed1 not tun0? > > I am uncertain why tun0 is being selected as the interface via which > 10.0.1.30 is reachable. Pings, telnets, etc, to 10.0.1.30 go via > ed1 just like they are supposed to. > > I suspect it has something to do with tun0 being the last interface to > be (ifconfiged?, routed via?, who knows?) and thus it is being used > as a default in some way. > > Anyone know what this is happening? Is there are way to specify which > interface to use in adding the above route? > I have had the same kind of problem on a machine with ed0 and two PPP interfaces all with .240 netmasks. The kernel is from -current sources around March 30. I run gated on this machine and I have attempted to let gated discover the default route via RIP version 1. The gated log shows the default route being installed via ed0. I haven't looked at the gated code so I assume that gated is printing its notion of the interface that will be used is based on netmasks. The kernel installs the route through ppp0. I though this was a gated/RIP problem but this behaviour can be duplicated with route add commands. I get around it by adding the default route in netstart before gated is started and any ppp interafces are alive. I now have the router pasword and have shut down RIP which can't deal with subnets anyway. John Capo IRBS Engineering
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508230052.UAA27490>