Configure NIC Speed and Duplex


            There are a few different methods to force Network Interface Cards(NICs) to the correct speed and duplex and to turn autonegotiation off. 

            The legacy method was to use modules.conf and set internal module parameters to the correct setting so that upon driver load, it knew what to run at. The problem is that every different module has a different set of parameters. This isn't efficient because it requires too much documentation on the various modules. So forget using this as its just plain painful.

            The new, improved, and much less painful way to force NIC settings is to edit the file /etc/sysconfig/network-scripts/ifcfg-ethX(where X is the number value of the ethernet device) to include one of the following:

For RHEL AS/ES 2.1 add the line:

/sbin/ethtool \-s $DEVICE speed 100 duplex full autoneg off
 
For RHEL AS/ES3.0 and above add the line:

ETHTOOL_OPTS="speed 100 duplex full autoneg off"
 
For SLES 8 and above add the lines:

POST_UP_SCRIPT=settings-ethX
 
Then perform the following

Create a new file called /etc/sysconfig/network/scripts/settings-ethX and add the line:

ethtool \-s eth0 duplex full speed 100 autoneg off
 
             Bring the NIC down (ifdown eth#) and back up (ifup eth#) and recheck settings(ensure alternate connectivity before bringing down the admin interface), If the above settings didn't work try changing the settings-ethX line to:

/sbin/mii-tool -F 100baseTX-FD $DEVICE


Note: If Gigabit interfaces are required, the same ethtool configuration is to be used with 1000 instead of 100. Some Gigabit interfaces require autonegotiation. If your Gigabit interface does not work with specific speeds set, autonegotiate is acceptable.