Q. How do I change the speed, duplex on for my Ethernet card?
A. Under Linux use mii-tool or ethtool package which allows a Linux sys admin to modify/change and view the negotiated speed of network interface card (NIC) i.e. it is useful for forcing specific Ethernet speed and duplex settings.
Depending on which type of Ethernet card is installed on the system you need to use either mii-tool or ethtool. I recommend installing both and use one of the tool, which will work with your card.
Task: Install mii-tool and ethtool tools
If you are using Debian Linux you can install both of these package with following command:# apt-get install ethtool net-toolsIf you are using Red Hat Enterprise Linux you can install both of these package with following command:# up2date ethtool net-toolsIf you are using Fedora Core Linux you can install both of these package with following command:# yum install ethtool net-tools
Task: Get speed and other information for eth0
Type following command as root user:
# ethtool eth0Output:
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
Or use mii-tool command as follows:# mii-tool eth0Output:
eth0: negotiated 100baseTx-FD flow-control, link ok
Task: Change the speed and duplex settings
Setup eth0 negotiated speed with mii-tool
Disable autonegotiation, and force the MII to either 100baseTx-FD, 100baseTx-HD, 10baseT-FD, or 10baseT-HD:# mii-tool -F 100baseTx-HDSetup eth0 negotiated speed with ethtool
# mii-tool -F 10baseT-HD# ethtool -s eth0 speed 100 duplex fullTo make these settings permanent you need to create a shell script and call from /etc/rc.local (Red Hat) or if you are using Debian create a script into the directory /etc/init.d/ directory and run update-rc.d command to update the script.
# ethtool -s eth0 speed 10 duplex half
Read man page of mii-tool and ethtool for more information.


{ 10 comments… read them below or add one }
I get an “SIOCSMIIREG on eth2 failed: Invalid argument” error when entering “mii-tool -F 100baseTx-FD eth2″ What does this mean? Thanks.
Try to use ethtool. It appears that mii-tool is not compatible with your NIC.
Thanks for info, very use full!
I run “ethtool -s eth0 speed 10 duplex half” then run “ethtool eth0″ and get “Speed: 100Mb/s”.
So speed was not changed really.
Why?
How to get wired LAN running at FULL-DUPLEX
At the Linux Terminal, type:
sudo ethtool eth0
This will tell you the properties of the wired config. If Duplex is showing half, then type:
sudo ethtool -s eth0 autoneg off
sudo ethtool -s eth0 duplex full
Finally, type to view final configuration:
sudo ethtool eth0
Google & Vivek pwns!
On Red Hat Enterprise, and SuSE Enterprise (and probably others) you can include the options in your interface config file using the ETHTOOL_OPTS argument:
# red hat: /etc/sysconfig/network-scripts/ifcfg-eth0
# sles: /etc/sysconfig/network/ifcfg-eth-id-{mac address}
ETHTOOL_OPTS=”autoneg off speed 100 duplex full”
Note that you cannot disable autonegotiation on gig-ethernet over copper. Autonegotiation is REQUIRED in the 802.3ab definition (http://standards.ieee.org/reading/ieee/interp/IEEE802.3af-2003interp-6.pdf)
There is way to “fix” the speed on a gig-ethernet NIC while complying with the standard, based on the last paragraph of the article mentioned above by Shawn (http://standards.ieee.org/reading/ieee/interp/IEEE802.3af-2003interp-6.pdf):
# ethtool -s eth0 speed 1000 duplex full autoneg on
The NIC keeps the auto-negotiation but only advertises 1000mbps. It works fine.
I have a Dell laptop (Precision M6300) with Broadcom NetXtreme ethernet controller and
a wireless Dell WLAN Mini card. I had Fedora installed and can dual boot Windows XP or Fedora. I decided to start with the Broadcom controller since many of the Web sites imply
that the wireless ethernet on linux can be frustrating. Unfortunately, the “wired” ethernet is
also proving to be a problem. I will try the tools you have listed and hope. Certainly the
Administor->network-> gui interface did not work. Tried the tg3 driver but when I activate
it, it says it is not there. Of course I am sending this email thru the BroadCom controller but
with the XP OS. There seems to be a big difference between a linus USER and Admin. Oh well
I will reboot and try some of your suggestions.
My 1gbit card refuses to report 1gbit. GRRRR! I use the ethtool, but at no vail. The mii-tool dont do to much for my Debian system either.
Might be a stupid question, but are there some config settings for the network file? Im sure I had it running at 1gbit, but I also remember it was a hassle to get it to run at that speed.
Well, off to google again..