1758653 Members
1709 Online
108874 Solutions
New Discussion юеВ

Ethtool - dynamic?

 
SOLVED
Go to solution
Coolmar
Esteemed Contributor

Ethtool - dynamic?

After each reboot, I keep having to reset my ethernet card with ethtool -

ethtool -s eth0 speed 100 duplex full autoneg off

Are these settings not written to a file? It looks like the settings are dynamic - ie like with HPUX you can ifconfig to change the settings and then after a reboot they will go back to what they were unless they are changed statically in netconfig file. Is there a file in linux where all the above is hardcoded?
5 REPLIES 5
Stuart Browne
Honored Contributor
Solution

Re: Ethtool - dynamic?

No, they aren't written anywhere, they are sessional.

You either need to put the 'ethtool -s ...' command in a start-up file ('/etc/rc.d/rc.local' for instance), or use the driver settings to set them when the interface starts up (possibly an '/etc/modules.conf' post-install line).
One long-haired git at your service...
Gopi Sekar
Honored Contributor

Re: Ethtool - dynamic?


ethtool changes will be active till you stop the eth0 interface.

to make it permanent, either you can put it in /etc/rc.d/rc.local file so that every reboot will call ethtool

or hack the /etc/init.d/network script and at the end of the start function add ethtool line so that every /etc/init.d/network start will call this.

Regards,
Gopi
Never Never Never Giveup
Donald Kok
Respected Contributor

Re: Ethtool - dynamic?

Hi Sally,
I had troubles with this recently.
I found out the switchport had to be configured as auto/auto.
When the switchport was configured as 100F, the machine rebooted as 100H.
All the other machines (M$) prefer a fixed port.
So, with auto on the switch, I do not have to worry about configuring the networkport on the machine.
HTH
Donald
My systems are 100% Murphy Compliant. Guaranteed!!!
xyko_1
Esteemed Contributor

Re: Ethtool - dynamic?

Hi Sally,

I strongly agree with Donald. Linux works fine if you leave the nic module as default (auto negotiation) and set the switch port as auto also.

That's the way we do here with a very heterogeneus server hardware environment and cisco switches.

regards,
xyko
Steven E. Protter
Exalted Contributor

Re: Ethtool - dynamic?

you can use ethtool settings in your network configuration file to set these values.

In essence you can write them to some degree.

Example:

/etc/sysconfig/network-scripts/ifcfg-eth0

Last line is

ETHTOOL_OPTS="speed 1000 duplex full autoneg off"

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com