If you ever had a Linux on a dev network with various switches (decommissioned from production) you may have encountered traffic throughput problems. Quite often this can be caused by a speed duplex problem. Here is how to modify speed duplex on Linux with Intel cards, when the dev environment is not nearby.
First, you need to have a card with a modern driver, that uses the mii module. Then you can write a small script (assuming you are remotely logged in) to make sure that you don’t cut yourself off:
#!/bin/shmii-tool -F 10baseT-FD eth0echo Switched to full duplex, if you can see this text,echo you have been successful and you have 5 seconds toecho press +C to keep the settingssleep 5echo Timed out. Reverting to original settingsmii-tool -F 10baseT-HD eth0
To make the changes permanent at reboot, under kernel 2.4, you can modify modules.conf by adding the following line:
options eepro100 full_duplex=1
And under kernel 2.6, you can modify modprobe.conf by adding the sameline:
options eepro100 full_duplex=1
Please note that if you try to use e100 you may encounter problems, as the line
options e100 e100_speed_duplex=4
doesn’t seem to work for most people, even though the mii-tool command does work.