Subject: Re: illegal network routes and a ponderance
To: Ignatios Souvatzis <>
From: Olaf Seibert <>
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 -netmask 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 -netmask -ifp tlp0 -cloning -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
    route change default -ifp tlp0

tlp0			is the i/f to which my modem is connected		is one of the modem's addresses	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 'Rhialto' Seibert - rhialto@       -- Woe betide the one who feels
\X/  -- remorse without sin - Tom Poes, "Het boze oog", 4444.