# SIOCADDRT: Network is unreachable (solved)

## complexity

When I start net.eth0

 *Quote:*   

> root@gen3:/etc/init.d# ./net.eth0 start
> 
>  * Starting eth0
> 
>  *   Bringing up eth0
> ...

 

I gave the resolv.conf no permission so that it wouldn't be written over when the computer started for a quick fix.

But anyway I can ping use this computer fine, but anyone else connected to the network has no luck.Last edited by complexity on Mon May 29, 2006 9:15 pm; edited 1 time in total

----------

## magic919

You've got an IP address, but the default gateway is on an entirely different subnet and the machine has no route to it.

----------

## complexity

Strange I forgot to mention that this just started happening today. For no apparent reason. So what should I look at to fix it.

----------

## magic919

Have a look at /etc/conf.d/net, perhaps?  It can be completely empty for your set-up, even if that's not the perfect way.

----------

## complexity

2 Lines

config_eth0=( "192.168.0.1 netmask 255.255.255.0" )

routes_eth0=( "default gw 192.168.0.1" )

----------

## janiskr

pleace set something diferent from 192.168.0.1 because thisis your gateway adress and try restarting netowrking through init.d

----------

## troymc

 *complexity wrote:*   

> 
> 
> ```
> root@gen3:/etc/init.d# ./net.eth0 start
> 
> ...

 

Where is it getting that default gateway from?  That is an invalid gateway for a network with a host 66.63.118.241/24.

 *complexity wrote:*   

> 
> 
> I gave the resolv.conf no permission so that it wouldn't be written over when the computer started for a quick fix.
> 
> 

 

What problem were you trying to fix?

 *complexity wrote:*   

> 
> 
> But anyway I can ping use this computer fine, but anyone else connected to the network has no luck.
> 
> 

 

Are you pinging by hostname or IP?

troymc

----------

## janiskr

forgot to add that pleace try to look in /etc/conf.d/net.example for configuration you need, this is well documented file. pleace read.

----------

## complexity

Well...

Before

config_eth0=( "192.168.0.1 netmask 255.255.255.0" )

routes_eth0=( "default gw 192.168.0.1" )

After

config_eth0=( "192.168.0.1 netmask 255.255.255.0" )

routes_eth0=( "default gw 127.0.0.1" )

I changed them lines to that. And now it all works. 

Thanks for all the help, really appreciate it.

----------

## troymc

 *complexity wrote:*   

> 
> 
> routes_eth0=( "default gw 127.0.0.1" )
> 
> 

 

 :Shocked: 

troymc

----------

## UberLord

 *complexity wrote:*   

> 
> 
>  *Quote:*   root@gen3:/etc/init.d# ./net.eth0 start
> 
>  *       Running dhcpcd ...
> ...

 

Duh problem and solution - give root write access to resolv.conf as dhcpcd NEEDS it overwrite it unless given the -R option.

----------

