Ethtool script not running on boot.

Hi, there is an incompatibility between my NIC and my Western Digital Powerline adapters which appears to cause autonegotiation to fail intermittently, most often following a reboot. Running the following Ethtool script will establish a connection immediately:

#!/bin/sh
# chkconfig: 345 85 15

ETHTOOL="/usr/sbin/ethtool"
DEV="eth0"
SPEED="100 duplex full"
case "$1" in
start)
echo -n "Setting eth0 speed 100 duplex full...";
$ETHTOOL -s $DEV speed $SPEED;
echo " done.";;
stop)
;;
esac
exit 0

I have tried placing this script in /etc/init.d, and it is shown as a selected option when running ntsysv but to no avail.

The recommended method for Fedora is to add ETHTOOL_OPTS="speed 100 duplex full autoneg off" to /etc/sysconfig/network-scripts/ifcfg-NameOfConnection which again is not working.

I'm running Fedora 15 64-bit, NIC = Intel 82562V-2 10/100.

If anyone is able to help out then they would probably save my hair from being wrenched out. Thanks

does the directive:

ETHTOOL_OPTS

not work in your /etc/sysconfig/network-scripts/ifcfg-ethX file?

that is how most people go about adding those options sanely.

1 Like

Thanks but afraid that didn't work either, here's my config:

HWADDR=00:21:9B:0E:C7:4D
TYPE=Ethernet
BOOTPROTO=none
IPADDR0=192.168.1.10
PREFIX0=24
GATEWAY0=192.168.1.254
DNS1=192.168.1.254
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="Wired connection 1"
UUID=90bf39e6-4141-4839-a978-6156ba608ac0
ONBOOT=yes
ETHTOOL_OPTS="speed 100 duplex full autoneg off"

Is there new firmware or new drivers for your cards/adapters?

Can u try upgrade the latest firmware in to your and try this .... !

No new firmware available so probably no fix for the underlying incompatibility but I'll give Intel's proprietary drivers a try as they may include a configuration utility - this is how I solved the problem on my Windows 7 install.

Probably won't have a chance to do this until quite a bit later today.

---------- Post updated at 04:11 PM ---------- Previous update was at 08:19 AM ----------

Can't compile the intel e100 driver - it keeps failing and advising that it can't install on kernel's older than 2.4 when I'm using 2.6.40. Removed the coding from the Makefile that stops it proceeding but I have no faith in the installed result as there was a long list of errors following make install.

Driver in use is intel's e1000e.

To be honest I'm about ready to give up on this and just purchase a new NIC, it's been an ongoing problem for some time.

how are you doing this? Why is it trying to compile the E100 driver when you are using a gigabit adapter?

Hi mark54g,

The card is 10/100 but Fedora is defaulting to e1000e as the e100 driver isn't included with Fedora 15.

I downloaded the e100 driver from Download Intel Drivers and Software which is

but receive the error

.
I'm using 2.6.40.6-0.fc15.x86_64.

Removing the section of code that produces this error just leads to another bunch of errors so as I said I don't have much confidence in the driver that eventually installed.

Why not get the src rpm? I would suggest that would make more sense, no?

What is the outpout of this command:

lspci -vv | grep -i net

That will get you started on what card you have and perhaps what driver you should be using:

alternately you may also want to run:

ethtool -i <ethdevice>

also, what happens if you do this:

modprobe -r e1000e 
modprobe e100

FYI, if it doesn't work, you will have to modprobe the e1000e driver again (no -r) in order to connect (or reboot)

---------- Post updated at 01:28 PM ---------- Previous update was at 01:17 PM ----------

If I remember correctly, they don't put out src RPMs, so sorry there. How did you try to build it? Did you do an rpmbuild -ba or -bb?

did you try to extract it and build? I suggest you just rpmbuild or rpm --rebuild against the tgz file.

After that, you will then have to find the RPM it created and install it, then I would suggest a reboot.

Hi Mark54g, thanks again.

lspci -vv | grep -i net

gives

Previously I'd tried rpmbuild -tb against the tar.gz. I've tried again with rpmbuild -ts to create a source then ran rpmbuild --rebuild against the src.rpm. End result is either

or if I modfiy the Makefile to force it to carry on I get

Can't figure out what the problem is as

[root@Fedora15 craig]# rpm -qa kernel-devel
kernel-devel-2.6.40.6-0.fc15.x86_64
[root@Fedora15 craig]# uname -r
2.6.40.6-0.fc15.x86_64

seems to be in order.

Sorry, afraid I've wasted your time with the driver install as it is in fact already installed as shown by modinfo e100. modprobe -r e1000e followed by modprobe e100 cuts off my network entirely and following a reboot e1000e is back as the driver in use.

Try opening a bug with the Fedora folks.

Thanks Mark54g, I think this has something to do with the stage at which the Ethtool config is applied as I had the same problem using Ubuntu 10.10 on this machine but configuring the driver directly on my Windows installation seems to work fine.

NIC's tend to be dirt cheap these days so I think I'll take the easy way out and just pick up a new one thus getting rid of the incompatibility.

Thanks again for all the help.

Buy a new Intel Pro NIC that uses the e1000 driver.