# 8139too

## jemmyw

I have a realtek card that uses the mii and 8139too modules. It worked fine from the setup CD, but it does not work from my installation. The modules are compiled, and they seem to load fine. I can bring up eth0, with all the IP settings, but from there the card does not seem to be working. I cannot ping any of the other computer on the network, and DHCP will not work. As I mentioned the card works fine when booting from the setup CD and from Windows.

/proc/modules

8139too                       14560       1

mii                              1136         0 [8139too]

ifconfig

eth0     Link encap:Ethernet    HWaddr 00:40:F4:41:8C:37

           inet addr:192.168.0.9  Bcast:192.168.0.255 Mask:255.255.255.0

...

----------

## format c:

It looks good. Do you have a gateway? Set ist up.

route add default gw ip_off_the_gateway eth0

Do you edit your /etc/resolv.conf ?

domain your_domain_name 

nameserver ip_of_nameserver_1

nameserver ip_of_nameserver_2

Maybe that's it.

----------

## jemmyw

no i can't *ping* the gateway, nor can i ping any other computer on the network. I've tried connecting to them in several ways (in case it was just ping not working). The TX and RX things in ifconfig stay at 0

----------

## thor

hi 

>[...] The modules are compiled, and they seem to load fine [...]

what does a 'modprobe 8139too' and did you put it in your '/etc/modules.autoload' ...?

if you`ve done it already, plz ignore ...

----------

## jemmyw

I have put the module into autoload (and taken it out so that i could play around with it manually). modprobe 8139too seems to load the module, there are no errors. I can then ifconfig eth0 up ip_addr and this works. I can't unload the module while eth0 is up because it errors with device being busy, so the module in communicating with the card. I just can't understand why the card cannot communicate with the network when it has no problem after booting to the installation CD. There is no obvious reason except that maybe the driver provided with the downloaded gentoo kernel is faulty with this card, and the driver on the installation cd is not. Perhaps I am missing something in the kernel make config thing, but I have played around with the various options for that driver to no avail.

----------

## format c:

Is your /etc/hosts proper? Here's a extract of my:

127.0.0.1       localhost

192.168.1.52    joy.fun  joy

192.168.1.149    happy.fun  happy   # gateway

192.168.1.53    hardy.fun  hardy

----------

## rac

Are you using iptables?  Could a rogue filter be eating packets?

----------

## Sequentious

You said dhcp does not work. Is this after you do this command?

```
ifconfig eth0 up ip_addr
```

If so, dont use ifconfig, just do

```
dhcpcd eth0
```

That should bring up your interface if you are indeed using dhcp. If you are on an ISP that wants a specific hostname, use

```
dhcpcd eth0 -h your_host_name
```

although I get the feeling that you are on an internal network.

Personally, I compiled the 8139 driver into the kernel. I can't see a reason for needing my NIC completely disabled.

----------

## flying_monkey

Compiled into the kernel?  

Now that's interesting.  I know that it's what the install guide says to do, but when I do that, I see some kind of error about not being able to find the 8139too driver, and the net won't come up when I do dhcpcd eth0.  Only way I can get it to work is to have it as a module, then after I boot and login, it tells me it can't find the network.  I then modprobe 8139too, and that works OK, and I see UP and RUNNING when I run the command that the install guide gives to check it (at work, don't have access to it).  I then dhcpcd eth0, and it says that dhcpcd is already running, delete some file if that's not true.  I delete that file, and dhcpcd eth0 again, and everything's good.  I've been told in another thread that part of this is probably due to a problem in autoload.conf, or something like that, but I haven't gotten around to checking that.  Otherwise, my problem and jemmyw's problem could be exactly the same.  I know my brute force methods are not perfect, but I can get it to work that way.  I'd suggest that jemmyw try that.

Any help?

Ed

----------

## Sequentious

 *ewinches wrote:*   

> Compiled into the kernel?  
> 
> Now that's interesting.  I know that it's what the install guide says to do, but when I do that, I see some kind of error about not being able to find the 8139too driver, and the net won't come up when I do dhcpcd eth0.  Only way I can get it to work is to have it as a module, then after I boot and login, it tells me it can't find the network.  I then modprobe 8139too, and that works OK, and I see UP and RUNNING when I run the command that the install guide gives to check it (at work, don't have access to it).  I then dhcpcd eth0, and it says that dhcpcd is already running, delete some file if that's not true.  I delete that file, and dhcpcd eth0 again, and everything's good.  I've been told in another thread that part of this is probably due to a problem in autoload.conf, or something like that, but I haven't gotten around to checking that.  Otherwise, my problem and jemmyw's problem could be exactly the same.  I know my brute force methods are not perfect, but I can get it to work that way.  I'd suggest that jemmyw try that.
> 
> Any help?
> ...

 If you compiled it into the kernel, you dont have to try to load it, it is always loaded. The only module I have is NVdriver, and thats because it can only be a module.

----------

## jemmyw

I have tried compiling into the kernel, and having it load as a module. I also know I'm getting the ifconfig and dhcpcd commands right (I've got another computer here running Gentoo and it works just fine). The comment about iptables was interesting though, and I shall have a look at that possibility.

----------

## pjp

 *jemmyw wrote:*   

> okay, the only difference i can find between the installtion cd and my installed gentoo is that the IRQ for the network card is different. It's 10 under the CD and 17 from the HD. So perhaps it is causing a conflict? Is there anyway I can change the IRQ?

 

Accidentally posted as a new topic.  Quoting it here to remove it.

----------

## jemmyw

okay, i moved the card to a different slot, and that changed the IRQ. Still doesn't work. The next stage I guess is to try a different card, although that seems wrong as this card *works* from the install CD and windows without any problem at all. The sensible conclusion is that it's not the card or the modules causing the problem but something else in my installation. I just don't know what it could be.

I'm not compiling iptables with the kernel, so that wasnt the problem.

----------

## jemmyw

okay. Well heres something interesting. if i set this machines ip address to the same as another machine on the network then the other machine detects the conflicting ip address. so the card seems to be working sort of. I just cannot communicate with the network.

I really am very confused... help!

----------

## rac

What does "route" say?  Can you ping localhost?

----------

## jemmyw

I can ping localhost, and 192.168.0.100 (the ip address i've set the machine to be)

route -n

Kernel IP routing table

Destination          Gateway       Genmask   ...      Iface

192.168.0.0         0.0.0.0          255.255.255.0     eth0

0.0.0.0                192.168.0.1   0.0.0.0               eth0

----------

## rac

Maybe tcpdump can be of some assistance in determining what's actually going out over the wire.

----------

## jemmyw

okay results of tcpdump...

as expected, normal network traffic when booted to the install CD

when booted to the HD, i run tcpdump then try to ping another computer and tcpdump does not show anything happening at all.

However, tcpdump is recording some kind of network traffic.

23:42:27.588624 arp who-has 192.168.0.1 tell 192.168.0.100

this similar line is repeated over and over.

on exiting tcpdump it shows that xx packets recieved by filter (the ones from above) and 0 packets dropped by kernel...

Also i just tried telnet 192.168.0.1 80 (its running a webserver) and telnet reported the message "Unable to connect to remote host: No route to host"

----------

## rac

The .config file used to build the kernel on the 1.2 install CD is available here.  Maybe a comparison between it and your running .config will turn something up, especially in the networking sections.  Also, you could run tcpdump on another machine on the same hub, to get a clearer picture as to what other machines would be seeing.  Another thing that might be useful would be seeing what happens when you try to ping in to that machine from elsewhere.

If you're using gentoo-sources, another (somewhat drastic and unfulfilling) tactic could be to try switching to vanilla-sources and see if that changes anything.

----------

## jemmyw

Okay, i can address most of those. I ran tcpdump from this machine when booted from the 1.2 installation CD. It could see a lot of traffic, and I tried a few things, everything seemed to be working fine. I have tried pinging this machine from another, and it doesnt get the packets (they dont show up on tcpdump). I have tried several kernels now, the gentoo-sources, 2.4.19 downloaded from kernel.org and 2.5.9 (just in case).

Thanks for the config file, i shall see whats in there...

----------

## jemmyw

Well something worked. I'm not sure what, but i set everything in my network and network devices config the same as the config file you sent, and the network card appears to be working. Thank you  :Smile: 

----------

## rac

Glad to hear it's working, but my curiosity is not sated.  If you get a chance at some point, and you still have a copy of your old .config around, could you post a diff between the networking sections of it and that of the install CD's config, so that anyone who reads this thread can look like a genius the next time somebody does something similar?

----------

## jemmyw

well two things i can think of. The first is simply that I set it to compile all of the modules for PCI ethernet cards, however that is unlikely to be the solution. 

The second and most likely solution seems to be

Packet Socket: mmapped IO = yes

(I didn't set this originally because the help said to select no if you were unsure.)

I also disabled IP: multicasting.

----------

