# Network not working any more

## Diavolo

Hi,

today I rebootet my gentoo machine and now I have no network connection. On booting up I get "udev starting....!!" but the rest seems to work. Later I get an error "Adding routes default gw....!!". Bringing up eth0 seems to work.

ifconfig returns eth0 but without IP address:

eth0 Link encap: Ethernet HWaddr 00:26:54:15:83:1C

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

...

route add returns "SIOCADDRT: No such device".

Any idea?  :Sad: 

----------

## Diavolo

I removed the udev-Error (inotify was missing in my kernel) but the network is not working yet.

Any ideas?

----------

## sethleon

how does your  /etc/conf.d/net look like?

----------

## Diavolo

iface_eth0="192.168.2.2 broadcast 192.168.2.255 netmask 255.255.255.0"

iface_eth1="192.168.2.9 broadcast 192.168.2.255 netmask 255.255.255.0"

routes_eth0=(

   "default via 192.168.2.1"

)

routes_eth1=(

   "default via 192.168.2.1"

)

----------

## sethleon

if you comment out the  routes_* parts,

you should get an IP on your cards,

when you then try to ping your gateway:

```
ping -c 2 -I eth0 192.168.2.1
```

what does it output?

----------

## Diavolo

connect: No such device

----------

## sethleon

so if you leave out the routes_* part

does your ethernet interface an IP?

----------

## Diavolo

No  :Sad: 

Same result...

----------

## sethleon

ok, first what is output when running:

```

[code]ifconfig[/code]

then what is output after running that:

[code]ifconfig eth0 192.168.2.2

ifconfig[/code]

?
```

----------

## Diavolo

No error messages on the console.

After that, my eth0 has an IP, but a ping returns network unreachable...

----------

## Diavolo

Ok,

after route add everything works fine. But I don't know how I solved it...

----------

## sethleon

I just read /etc/conf.d/net.example :

 *Quote:*   

> ##############################################################################
> 
> # INTERFACE HANDLERS
> 
> #
> ...

 

try using those commands, and as modules:

 *Quote:*   

> modules=( "ifconfig" )

 

----------

## Diavolo

Everything works again...but I am afraid to reboot my machine  :Smile: 

----------

## sethleon

if you start:

```
/etc/init.d/net.eth0 start
```

and if it stats without errors, then it will also do while booting (same for eth1)

----------

## metalfan

please check if bash-3.1 was installed. if youre using an ustable baselayout try to downgrade to bash-3.0-r14 for example.

greets

metalfan

----------

