Re: [gentoo-user] SIOCADDRT: No such device

2005-12-21 Thread Ryan Viljoen
> Your /etc/conf.d/net is broken in this regard. Read the example
> (net.example) for correct syntax.

I used the net.example for my /etc/conf.d/net

>It's probably using /sbin/ip, thus
> different syntax from /sbin/route.

Specifying the following works:

config_eth0=( "192.168.4.128/24" )
routes_eth0=(  "default via 192.168.4.1" )

When using DHCP and the fallback option, setting the gateway fails. I
then have to use route add default gw 192.168.4.1 to set it manually
(thanks HWH).

config_eth0=( "dhcp" )
dhcpcd_eth0="-t 3 -h raviljmobile"

fallback_eth0=( "192.168.4.128 netmask 255.255.255.0" )
fallback_route_eth0=( "default via 192.168.4.1" )

--
Ryan Viljoen Bsc(Eng) (Electrical)

"When you say "I wrote a program that crashed Windows", people just
stare at you blankly and say "Hey, I got those with the system, for
free". - Linus Torvalds, 1995

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] SIOCADDRT: No such device

2005-12-21 Thread Ryan Viljoen
On 12/21/05, Michael Kjorling <[EMAIL PROTECTED]> wrote:
> On 2005-12-21 21:50 +0200, [EMAIL PROTECTED] wrote:
> > - ziig conf.d # route add 192.168.4.1
> > - SIOCADDRT: No such device
>
> Do you mean to do "route add -net default gw 192.168.4.1"?
>

oops, ok ignore the route commands there. Its the fallback route that
is not working correctly. Here is what is in my /etc/conf.d/net

fallback_eth0=( "192.168.4.128 netmask 255.255.255.0" )
fallback_route_eth0=( "default via 192.168.4.1" )

--
Ryan Viljoen Bsc(Eng) (Electrical)

"When you say "I wrote a program that crashed Windows", people just
stare at you blankly and say "Hey, I got those with the system, for
free". - Linus Torvalds, 1995

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] SIOCADDRT: No such device

2005-12-21 Thread Hans-Werner Hilse
Hi,

On Wed, 21 Dec 2005 21:50:05 +0200
Ryan Viljoen <[EMAIL PROTECTED]> wrote:

> -  *   Adding routes
> -  * default ...
> -  * via ...
> - gw: Unknown host
> -  * 192.168.4.1 ...

Your /etc/conf.d/net is broken in this regard. Read the example
(net.example) for correct syntax. It's probably using /sbin/ip, thus
different syntax from /sbin/route.

> Okay I tried the following:
> 
> - ziig conf.d # route add 192.168.4.1
> - SIOCADDRT: No such device

Well, you should tell where you want your route going to...

> This however did not give an error:
> 
> - ziig conf.d # route add 192.168.4.1 gw 192.168.4.1

But should not be needed as 192.168.0.0/255.255.255.0 should
automatically route through dev eth0 after ifconfig.

Hint: What you maybe want to issue is "route add default gw
192.168.4.1" or "ip route add default via 192.168.4.1"? This should
route all non-local traffic through that machine.

-hwh
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] SIOCADDRT: No such device

2005-12-21 Thread Michael Kjorling
On 2005-12-21 21:50 +0200, [EMAIL PROTECTED] wrote:
> - ziig conf.d # route add 192.168.4.1
> - SIOCADDRT: No such device

Do you mean to do "route add -net default gw 192.168.4.1"?
 
-- 
Michael Kjörling, [EMAIL PROTECTED] - http://michael.kjorling.com/
* ASCII Ribbon Campaign: Against HTML Mail, Proprietary Attachments *
* . No bird soars too high if he soars with his own wings . *


pgp97atP7Vehb.pgp
Description: PGP signature


[gentoo-user] SIOCADDRT: No such device

2005-12-21 Thread Ryan Viljoen
Ok here is my problem, I am unable to set the default route and gateway:

- ziig etc # /etc/init.d/net.eth0 restart
-  * Unmounting network filesystems ...
-  * samba -> stop: smbd ...
-  * samba -> stop: nmbd ...
-  * Stopping sshd ...
-  * Stopping eth0
-  *   Bringing down eth0
-  * Shutting down eth0 ...
-  * Starting eth0
-  *   Bringing up eth0
-  * dhcp
-  *   Running dhcpcd ...
-  * Trying fallback configuration
-  * 192.168.4.128
-  *   Adding routes
-  * default ...
-  * via ...
- gw: Unknown host
-  * 192.168.4.1 ...
- SIOCADDRT: Invalid argument
-  * Mounting network filesystems ...
-  * samba -> start: smbd ...
-  * samba -> start: nmbd ...
-  * Starting sshd ...

Here is the result of ifconfig:

- ziig / # ifconfig
- eth0  Link encap:Ethernet  HWaddr 00:03:0D:19:93:5D
-   inet addr:192.168.4.128  Bcast:192.168.4.255  Mask:255.255.255.0
-   UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
-   RX packets:1158 errors:0 dropped:0 overruns:0 frame:0
-   TX packets:15753 errors:0 dropped:0 overruns:0 carrier:0
-   collisions:0 txqueuelen:1000
-   RX bytes:133926 (130.7 Kb)  TX bytes:2023411 (1.9 Mb)
-
- loLink encap:Local Loopback
-   inet addr:127.0.0.1  Mask:255.0.0.0
-   UP LOOPBACK RUNNING  MTU:16436  Metric:1
-   RX packets:12819 errors:0 dropped:0 overruns:0 frame:0
-   TX packets:12819 errors:0 dropped:0 overruns:0 carrier:0
-   collisions:0 txqueuelen:0
-   RX bytes:968646 (945.9 Kb)  TX bytes:968646 (945.9 Kb)
-
- ziig / #

Okay I tried the following:

- ziig conf.d # route add 192.168.4.1
- SIOCADDRT: No such device

This however did not give an error:

- ziig conf.d # route add 192.168.4.1 gw 192.168.4.1

I can quite happily ping 192.168.4.1. Any ideas?

--
Ryan Viljoen Bsc(Eng) (Electrical)

"When you say "I wrote a program that crashed Windows", people just
stare at you blankly and say "Hey, I got those with the system, for
free". - Linus Torvalds, 1995

-- 
gentoo-user@gentoo.org mailing list