# (solved) SIOCADDRT: Network is unreachable

## Fenster

This has cropped up since I rebooted after my last "emerge -uD world". I was somewhat suprised to find that /etc/conf.d/net was completely changed, so I set about updating my configuration. 

Right now, it can't seem to detect my router - other posts on this problem basically point to the same thing and solutions are offered there. However, all those posts are much older, before the configuration was changed. 

```
# /etc/conf.d/net:

hotplug_eth0="yes"

modules_eth0=( "ifconfig" )

config_eth0=( "192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.254" )

routes_eth0=( "default via 192.168.0.254" )
```

"/etc/init.d/net.eth0 (re)start" returns "SIOCADDRT: Network in unreachable" on the last line, when it tries to set my gateway. 

I'd put it down to being a kernel config issue, but my kernel config hasn't been changed, and works perfectly for me.

```
eth0      Link encap:Ethernet  HWaddr 00:09:5B:E3:8D:FE  

          inet addr:192.168.0.1  Bcast:192.168.0.254  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:721 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:44734 (43.6 Kb)  TX bytes:0 (0.0 b)

          Interrupt:10 

eth1      Link encap:Ethernet  HWaddr 00:0B:6A:2B:CE:D0  

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

          Interrupt:11 Base address:0xbc00 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:32 errors:0 dropped:0 overruns:0 frame:0

          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:1600 (1.5 Kb)  TX bytes:1600 (1.5 Kb)
```

eth1 is the old onboard ethernet adaptor which died some time back. Its not used. 

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

192.168.0.0     *               255.255.255.0   U         0 0          0 eth0

loopback        *               255.0.0.0       U         0 0          0 lo
```

Netstat shows no route to the gateway.

EDIT: Solved this myself. I had my broadcast IP set to the same as my gateway. I changed it and it works great now.

----------

## _savage

Hey...  looks like I have a similar problem (thread).  Shouldn't the broadcast address etc be set by the dhcp server?

----------

## Baer

*hehe* Same problem here...

double checking sometimes helps.  :Laughing: 

Regs

  Rob

----------

