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 netmask up
    # route add -net netmask eth0
    # route add default gw eth0

    SIOCADDRT: Invalid argument

Can anybody tell me what that should mean ?


Allan Brighton


route add ==> SIOCADDRT: Invalid argument

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

>    # ifconfig eth0 netmask up
>    # route add -net netmask eth0


Quote:>    # route add default gw eth0

>    SIOCADDRT: Invalid argument

You are specifying 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\\  ~~~~ ~   ~ ~    ~ |


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"

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

        #! /bin/sh
        ifconfig lo
        route add -net
        ifconfig eth0
        route add -net dev eth0

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

        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.

 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