3c905b SIOCADDRT: Invalid argument with route

Antoine Reid fluke@tekdom.qc.ca
Sun Mar 7 03:41:49 1999


On Fri, 5 Mar 1999, Brian D. Winters wrote:

> From: "Brian D. Winters" <brianw@alumni.caltech.edu>
> To: linux-vortex-bug@cesdis1.gsfc.nasa.gov
> Cc: ski@brianski.dyndns.com
> Date: Fri, 5 Mar 1999 19:58:35 -0800
> Subject: Re: 3c905b SIOCADDRT: Invalid argument with route
> 
> On Fri, Mar 05, 1999 at 08:35:25PM -0500, ski@brianski.dyndns.com wrote:
> > router:/etc/init.d# route add-net 192.168.1.0 eth0
> > SIOCADDRT: Invalid argument
> 
> For starters, I believe you need to seperate the "add" and "-net", but
> that may have just been a typo in your e-mail.  Also, when I try this
> on my system it seems to want a netmask.  Try:
> 
>   route add -net 192.168.1.0 netmask 255.255.255.0 eth0
> 
> It seems like at some point it was valid to leave off the netmask and
> it would infer the netmask based on the interface's default, but I may
> be mistaken.  It certainly seems to require it now.
> 
> Brian
> 

And on linux 2.2.x, you have what they call "implicit routes" (if my memory
serves me right).  That is, when you ifconfig an interface, you give it the
complete params:

ifconfig eth0 10.10.10.1 netmask 255.255.255.0 broadcast 10.10.10.255
and the route is added automagically!

just my 0.02$ CDN (not worth much nowadays...)

Antoine Reid / ve2asm 
fluke@tekdom.qc.ca
areid@jonction.net