# bringing up eth0 problem

## chr1z

when i boot i only get 

bringing up lo ...  [ok]

i did and etc-update and all my etc config files seem to be broken  :Sad: 

i edited the /etc/conf.d/net

and /etc/resolv.conf

everything worked fine before but now eth0 is not starting automatically

the proper module is also in /etc//modules.autoload

any suggestion?

it is strange because i don't get a failed to bring up eth0..

----------

## Naan Yaar

May not be in the default runlevel.  Try:

```

rc-update add net.eth0 default

```

----------

## chr1z

i already did that

does not help

it says that it is already in default runlevel

i think the net.eth0 file is broken or something like that

can i recreate it ?

----------

## Naan Yaar

A safe way to recover net.eth0 is:

```

ebuild unpack /usr/portage/sys-apps/baselayout/baselayout-1.7.9-r1.ebuild

cd /var/tmp/portage/baselayout-1.7.9-r1/work/rc-scripts-1.3.5/init.d

cp net.eth0 /etc/init.d

```

Substitute your version of baselayout above.

----------

## chr1z

ok that helped me to bring eth0 up again

but i still can't browse any website   :Crying or Very sad: 

something is still wrong

any ideas? 

i added the correct nameserver ip to resolv.conf

i can't ping www.gentoo.org or any other site

----------

## rac

Make sure the gateway line in /etc/conf.d/net is set up correctly.

----------

## chr1z

the gateway line IS set up correctly

but when i try the following

```

route add net default gw 192.168.168.230

```

i get this output

net: host name lookup failure

my hostname is set up correctly in /etc/hostname

----------

## Naan Yaar

The syntax is "-net" rather than "net" below.  Hence the error.  What are the contents of your /etc/conf.d/net file?

Can you ping a host by IP?  For example, what does pinging the IP (www.gentoo.org) below give you:

```

ping 64.57.168.198

```

 *chr1z wrote:*   

> ...
> 
> ```
> 
> route add net default gw 192.168.168.230
> ...

 

----------

## chr1z

my conf.d/net file

```

# This is basically the ifconfig argument without the ifconfig $iface

#

iface_eth0="192.168.168.1 broadcast 192.168.168.255 netmask 255.255.255.0"

#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"

# For passing options to dhcpcd use dhcpcd_eth?

#

#iface_eth0="dhcp"

#dhcpcd_eth0="..."

# For adding aliases to a interface

#

#alias_eth0="192.168.0.3 192.168.0.4"

# NB:  The next is only used for aliases.

#

# To add a custom netmask/broadcast address to created aliases,

# uncomment and change accordingly.

#

#broadcast_eth0="192.168.0.255"

#netmask_eth0="255.255.255.0"

# For setting the default gateway

#

gateway="eth0/192.168.168.230"

```

and the ping statistics:

```

--- 64.57.168.198 ping statistics ---

21 packets transmitted, 21 packets received, 0% packet loss

round-trip min/avg/max = 242.2/576.7/1273.5 ms

```

[/quote]

----------

## rac

You said you added the correct nameserver to /etc/resolv.conf, but is there a chance that there's a typo in there?  It sure looks like a resolver problem now.

----------

## chr1z

my resolv.conf contains only this ip

194.25.2.129

which is the correct nameserver for my isp

still i can't browse anywebsite or find any host  :Sad: 

----------

## rac

 *chr1z wrote:*   

> my resolv.conf contains only this ip
> 
> 194.25.2.129

 

Does it just have that line exactly, or does it say:

```
nameserver 194.25.2.129
```

----------

## chr1z

 :Rolling Eyes:   ok i am stupid ...

nameserver was missing lol   :Wink: 

----------

