• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Permanently set the ethtool settings in CentOS/RHEL 6

by admin

Modifications made with the ethtool command are by default disappeared after a reboot. For permanent settings, the interface configuration file has to be edited. For each network device, there will be a file in the /etc/sysconfig/network-scripts/

For example, for device eth0 there will be /etc/sysconfig/network-scripts/ifcfg-eth0 containing the properties of the device. A line can be added to the file to automatically implement the settings allowed by the “ethtool -s” command. For example:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0
ETHTOOL_OPTS="autoneg off duplex full speed 100"

Refer to “man ethtools” for options allowed with the “-s” switch.

# man ethtool

These are the only switch options that can be implemented this way because the “ifup” script is not coded to handle other options.

Restart the network service for the changes to take effect:

# service network restart

If this is not the primary interface in use and you have logged in with another IP that is not plumbed to this interface, you can also use “ifdown” and “ifup” commands to make the ethtool settings active.

# ifdown eth0
ifup eth0

These settings will be set permanently, so even after a reboot of the servers you should see these settings intact.

Filed Under: CentOS/RHEL, CentOS/RHEL 6, Linux

Some more articles you might also be interested in …

  1. How to uninstall chromium-browser from Ubuntu
  2. “Connection reset by peer” – error while ssh into a CentOS/RHEL system with a specific user only
  3. git lfs: Work with large files in Git repositories
  4. slop: command not found
  5. “git filter-repo” Command Examples
  6. f3fix: Edit the partition table of a fake flash drive
  7. How to Lock and Unlock Zimbra Accounts from Command Line
  8. dnsspoof: command not found
  9. How To Add Standard Linux Users To Manage Print Jobs And Services in CentOS/RHEL
  10. How to Install apt-utils with apt-get?

You May Also Like

Primary Sidebar

Recent Posts

  • gml2gv Command Examples
  • glow Command Examples
  • glib-compile-resources Command Examples
  • glances Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright