route add ==> SIOCADDRT: Invalid argument

route add ==> SIOCADDRT: Invalid argument

Post by Allan Brighto » Sun, 16 Mar 1997 04:00:00



Hi all,

I tried using some lines from the NET-3-HOWTO to configure
a test ethernet between a solaris 2.5.1 machine and a
Linux-2.0.29 box and got the following error message:

    # ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
    # route add -net 192.168.0.0 netmask 255.255.255.0 eth0
    # route add default gw 192.168.1.1 eth0

    SIOCADDRT: Invalid argument

Can anybody tell me what that should mean ?

Thanks,

--
Allan Brighton

 
 
 

route add ==> SIOCADDRT: Invalid argument

Post by B.A.McCau.. » Thu, 27 Mar 1997 04:00:00



>    # ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
>    # route add -net 192.168.0.0 netmask 255.255.255.0 eth0

                              ^
Typo!

Quote:>    # route add default gw 192.168.1.1 eth0

>    SIOCADDRT: Invalid argument

You are specifying 192.168.1.1 as your default gateway but there's not
a route to it.

--

 .  _\\__[oo       from       | Phones: +44 121 471 3789 (home)

.  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
 # ll  l\\  ~~~~ ~   ~ ~    ~ | http://wcl-l.bham.ac.uk/~bam/


 
 
 

1. Getting "SIOCADDRT: Invalid argument" with 'route add' ...?

I'm running a somewhat-upgraded version of Debian 2.1 with
kernel 2.2.6, and I've noticed this worrying message in my
startup sequence.

After some investigation, I've discovered it's occurring
during /etc/init.d/network, specifically, the "route"
command.

This is my /etc/init.d/network file:

        #! /bin/sh
        ifconfig lo 127.0.0.1
        route add -net 127.0.0.0
        ifconfig eth0 192.168.1.2
        route add -net 192.168.1.0 dev eth0

..and each (yes, I get it twice) of the "route add" lines
produces:

        SIOCADDRT: Invalid argument

I've tried issuing the commands manually as well, and
get the same thing.  However, the routing table
does appear to be being updated correctly.  I can
ping loopback, and my computer works fine on my local
mini-LAN via eth0.

This happens if just the loopback is used, as well -- i.e.,
if I remove the last two lines.  (Actually, this
started before I even added the eth0 device to my PC.)

I know this has been happening ever since I upgraded my
kernel to 2.2.6 -- I'm not sure if it happened before, but
I don't think it did...

It doesn't seem to be a serious error, but it worries me,
and I'd like to fix it.

If anyone could shed some light on this, I'd appreciate it.
Thanks...

-----------------------------------------------------------------
 Alex Taylor                  BA - CIS - University of Guelph

-----------------------------------------------------------------

2. linux sparc

3. whoops

4. routing trouble "SIOCADDRT: Invalid argument "

5. setting *.conf to emulate ISP

6. RTNETLINK answers: Invalid argument when adding route... help!

7. USB speedtouch: send path optimization

8. URGENT: route add => SIOCADDRT ?!?

9. SIOCADDRT: Invalid argument...

10. HELP: SIOCADDRT: Invalid argument

11. SIOCADDRT: Invalid Argument

12. SIOCADDRT: Invalid argument