Subject: Re: illegal network routes and a ponderance
To: Ignatios Souvatzis <is@netbsd.org>
From: Olaf Seibert <rhialto@polderland.nl>
List: tech-net
Date: 03/14/2003 22:01:22
On Wed 19 Feb 2003 at 20:54:30 +0100, Ignatios Souvatzis wrote:
> Well, it doesn't work, but
>
> route add -net 4.3.2.0 -netmask 255.255.255.248 eth0 -iface
>
> worked.
I am using the following for my weird setup (with an ADSL modem/router
which owns my IP address but I still want to have the same address on my
own outgoing interface. This is with 1.6; 1.5.2 required some variation.
There seem to be some checks here and there for reachability which only
use the current interface addresses and don't take routes into account,
or something like that.
route add -net 192.168.0.1 -netmask 255.255.255.0 -ifp tlp0 -cloning azenomei.xs.falu.nl -interface
# ^^ (error checking in the route adding code (sys/net/rtsock.c,
# route_output, case RTM_ADD) insists on having a gateway (so we add a
# "random" one) (1.5.x wants an address on one of the subnets of the
# interface). Adding -interface cancels its presence again... The use of
# a host address for the -net option does not matter since the netmask is
# applied to it.
route add default 10.0.0.200
route change default 192.168.0.1 -ifp tlp0
tlp0 is the i/f to which my modem is connected
192.168.0.1 is one of the modem's addresses
azenomei.xs.falu.nl is (a private name for) my external address
So the big hints is I suppose that with "route change" you can create
things that won't work if you try to set them in one step.
-Olaf.
--
___ Olaf 'Rhialto' Seibert - rhialto@ -- Woe betide the one who feels
\X/ polderland.nl -- remorse without sin - Tom Poes, "Het boze oog", 4444.