# how do I install a network card

## Tigurius

I'm sorry for asking such a basic question but I can't seem to find any straightforward explanation.  I'm trying to connect to the internet but I've got no eth0 interface.  I type "ifconfig eth0" and it comes up with "eth0:error fetching interface information: Device not found" . I assume this is because I don't have the device installed. How would I go about doing this?

Thanks,

Tig

----------

## acasto

Check to see if the module in running : 

```
# lsmod
```

If not insert the module : 

```
# modprobe "module"
```

Check dmesg output to see that it loaded : 

```
# dmesg
```

You can also check the # dmesg out put to begin with to see what networking is doing to begin with.

Then just set up your networking information in /etc/conf.d/net

- Adam

----------

## Tigurius

Ok I went into lsmod and it's not there. How do I know which module to put in? Is there a list somewhere?

I've got debian on the other partition and when I type lspci this comes up for ethernet controller

"VIA Technologies, Inc. VT6105 [Rhine-III]"

Tig

update: I rebuilt the kernel with via-rhine support but that didn't help.  When it boots it tries to bring eth0 up: "Bringing eth0 up via DHCP" but it has a problem doing this: "Problem starting needed services. "netmount" was not started""

----------

## srlinuxx

please run rc-update -s and see if it's listed.  you don't really need it unless you use nfs, but I guess it don't hurt anything to run it.  if it's not listed just rc-update add netmount default.  

did you build support for into the kernel or as a module?  if it's a module, please put via-rhine into your /etc/modules.autoload/kernel-<version> file.  

try that, and post relevant portion of logs if it still don't work.

----------

## Tigurius

I put via-rhine into the kernel but eth0 still doesn't show up. What log files would you need to see to determine the problem?

Tig

----------

## srlinuxx

/var/log/messages is a good place to start.  after boot and login you can type dmesg and possibly see what the problem is.

----------

## Tigurius

I couldn't find a /var/log/messages and i went through dmesg and didn't see any errors, is there something I need to do after compiling the driver into the kernel to enable eth0 or will it load at boot if the right driver is loaded?

Tig

----------

## srlinuxx

did you see where it was detected?  

is it on-board and if so, is it enabled in the bios?  

what does cat /proc/pci say?  

you did say you built into the kernel and not as a module right?

how about ifconfig eth0?

usually one really only needs to load the module or make sure support is in the kernel and ifconfig eth0 up or in gentoo you set up your /etc/conf.d/net.  This is the only line in mine:   iface_eth0="dhcp"   but some require something similar to this:  gateway="eth0/192.168.0.6"  we'll worry about actually connecting once we see it's detected I reckon.

----------

## Sith_Happens

Instead of doing cat /proc/pci, do cat /proc/pci | grep Ethernet, it'll make it easier on my eyes  :Smile:  .  When it comes to network cards, it's usually sufficient to use the in kernel support for your network card, either compiling the driver in or having it loaded as an externel module.  All of this can be done from the kernel configuration.  After doing cat /proc/pci | grep Ethernet, look in the menuconfig under device drivers -> network support -> ethernet (whatever speed matches your card), and find the right driver.  Then just recompile and install your kernel, and your done.  :Smile:   After rebooting you should have a working network connection on eth0, granted all you were missing was the NIC driver.

----------

## Tigurius

I didn't see anywhere  in dmesg that said anything about eth0.

It's a Dlink pci card, a DFE-530TX.

cat /proc/pci | grep Ethernet says:

"Ethernet controller: VIA Technologies, Inc. VT6105 [Rhine-III] (rev 134).

In menuconfig "VIA Rhine support" is built-in.

Is there anything else that needs to be built in to enable the network?

The only thing in /etc/conf.d/net is "iface_eth0="dhcp"

Typing "ifconfig eth0" comes up with this :

"eth0: error fetching interface information: Device not found"

I hope that helps.

Tig

----------

## srlinuxx

yeah, come to think of it, I guess those thing get detected before the logs kick in.  what do you see during boot up?

ya know, it'd be easier to troubleshoot if the drivers were built as modules.   :Very Happy: 

I got this friend who has to disable apic in his bios before his nics are recognized.  one computer has a via-rhine and the other is a realtek.  one has a sis and the other has a via chipset.   you might look at that.

----------

## Sith_Happens

With syslog-ng at least the output of /proc/kmsg prior to the start of syslog-ng gets back logged to where you have configured kernel messages to go, usually /var/log/messages.

----------

## Tigurius

K putting the module via-rhine into the kernel as a module worked. I've got eth0 but I've still not got any connection with it. If I try and use anything to connect to the internet, it says Temporary failure in name resolution.

Tig

----------

## comprookie2000

It's a Dlink pci card, a DFE-530TX.

I have that card it works great the module is 8139too

```

modprobe 8139t00

ifconfig eth0 <see if it shows up>

dhcpcd eth0 <if you use dhcp>

ping www.google.com -c 3 <good luck>
```

----------

## srlinuxx

hopefully, that's an easy one.  put a nameserver usually provided by your isp in your /etc/resolv.conf file like so and see if it helps:

```

nameserver 192.168.0.6

search tuxmachines.org

domain tuxmachines.org

```

----------

## Sith_Happens

If it says "temporary failure in name resolution" then your network problem is no longer a hardware problem, it's a problem with your nameservers.  It could also be a problem with your firewall if you have one.  Make sure you have outgoing connections on port 53.

----------

## Tigurius

Excellent, it's all working great, thank you for all your help guys. It's very much appreciated.

Tig

----------

## Catro

hi, i got the same card and got the same problem.

i tried

modprobe 8139t00 (and oo)

but the reply i get is:

FATAL: Module 8139t00 not found

seems i havn't installed the module jet, but where can i find it in the menuconfig?

another question, its enough to type "make modules_install" to install those modules added just before in the menuconfig, right?

edit: ah, everything works fine....

but there is a question left. i typed "make modules_install" but that doesnt helped, after i recompiled the kernel using "make && make modules_install" everything works fine. why did that happen?

----------

