Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 343
  • Last Modified:

Changing ethernet setting permanently on Red Hat Linux

I used the following command to change the settings on eth0:

ethtool -s eth0 autoneg off
ethtool -s eth0 speed 10
ethtool -s eth0 duplex full

This did indeed change my settings, but when the linux server was rebooted, it reverted back to:
autoneg on
duplex half

How do I make the change permanent?
0
mhorrocks
Asked:
mhorrocks
  • 3
  • 2
1 Solution
 
cheesygit182Commented:
What distro you are using?

~cheesygit182
0
 
mhorrocksAuthor Commented:
Question no longer valid.  Need to delete the question.

Would like to offer cheesygit182 100 points for at least responding to the question.
0
 
cheesygit182Commented:
hi, to delete the question, you need make a request here:
http://www.experts-exchange.com/Community_Support/General/newQuestionWizard.jsp

Hope you got it sorted?
Thanks for the offer, but I failed to even read the title!... lol

Just in case you are still wondering, or for anybody else that finds this question:

You can use ethtool to set different variables on an NIC card from the command line, something like this:
ethtool -s eth0 speed 10 duplex full autoneg off
but this change is lost as soon as you deactivate the NIC card, or reboot.
The *proper* way to make this change "permanent" is by editing the ethtool configuration file.
To do what you want to do, you could try this:

#
# File: /etc/sysconfig/network-scripts/ifcfg-eth0
#
DEVICE=eth0
IPADDR=192.168.1.100
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
ETHTOOL_OPTS="speed 10 duplex full autoneg off"

The *newbie* way to make something happen at every startup is to add this command in your /etc/rc.local file which is run at the end of every reboot:
ethtool -s eth0 speed 10 duplex full autoneg off

Hope this helps

~cheesygit182
0
 
cheesygit182Commented:
ty :)
0
 
mhorrocksAuthor Commented:
A very informative answer.  Thank you for being clear and concise about the solution.  Your answer should help out others who are learning by doing.

Again, thank you!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now