Ethernet duplex issues

I had a weired issue with a server. Whereas other machines worked well with an high speed Internet connection, dowloading was painfully slow on this one. The network card, a 3Com, was also different from others (Intel).


Of course, I immediately thought it was a speed negociation concern with the switch.

I found out that by default with Debian the network card is set on autonegociation. This is set on a card module.

You can use two tools to enforce the settings : Mii-tool and ethtool.

Here are some example to enforce 100 Mb full duplex with both tools :

$ mii-tool -F 10baseT-FD eth0
$ ethtool -s eth0 duplex full

After that you can test and find the best setting for you. For that, you need to know what module your kernel is using.

First, let’s find what is the model of the network card :

$ lspci | grep Ethernet

Now look at the modules availables for your kernel :

$ ls /lib/modules/`uname -r`/kernel/drivers/net/

It will give you a list of <card_model>.ko files that are these modules (except generic ones like mii.ko, slhc.ko and bsd_comp.ko).
You can get more info (in my case the module for my card is 3c59x.ko) :

$ modinfo 3c59x.ko

You should have found the module you need. If not, search on the web if you can use an existing module that would be compatible. At last resort, download it from the maker website and compile it.

To apply it on the network card module :

$ modprobe -r 3c59x
$ modprobe 3c59x options=1 full_duplex=1

To have this set at startup, you will have to create an 3c59cx file in the /etc/modutils directory (with a 2.4 kernel) :

options 3c59x full_duplex=1

Then :

$ update-modules

With a 2.6 kernel, just create the same file in the /etc/modprobe.d directory.

If you reboot, that shloud be all fine. Ok, now we enforce 100 Mb with full duplex on the client side. That may not be enough !

You may have to enforce it on the switch. For instance, on a Cisco switch :

$ configure terminal
$ interface fastethernet3/2
$ speed 100
$ duplex full
$ no shut
$ exit
$ copy run start

As a conclusion, Auto-negociation is convenient but does not always success depending on the hardware you use. In my case, the same card autonegociated correctly with a different switch, and other cards worked well with that switch. So it was a very specific problem but I am sure that it is not so rare.