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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. atool: command not found
  2. repquota Command Examples in Linux
  3. How to blacklist a local disk using the “find_multipaths” directive in CentOS/RHEL 6
  4. dig Command Examples in Linux
  5. Configuring Remote Logging using rsyslog in CentOS/RHEL
  6. mdadm Command Examples in Linux
  7. OpenLDAP Server and Client Utilities list
  8. grub-bios-setup: command not found
  9. Configuring Persistent Storage in CentOS/RHEL 5,6 for Single Path using udev rules
  10. ncview: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • pw-cat Command Examples in Linux
  • pvs: command not found
  • pulseaudio: command not found
  • pulseaudio Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright