# eth0 does not exist [solved]

## darkhorse220

I am new to Gentoo and am having trouble connecting to the internet. I've read lots of forums and made numerous attempts to get this to work, but no luck.

I'm using gentoo-sources for my kernel. 

ifconfig shows information only about lo (whatever that is). 

My /etc/conf.d/net file contains only one line: config_eth0=( "dhcp")

lsmod shows the module 3c59x

I get trouble when I type in:

/etc/init.d/net.eth0 start

This shows the following:

Starting eth0

Bringing up eth0

dhcp

eth0 does not exist

I don't know what to do about this so any help would be much appreciated.Last edited by darkhorse220 on Fri Jul 15, 2005 9:05 pm; edited 1 time in total

----------

## gentoo_dude

First, lo is the loopback device.  Showing that means that your networking is configure correct.

To see if you have your network card driver (module) in the kernel do

```
 ifconfig eth0
```

If it doesn't show anything then your network card is not recognized by the kernel because:

   a) the driver is not built in the kernel

   b) if the driver was compiled as a module and it was not loaded

If you see a device under eth0 when you do ifconfig eth0 then you need to get an IP it using dhcp

Do the command

```
 dhcpcd eth0 
```

After the command finished, try ifconfig again, and see if you got an ip from your dhcp server.

----------

## gentoo_dude

To have your card start at boot modify your /etc/conf.d/net file to reflect the following:

```
 iface_eth0="dhcp" 
```

Then add the net.eth0 to default runlevel

```
rc-update add net.eth0 default 
```

----------

## darkhorse220

ifconfig eth0 gives me this:

eth0: error fetching interface information: Device not found

Could you elaborate on what you advised me to do if I got this result? Because like I said, I'm kind of new to this. 

I did change my /etc/conf.d/net file to read: iface_eth0="dhcp"

I also already had net.eth0 at default. I rebooted but nothing seemed to change.

----------

## darkhorse220

ifconfig eth0 seems to work fine when I run it off the CD. It just disappears when I work without it. Does anyone know what's to be done if this happens?

----------

## Slavo

can you boot into livecd and post the output of

# lsmod

?

----------

## darkhorse220

This is the output of lsmod from the CD:

```

floppy                 44912      0

rtc                     8488      0

ata_piix                5972      0

evdev                   6368      0

e100                   24496      0

mii                     2352      1 e100

parport_pc             27876      0

parport                22088      1 parport_pc

ahci                    7604      0

sata_qstor              6100      0

sata_uli                4368      0

sata_sis                4240      0

sata_sx4                9716      0

sata_nv                 5620      0

sata_via                5364      0

sata_svw                4596      0

sata_sil                5620      0

sata_promise            6900      0

libata                 27700      11 ata_piix,ahci,sata_qstor,sata_uli,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil,sata_pro

mise

dm_mirror              15320      0

dm_mod                 38080      1 dm_mirror

sbp2                   16920      0

ohci1394               25812      0

ieee1394               59704      2 sbp2,ohci1394

s1811_hcd               9392      0

ohci_hcd               15384      0

uhci_hcd               23936      0

usb_storage            47680      0

usbhid                 25696      0

ehci_hcd               22872      0

usbcore                75064      7 s1811_hcd,ohci_hcd,uhci_hcd,usb_storage,usbhid,ehci_hcd

```

Last edited by darkhorse220 on Thu Jul 14, 2005 11:00 pm; edited 2 times in total

----------

## stickboy2642

What that means is that you do not have the right ethernet card driver compiled into the kernel or as a module.  What kind of ethernet card do you have?  If your card is a 3com card, then the 3c59x module should work.  Looking at the output of the lsmod from the livecd, it looks like you have an Intel  card which uses the e100 module.  You should be able to go into your kernel configuration and select the e100 module to get it to work.

```

Device Drivers ---> Networking Support ---> Ethernet (10 or 100MBit) --->[M] Intel(R) PRO/100+ support

```

Once you have the new modules built, you should be able to type modprobe e100 to load the module.  You should then be able to see eth0 when typing ifconfig.

To get the module to load at startup, type:

```

echo e100 >> /etc/modules.autoload/kernel-2.6

```

Then you should be able to type dhcpcd eth0 and get an IP address.  If this works, proceed with setting up your network via /etc/conf.d/net.eth0.

----------

## darkhorse220

Wow! It's alive!

Thanks a lot. I had grey hairs coming out of unspeakable places because of this. Thanks!

----------

## pieterprovoost

 *Quote:*   

> 
> 
> you do not have the right ethernet card driver compiled into the kernel or as a module
> 
> 

 

Could you elaborate a little bit on that? I think I have the same problem but I don't know how to solve it. Networking worked fine with the CD, but after reboot "eth0 does not exist" while I followed the instructions very precisely. I have HP Pavilion ze4318EA notebook (http://www.portalis.it/tenutamontescosso/hp_ze4318ea_fc1.html).

Thanks in advance!

----------

## the_mgt

According to that link, you have the:

```
 0:12.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller 
```

and therefore choose the :

```
  National Semiconductor DP8381x series PCI Ethernet support 
```

card in your kernel configuration.

In the kernel directory, type "make menuconfig" and go to:

```
Networking support  --->   Ethernet (10 or 100Mbit)
```

 and then activate your card.

Look into a howto, if you never compiled a kernel before. (But i guess you did...)

----------

## Brosto

Hello,

I'm having some of the same issues.  I'm able to get internet from the livecd, however eth0 is not recognized on reboot.  I've tried all the suggestions but have had no luck.

Here is the list I get from lsmod:

livecd ~ # lsmod

Module                  Size  Used by

ipv6                  170912  12

eth1394                12548  0

sg                     19484  0

8139too                15872  0

mii                     3968  1 8139too

forcedeth              28676  0

rtc                     7476  0

tg3                    88324  0

e1000                  90432  0

nfs                    85180  0

lockd                  41352  1 nfs

sunrpc                 99644  2 nfs,lockd

jfs                   143340  0

dm_mirror              13008  0

dm_mod                 31896  1 dm_mirror

pdc_adma                4868  0

sata_mv                11656  0

ata_piix                8072  0

ahci                   11268  0

sata_qstor              4996  0

sata_vsc                4100  0

sata_uli                3204  0

sata_sis                3844  0

sata_sx4                8452  0

sata_nv                 4740  0

sata_via                4868  0

sata_svw                3844  0

sata_sil24              8708  0

sata_sil                5384  0

sata_promise            6276  0

libata                 61460  15 pdc_adma,sata_mv,ata_piix,ahci,sata_qstor,sata_                         vsc,sata_uli,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil24,sata_sil,sat                         a_promise

sbp2                   15364  0

ohci1394               24880  0

ieee1394               53176  3 eth1394,sbp2,ohci1394

sl811_hcd               8320  0

usbhid                 29792  0

ohci_hcd               13572  0

uhci_hcd               15240  0

usb_storage            57280  0

ehci_hcd               19976  0

usbcore                78084  7 sl811_hcd,usbhid,ohci_hcd,uhci_hcd,usb_storage,e                         hci_hcd

livecd ~ #

and lspci:

00:00.0 Host bridge: nVidia Corporation nForce3 250Gb Host Bridge (rev a1)

00:01.0 ISA bridge: nVidia Corporation nForce3 250Gb LPC Bridge (rev a2)

00:01.1 SMBus: nVidia Corporation nForce 250Gb PCI System Management (rev a1)

00:02.0 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)

00:02.1 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)

00:02.2 USB Controller: nVidia Corporation nForce3 EHCI USB 2.0 Controller (rev a2)

00:05.0 Bridge: nVidia Corporation CK8S Ethernet Controller (rev a2)

00:06.0 Multimedia audio controller: nVidia Corporation nForce3 250Gb AC'97 Audio Controller (rev a1)

00:08.0 IDE interface: nVidia Corporation CK8S Parallel ATA Controller (v2.5) (rev a2)

00:0a.0 IDE interface: nVidia Corporation CK8S Serial ATA Controller (v2.5) (rev a2)

00:0b.0 PCI bridge: nVidia Corporation nForce3 250Gb AGP Host to PCI Bridge (rev a2)

00:0e.0 PCI bridge: nVidia Corporation nForce3 250Gb PCI-to-PCI Bridge (rev a2)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:00.0 VGA compatible controller: nVidia Corporation NV40 [GeForce 6800 GT] (rev a1)

02:09.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10)

02:0b.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 80)

02:0c.0 Mass storage controller: Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller (rev 02)

I've tried both enableing forcedeth and e1000 as modules and built into the kernel itself.  When connected on the live cd, ifconfig gives the following output:

livecd ~ # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:E0:18:99:88:77

          inet addr:192.168.1.104  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::2e0:18ff:fe99:8877/64 Scope:Link

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:26198 (25.5 Kb)  TX bytes:18938 (18.4 Kb)

          Interrupt:17 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:50:BA:60:29:66

          UP 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:21 Base address:0xac00

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  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:0

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

I would be happy to have either of my network cards working, but so far I have had no such luck.  Please point me in the correct direction.

Thanks!

----------

## tylerd75

Well, the procedure is mentioned above, only you've got 2 ethernet controllers...

When you have booted the live-cd, you can try (if ethtool is installed) to identify the driver for each interface:

```
# ethtool -i eth0 && ethtool -i eth1

```

The above command should return the drivermodule associated with each interface.

It will probably show rtl8139 and another for the other interface.

Then boot up as usual, and check if you can load the drivers:

```
# modprobe rtl8139
```

If the rtl8139 driver fails to load, try the other driver reported by ethtool.

If both fails to load, you need to recompile the kernel with both the drivers as modules (or included in the kernel).

(make menuconfig etc...)

On the other hand, if the module loading succeeds, all you have to do is to make them autoload at boot:

```
echo rtl8139 >> etc/modules.autoload.d/kernel-2.6 && echo <the_other_driver> >> /etc/modules.auto........
```

If you installed Gentoo from the live CD, I assume the modules are already compiled and ready to load (LiveCDs are nice that way...usually).  

So my guess is you don't have to recompile the kernel...

----------

## Brosto

Thanks for the reply.

Part of my problem was I had my grub.conf pointed at a previous kernel I was attempting to use.

I was finally able to get the both 8319too and e1000 loaded as modules, however they are not showing up in ifconfig as eth0.  I do however get a responce from eth1 and eth2, but I recieved some kind of mesage telling me they are not activated (or something like that...sorry I'm not in front of that computer right now.)   How can I start eth1 or eth2?

Unfornetly I'm at work and will have to wait until tonight before I get to play around with this some more.

I found a bit large thread (https://forums.gentoo.org/viewtopic-t-332982.html) that had several more useful tips.  I'm glad that I'm not the only one that's run into this problem.  

Thanks for anymore advice you can give.  I'm looking forward to fixing this issue later on tonight.

----------

## tylerd75

You can usually start eth1 and eth2 by typing:

```
# /etc/init.d/net.eth1 start && /etc/init.d/net.eth2 start
```

But this means you need to configure them first (unless that is already done...).

Try editing /etc/conf.d/net , and see if you have entries like this:

```
config_eth1=( "10.0.0.2 netmask 255.255.255.0" )

config_eth2=( "dhcp" )
```

If you have a dhcp server available then the latter line should be sufficient (ifconfig_ethX=("dhcp") ).

But in addition you need to create two symlinks to /etc/init.d/net.lo called net.eth1 and net.eth2.

```
# cd /etc/init.d/ && ln -s net.lo net.eth1 && ln -s net.lo net.eth2 
```

After this you can use the first code example to start/restart/stop the interfaces.

(It is also possible to rename your interfaces, but it might be that you have some firewire device or a wifi card that has reserved the name eth0, so unless you have a good reason I'd stick with eth1 and eth2.)

To autostart them everytime you boot up:

```
# rc-update add net.eth1 default && rc-update add net.eth2 default
```

PS!  You can temporarily configure your interfaces with ifconfig (but the config will be reset when rebooting):

```
# ifconfig eth1 10.0.0.2 netmask 255.255.255.0 up 
```

If you do it this way, you might have to setup a route to access internet too:

```
# route add default gw 10.0.0.1
```

----------

## Brosto

I stopped by my house at lunch and gave your suggestions a try.  I was finally able to get online!!

Thanks very much for your help.

----------

