Subject: Re: Routing issue (no route to default host)
To: Alan Barrett <>
From: Thor Lancelot Simon <>
List: tech-net
Date: 02/14/2003 12:48:33
On Fri, Feb 14, 2003 at 07:32:24PM +0200, Alan Barrett wrote:
> On Fri, 14 Feb 2003, Anthony Lieuallen wrote:
> > paranoid:~:root:{506} route add -net 10 -interface
> > add net 10: gateway
> > paranoid:~:root:{507} netstat -f inet -nr
>   [...]
> > Destination    Gateway        Flags     Refs     Use    Mtu Interface
> > 10             link#1         UCS         0        0   1500 ep0
> OK, that's what I would have hoped for.
> > paranoid:~:root:{508} ping
>   [works]
> > paranoid:~:root:{509} route add default
> > writing to routing socket: Network is unreachable
> > add net default: gateway Network is unreachable
> Oh dear.
> Right, the next trick is to give your ep0 interface an alias address in
> the 10.x.x.x network, like this:
> 	ifconfig ep0 inet netmask alias
> 	route add default

That may not work either.  What's going on here is that the network
configuration is inherently illegal, because the "default gateway"
you're being fed isn't on any network they've allocated you an
address on.

There are a number of tricks you can use here; all are foul; some may
actually work.  The simplest and surest is probably to give your
outbound interface an address that's in the network the default
gateway is *actually* in -- use a narrow, narrow subnet mask to
avoid disaster -- and then use a 1:1 NAT mapping that rewrites the
source address in packets you send, and dest address in those you
receive, so that it's the actual address you were allocated.

 Thor Lancelot Simon	                            
   But as he knew no bad language, he had called him all the names of common
 objects that he could think of, and had screamed: "You lamp!  You towel!  You
 plate!" and so on.              --Sigmund Freud