United States (change)
Shortcuts: Downloads Fedora Red Hat Network
Account Links: Cart Your Account Logout
Depending on which type of Ethernet card is installed on the system, there are usually one of two utilities that can configure the network card speed, duplex (half or full), and other options: ethtool or mii-tool. Some Ethernet cards will not work with ethtool, if this is the case, then try mii-tool and vice versa. First, check to make sure the packages are installed:
# rpm -q ethtool # rpm -q net-tools
Uninstalled packages will provide similar output:
# rpm -q ethtool package ethtool is not installed # rpm -q net-tools package net-tools is not installed
Installed packages will provide the package name-version:
# rpm -q ethtool ethtool-1.2-1 # rpm -q net-tools net-tools-1.60-20.1
If these packages are not installed, then they can be installed from the installation CD's or by using up2date if the system is registered with Red Hat Network (RHN) (via ). If the system is registered with RHN, execute up2date ethtool or up2date net-tools. RHN will download and install the package on the system.
Next, view the current settings that the Ethernet interface has. Use the following notation: command device_name, where command is ethtool or mii-tool and device_name is eth0, eth1, etc. The following examples are from 2 different network cards:
# ethtool eth0
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: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: puag
Wake-on: g
Link detected: yes
# mii-tool eth1
eth1: no autonegotiation, 10baseT-HD, link ok
In order to find how to set the options for, full duplex, half duplex, changing your speed, etc, the man pages provide all this information:
# man ethtool # man mii-tool
Once you determine the settings and options that you want, you can set them immediately at the command line. To have the initialization scripts set this every time the eth0 device is brought up, add a line to the /etc/sysconfig/network-scripts/ifcfg-eth0 like the following if you are using ethtool:
ETHTOOL_OPTS="speed 100 duplex full autoneg off"
Unfortunately there is no way to set this on reboot permanently except by placing it the command in the /etc/rc.local file (explained next) to let it be run at the very end of the booting process or by creating your own startup script if you need it set earlier.
As a last resort, you can set them in the /etc/rc.local file. In the /etc/rc.local file, put the ethtool or mii-tool string on a new line by itself. The following example file should help:
#!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. ethtool -s eth0 speed 100 duplex full autoneg off mii-tool -F 100baseTx-FD eth1 touch /var/lock/subsys/local
If you save these changes, the network card should come up with the speed and duplex that is specified (if those options are available for the Ethernet card) the next time the system boots.
Note: Some Ethernet cards will not work with ethtool, if this is the case, then try mii-tool and vice versa.