Ethtool is a command-line utility for Linux systems used to query and control network device driver and hardware settings, particularly for wired Ethernet devices. It allows users to inspect and modify parameters of a specified network interface, such as eth0 or enp0s3, enabling precise management of networking hardware.[1][2]
The tool provides a wide range of commands for viewing device information, including current link speed, duplex mode, auto-negotiation status, and supported protocols, as well as for altering configurable options like interrupt coalescing, receive/transmit pause frames, and offload features such as TCP segmentation offload (TSO) or generic receive offload (GRO), provided the driver supports them.[1][3] For diagnostics, ethtool can display statistics, perform hardware self-tests, and dump EEPROM contents, making it invaluable for troubleshooting connectivity issues and optimizing performance.[1][4]
Originally written by David S. Miller and first released in 1998, ethtool is maintained by the kernel community under the leadership of Michal Kubecek and is hosted on kernel.org, with its source code available via Git.[5][6] It has become a standard component in most Linux distributions, evolving alongside kernel developments to support modern networking hardware and features, with the latest stable release being version 6.15 as of June 2025.[2] This utility primarily targets system and network administrators, offering a straightforward interface to interact with the kernel's ethtool subsystem without requiring kernel recompilation.[5]
Introduction
Purpose and Functionality
Ethtool is a command-line utility designed for querying, displaying, and modifying parameters associated with network interface controllers (NICs) and their drivers, with a primary focus on wired Ethernet devices. It serves as a key tool in Linux-based network management, enabling administrators to inspect and adjust low-level hardware and driver configurations that influence network performance and behavior.[1]
Among its core functionalities, ethtool retrieves essential details such as the driver version, firmware version, current link status, negotiated speed, duplex mode, and supported features including offload capabilities like TCP segmentation offload (TSO) and checksum offloading. It also supports modifications to operational settings, such as manually setting link speed and duplex mode, enabling or disabling autonegotiation, and configuring Wake-on-LAN (WoL) to allow remote wake-up of the system over the network. These operations facilitate troubleshooting, optimization, and customization of Ethernet interfaces to match specific network requirements.[1][3]
The utility depends on the ethtool kernel API, which primarily utilizes generic netlink sockets for communication between userspace and the kernel, with a fallback to traditional ioctl interfaces if netlink is unavailable; full functionality requires implementation support within the specific NIC driver. Hardware-level interactions are possible, such as triggering LED blinking on the physical port to aid in identification during maintenance, provided the driver exposes the necessary controls. Ethtool operates on Linux kernels and extends to Android, which shares the Linux kernel foundation. For programmatic integration, bindings exist in languages like Python via the python-ethtool module, allowing scripts to access the same API for automated network management. The software is distributed under the GNU General Public License version 2 (GPLv2).[7][1][8][9]
History and Development
Ethtool was initially developed by David S. Miller in 1998 as part of the early Linux networking tools suite, providing a command-line utility for querying and configuring Ethernet network interface controllers (NICs).[1] The tool's core interface, defined in the Linux kernel's ethtool.h header, originated from Miller's work to enable userspace control over kernel networking drivers.
Maintenance of ethtool transitioned over time, with the project now hosted in a Git repository under kernel.org and currently led by Michal Kubecek since around 2010.[5] Kubecek has overseen significant refactoring efforts, including the progressive shift from ioctl-based communication to a more extensible netlink interface starting with Linux kernel 5.6 in late 2019.
Key release milestones reflect ethtool's alignment with Linux kernel evolution: early versions in the late 1990s were closely tied to the kernel 2.x series, offering basic device queries and settings changes.[10] Major updates in the 2.6 kernel era (starting 2003) introduced support for emerging hardware features, such as advanced driver offloads and statistics reporting. More recent versions have expanded compatibility; the latest stable release, version 6.15 on June 23, 2025, includes enhancements and fixes for contemporary NICs, such as improved handling of high-speed Ethernet controllers.
Over its history, ethtool has evolved from a simple query tool for basic NIC parameters like speed and duplex mode into a comprehensive utility supporting advanced kernel APIs for features like checksum offloads, RSS hashing, and hardware diagnostics.[1] This progression mirrors the maturation of Linux networking, with ongoing adaptations to new driver capabilities and hardware generations. The development process relies on community contributions submitted via the netdev mailing list, with bug reports directed to the maintainer for integration into upstream releases.[5]
Installation
Using Package Managers
Ethtool is available as a standard package in most major Linux distributions, facilitating easy installation through their respective package managers.[11]
On Debian-based systems such as Ubuntu, users can install it using the Advanced Package Tool (APT) with the command sudo apt install ethtool.[12] Similarly, on RPM-based distributions like Fedora and Red Hat Enterprise Linux (RHEL), the DNF or YUM package manager handles installation via sudo dnf install ethtool (or sudo yum install ethtool on older versions).[13] For Arch Linux, the Pacman package manager provides ethtool through sudo pacman -S ethtool.[14]
Distribution packages typically align closely with upstream releases but may lag slightly due to testing and integration cycles; for instance, Ubuntu 24.04 includes version 6.7, while 2025 updates in distributions like Debian and Arch incorporate version 6.15 or later.[15] After installation, verify the setup by running ethtool --version to display the installed version and confirm functionality.[1]
On Android, ethtool is integrated into some Android Open Source Project (AOSP) builds as part of the platform's external tools, or it can be installed via Termux using its package repository for rooted or emulated environments.[16] For custom or bleeding-edge versions, compiling from source serves as an alternative, as detailed in the relevant section.
Compiling from Source
Compiling ethtool from source provides advanced users with the ability to incorporate the most recent upstream changes, integrate custom patches for specific hardware or features, or address scenarios where distribution-provided packages lag behind kernel updates.[5]
The process begins by downloading the latest stable release tarball from the official Linux Kernel Archives. As of June 23, 2025, this is ethtool-6.15.tar.xz, available at https://www.kernel.org/pub/software/[network](/page/Network)/ethtool/.[2]
Before building, ensure the system has the necessary prerequisites: a C compiler such as GCC, the GNU Make tool, and the libmnl development library (libmnl-dev on Debian-based systems) to enable Netlink interface support, which is essential for advanced querying and configuration capabilities.[17]
Extract the downloaded archive with the command:
tar -xf ethtool-6.15.tar.xz
tar -xf ethtool-6.15.tar.xz
Then, change into the resulting directory ([cd](/page/.cd) ethtool-6.15) and run the configuration script:
This autotools-based script detects the build environment; optional flags can customize the build, such as --enable-pretty-dump to activate formatted output for register and EEPROM dumps, improving readability in diagnostic scenarios, or --disable-netlink to bypass libmnl dependency if Netlink features are not needed.[5]
Proceed to compile the source with:
Optimization flags like -O2 can be used during this step to verify for compiler warnings, ensuring a robust build.[5]
Finally, install the compiled binary system-wide as root:
sudo make install
sudo make install
This places ethtool typically in /usr/local/sbin/, overriding any existing installation if present.
To verify the successful build and installation, execute ethtool --version to display the ethtool version, confirming it matches 6.15. Additionally, test functionality and kernel driver compatibility by running ethtool -i <interface>, where <interface> is a network device like eth0; this command outputs details such as the driver name, version, firmware version, and bus information, indicating proper integration with the running kernel.[1]
Command-Line Interface
Basic Syntax and Options
The general syntax of the ethtool command follows the structure ethtool [options] <interface>, where <interface> specifies the target network device, such as eth0 or enp0s3.[1] This format allows users to query or modify settings for wired Ethernet devices by combining global options with device-specific parameters.[1]
Several global options provide utility without requiring extensive device interaction. The -V or --version option displays the version of ethtool installed on the system.[1] Similarly, -h or --help outputs a brief usage summary and list of available options.[1] For driver details, -i or --driver retrieves information about the kernel driver associated with the specified interface.[1] The -d or --register-dump option fetches a hexadecimal dump of the device's hardware registers, useful for low-level diagnostics.[1]
Network interface names for ethtool are typically obtained from system tools like ip link show, which lists all available devices with their states and identifiers.[18] Examples include legacy names like eth0 or modern predictable names like enp0s3, depending on the system's naming scheme.[1] While ethtool operates on a single interface per invocation, shell scripts can loop over multiple interfaces—sourced from ip link show output—to apply consistent operations across devices.[3]
Error handling in ethtool often manifests as messages like "Operation not supported," which indicate that a requested feature is unavailable due to limitations in the device's driver or hardware capabilities.[1] Such errors highlight the tool's dependence on underlying kernel support, requiring users to verify driver compatibility.
For a complete enumeration of options and detailed usage, consult the ethtool(8) manual page.[1]
ethtool provides several read-only commands to retrieve information about network interface controllers (NICs), enabling users to inspect current status, capabilities, and statistics without modifying device settings.[1] These queries are essential for diagnostics, monitoring, and scripting, as they output human-readable or parseable data on aspects like link parameters, driver details, and error counters.[1] Most query operations do not require root privileges, making them accessible for standard users, though some driver-specific outputs may vary.[1]
The basic query command, ethtool <interface>, displays core link information for the specified network device, such as the current speed (e.g., 1000Mb/s), duplex mode (full or half), port type, autonegotiation status, and whether the link is detected.[1] For example, running ethtool eth0 might output details like "Speed: 1000Mb/s", "Duplex: Full", "Auto-negotiation: on", and "Link detected: yes", helping administrators verify connectivity without altering configurations.[1] This command relies on the device's driver to report accurate real-time status.[1]
To obtain driver and firmware details, the ethtool -i <interface> option queries the driver's version, firmware version, and bus information, such as PCI slot details.[1] An example output for ethtool -i eth0 could include "driver: igb", "version: 5.6.0-k", "firmware-version: 0x80000a5c", and "bus-info: 0000:03:00.0", aiding in compatibility checks and troubleshooting hardware issues.[1] For accessing non-volatile memory, ethtool -e <interface> dumps the EEPROM contents in hexadecimal format, optionally with raw on/off, offset, and length parameters to limit the output.[1] This is useful for reading manufacturer-specific data stored on the NIC, though care must be taken as not all devices support full access.[1]
Querying supported features includes ethtool -a <interface> for Wake-on-LAN (WoL) capabilities, which reports whether WoL is enabled and the supported wake-up modes (e.g., magic packet or broadcast).[1] For physical identification, ethtool -p <interface> [seconds] blinks the NIC's LEDs for the specified duration (defaulting to indefinite until interrupted), facilitating hardware location in server racks or multi-port setups.[1] Statistics retrieval via ethtool -S <interface> provides a comprehensive list of packet counters, including transmitted and received frames, errors (e.g., CRC errors, collisions), and drop events, with options like --all-groups to include all statistic groups if supported by the driver.[1] For instance, output might show "rx_packets: 12345678" and "tx_errors: 0", enabling performance analysis.[1]
Permissions for these queries are generally permissive, with no root access needed for standard reads on most Linux distributions, though certain drivers may restrict sensitive data like EEPROM.[1] Output from these commands is typically plain text, suitable for parsing in scripts using tools like awk or grep; recent versions support --json for structured output where the driver allows, improving automation.[1] Users should consult the specific NIC driver's documentation for any variations in reported fields.[1]
Setting Device Parameters
ethtool allows users to configure basic network interface card (NIC) parameters such as link speed, duplex mode, and autonegotiation through the -s option.[1] The syntax for setting these involves specifying the interface name followed by the desired values, for example, ethtool -s <[interface](/page/Interface)> speed 1000 duplex full autoneg off, where speed can be set to supported values like 10, 100, 1000, or higher depending on the hardware, duplex to full or half, and autoneg to on or off to enable or disable automatic negotiation.[1] These changes take effect immediately but require the settings to match the connected device's capabilities to avoid issues.[19]
Wake-on-LAN (WoL) functionality can be enabled or configured using the same -s option with the wol parameter, specifying modes such as g for MagicPacket, p for PHY activity, u for unicast packets, m for multicast, a for ARP requests, or d to disable.[1] For instance, ethtool -s <interface> wol g activates MagicPacket wake-up, though support varies by NIC hardware and driver.[1] SecureOn password can be set with sopass for enhanced security in compatible modes.[1]
Interrupt moderation, which balances CPU utilization and latency by delaying interrupts, is adjusted via the -C option, primarily using parameters like rx-usecs to set the receive interrupt delay in microseconds.[1] An example command is ethtool -C <interface> rx-usecs 100, which postpones RX interrupts until the specified time or frame count is reached, with typical values ranging from 0 (no moderation) to several hundred microseconds based on workload needs.[1] Similar settings apply to transmit (tx-usecs) for symmetric control.[1]
All modifications made with ethtool are runtime and do not persist across reboots; to make them permanent, administrators must use udev rules or integrate commands into network initialization scripts such as those in /etc/network/interfaces on Debian-based systems or NetworkManager configurations on Red Hat Enterprise Linux.[20] For validation after setting parameters, users can query the interface using ethtool's diagnostic commands to confirm the applied changes.[1] Incompatible settings, such as forcing a speed unsupported by the link partner, may result in the link going down temporarily until corrected.[19]
Advanced Configuration
Offload and Feature Controls
ethtool provides mechanisms to query and configure hardware offload features and protocol accelerations supported by network device drivers, allowing administrators to optimize performance by delegating tasks to the network interface card (NIC). These features include segmentation offloads, checksum computations, and flow control, which are essential for high-throughput networking while minimizing host CPU involvement.[1][21]
To query the current state of offload features for a network interface, the -k or --show-offload option is used, as in ethtool -k <interface>, which displays a list of features such as TCP Segmentation Offload (TSO), Generic Segmentation Offload (GSO), Large Receive Offload (LRO), Generic Receive Offload (GRO), and receive/transmit checksum offloads.[1] TSO enables the NIC to segment large TCP packets into smaller ones compliant with the maximum transmission unit (MTU), reducing the number of packets processed by the CPU.[21] GSO generalizes this by handling segmentation in software for protocols beyond TCP, ensuring compatibility across diverse network paths.[21] On the receive side, LRO coalesces multiple incoming packets into larger ones before passing them to the stack, while GRO performs similar aggregation in a more protocol-agnostic manner, both aiming to decrease per-packet overhead.[21] Checksum offloads for receive (rx-checksumming) and transmit (tx-checksumming) allow the NIC to verify or compute packet checksums, offloading this routine calculation from the host.[22]
Configuration of these features is achieved via the -K or --offload option, specifying the interface, feature name, and state, for example, ethtool -K <[interface](/page/Interface)> tso off to disable TSO.[1] Not all features are universally supported; availability depends on the driver and hardware, which can be verified through the -k query output.[1] For instance, Precision Time Protocol (PTP) hardware timestamping, used for precise clock synchronization, is configurable via the -T or --show-time-stamping option to check capabilities, and is commonly supported in Intel Ethernet drivers like ixgbe for devices such as the X550 series.[23][1]
Flow control, which mitigates network congestion by pausing transmission, is managed separately with the -A or --pause option, such as ethtool -A <interface> rx on tx off, enabling receive pause frames while disabling transmit ones, with autonegotiation optionally toggled.[1]
Enabling these offloads generally reduces CPU utilization by shifting processing to the NIC, potentially increasing throughput in high-bandwidth scenarios.[21][22] However, implementation bugs in drivers or hardware can lead to issues like packet loss, incorrect segmentation, or discarded header data, particularly with aggressive coalescence in LRO, necessitating careful testing and occasional disabling for reliability.[21][24]
Interrupt coalescing parameters allow administrators to optimize network interrupt handling by throttling the frequency of interrupts generated by the network interface card (NIC), thereby reducing CPU overhead at the potential cost of increased latency. The ethtool -C <[interface](/page/Interface)> rx-usecs <value> rx-frames <value> tx-usecs <value> command sets the receive (RX) and transmit (TX) coalescing values, where rx-usecs specifies the maximum time in microseconds to delay an RX interrupt after a packet arrives, rx-frames defines the number of RX frames to receive before triggering an interrupt, and analogous parameters apply to TX operations. These adjustments are particularly useful in high-throughput environments, as enabling adaptive coalescing (adaptive-rx on or adaptive-tx on) dynamically tunes parameters based on traffic load to balance performance.[1][25]
Ring parameters control the depth of RX and TX queues, influencing buffer capacity and potential packet loss under bursty traffic. Using ethtool -G <interface> rx <size> tx <size>, the RX and TX ring sizes can be adjusted up to driver-imposed limits, such as a maximum of 4096 entries for many common NIC drivers like those from Intel or Broadcom, to accommodate higher data rates without overwhelming system memory. Larger rings enhance throughput by allowing more packets to be queued before processing but may increase latency and memory usage, requiring careful tuning based on workload characteristics.[1][7]
Channel configuration enables multi-queue support to distribute traffic across multiple CPU cores via Receive Side Scaling (RSS), improving parallelism on multi-core systems. The ethtool -L <interface> combined <N> option sets the number of combined RX/TX/other channels, directing flows to specific queues for better load balancing, especially beneficial for high-speed links where single-queue bottlenecks can limit performance. This complements offload features by scaling queue distribution, though it requires RSS to be enabled on the NIC.[1]
To evaluate the impact of these tunings, administrators can monitor statistics with ethtool -S <interface>, which reports metrics such as packets received/transmitted, errors, and drops before and after adjustments, revealing trade-offs like reduced CPU interrupts (saving cycles) against higher per-packet latency. For instance, aggressive coalescing might lower CPU utilization by 20-30% in high-traffic scenarios.[1][25]
Ethtool supports advanced features for modern high-speed network interface cards (NICs) such as 100G+ devices, including flow director filters for precise packet steering to queues on hardware like the Intel E810 or NVIDIA ConnectX series adapters. These capabilities leverage the netlink interface for control over high-bandwidth flows.[7][26]
Practical Examples
Diagnostic Commands
Ethtool provides several query commands essential for diagnosing network interface issues, allowing administrators to inspect link status, error counters, hardware registers, physical port identification, and software versions without altering configurations. These tools are particularly valuable in data centers or server environments where rapid identification of cabling faults, hardware failures, or software incompatibilities can minimize downtime.[1]
To check link detection, the basic ethtool <interface> command displays the current media settings, including the "Link detected" status, which indicates whether a physical connection is established. A "Link detected: no" result often points to issues such as unplugged or faulty cables, incompatible or improperly seated SFP modules, or defective hardware on the NIC or switch port; troubleshooting typically involves verifying cable connections, inspecting SFPs for compatibility, and using ip link show <interface> to confirm the absence of "NO-CARRIER" state before escalating to hardware replacement.[1][27]
For analyzing error statistics, ethtool -S <interface> retrieves NIC-specific counters, including receive (rx) and transmit (tx) errors, drops, and detailed breakdowns like CRC errors or overruns. Rx_errors aggregate bad packets received, often due to physical layer problems; CRC errors specifically signal data corruption from faulty cables, connectors, or electromagnetic interference, while overruns indicate buffer overflows from high traffic or insufficient interrupt handling. Tx_errors reflect transmission failures, such as collisions or aborts, commonly linked to duplex mismatches or switch issues; interpreting these involves comparing rates over time—if errors exceed 1% of total packets, it typically warrants hardware inspection rather than software tweaks.[1][28][29]
Hardware-level debugging uses ethtool -d <interface>, which dumps the device's internal registers in hexadecimal format (or decoded if the driver supports it), enabling cross-referencing with vendor-specific documentation to identify misconfigurations or faults like incorrect PHY settings. This output is crucial for advanced troubleshooting, such as verifying register values against driver source code or errata sheets during suspected firmware glitches.[1][30]
To physically locate a port in a rack-mounted setup, ethtool -p <interface> [seconds] activates the identify function, typically blinking the port's LED for the specified duration (default 3 seconds, e.g., 60 for a full minute), aiding in cable tracing without disrupting operations.[1]
Version mismatches can be diagnosed with ethtool -i <interface>, which outputs the driver name, kernel module version, firmware version, and bus information; discrepancies here, such as outdated firmware relative to the driver, may cause instability, requiring updates from the vendor to ensure compatibility per release notes.[1][31]
Configuration Scenarios
In practical network configurations, ethtool is often used to force specific link speeds and duplex modes on Ethernet interfaces connected to legacy switches that do not support modern auto-negotiation protocols. For instance, to configure an interface named eth0 to operate at 1000 Mbps in full duplex mode without auto-negotiation, the command ethtool -s eth0 speed 1000 duplex full autoneg off can be executed, ensuring stable connectivity in environments where hardware limitations prevent dynamic speed detection.[1] This approach is particularly useful in older data center setups or industrial networks, where mismatched negotiation can lead to link failures, and the setting takes effect immediately upon execution.[32]
Enabling Wake-on-LAN (WoL) allows remote powering of devices over the network, a common requirement in server farms for maintenance without physical access. The command ethtool -s eth0 wol g activates MagicPacket support on the eth0 interface, where 'g' specifies the MagicPacket mode that responds to a broadcast packet containing the device's MAC address.[1] To make this persistent across reboots in systems using ifupdown, such as Debian or Ubuntu derivatives, a script can be placed in /etc/network/if-up.d/, for example, a file named wol-enable containing #!/bin/sh -e\nethtool -s $IFACE wol g and made executable with chmod +x, ensuring the setting applies every time the interface comes up.[33] This integration automates WoL in boot processes, reducing manual intervention in remote server optimization scenarios.[34]
For high-throughput servers handling heavy traffic loads, such as web proxies or database clusters, configuring multi-queue support distributes packet processing across multiple CPU cores to enhance parallelism and reduce bottlenecks. The command ethtool -L eth0 combined 8 sets eight combined receive/transmit queues on the eth0 interface, allowing the NIC to fan out incoming packets to different queues for balanced load distribution.[1] Verification can be performed with ethtool -l eth0, which displays the current queue configuration, confirming the allocation for improved scalability in multi-core environments.[1] This setup is essential for server optimization, as it leverages RSS (Receive Side Scaling) to achieve higher packet rates without overwhelming single queues.[35]
In VLAN-integrated networks, such as those using IEEE 802.1Q for traffic segmentation in enterprise or cloud setups, ethtool enables toggling of VLAN tagging offloads to offload header insertion and stripping from the CPU to the NIC hardware. Using ethtool -K eth0 rxvlan on txvlan on activates receive and transmit VLAN acceleration, allowing the interface to efficiently handle 802.1Q-tagged frames by parsing or adding the 4-byte VLAN tag directly in hardware.[1] Disabling these with ethtool -K eth0 rxvlan off txvlan off may be necessary in certain bridging configurations to prevent premature tag removal, ensuring compatibility with virtual switches or aggregated links.[1] This offload reduces latency and CPU utilization in VLAN-heavy deployments, such as virtualized hosts with multiple tenants.
To achieve persistent ethtool configurations across system restarts, integration with network management tools like NetworkManager (via nmcli) or systemd-networkd is recommended for modern Linux distributions. For example, with nmcli, settings can be applied to a connection profile using nmcli connection modify <connection-name> 802-3-ethernet.wake-on-lan magic ethtool.feature-rxvlan on[36], where <connection-name> is the active profile (e.g., "Wired connection 1"), making changes survive reboots through NetworkManager's persistent storage.[37] Similarly, in systemd-networkd setups, WakeOnLan can be specified in .link files under the [Link] section, such as WakeOnLan=magicpacket in /etc/systemd/network/10-eth0.link, ensuring automated application during interface activation for consistent server or VLAN environments. For other ethtool options, custom commands can be applied via drop-in units.[38] These methods provide a declarative way to maintain configurations without relying on temporary scripts.
mii-tool is a utility designed to query and set the status of a network interface's Media Independent Interface (MII) unit, primarily used on early Ethernet adapters to manage basic parameters such as link speed and duplex mode.[39] It facilitates autonegotiation between the network interface and the transceiver, allowing users to check the current negotiated settings or manually force specific configurations like 10baseT half-duplex or 100baseTx full-duplex.[39] This tool emerged as part of the net-tools suite to support the MII standard introduced in the 1990s for Fast Ethernet (100 Mbps) connections.[39]
The basic command mii-tool displays the status of the specified interface, such as eth0, reporting details like the negotiated speed, duplex mode, and link state—for example, "eth0: negotiated 100baseTx-FD, link ok".[39] For more detailed output, the -v option provides verbose information, including transceiver registers and advertisement capabilities.[39] To configure settings, users can employ the -F option to force a mode, as in mii-tool -F 100baseTx-FD eth0, or -A to advertise specific media types during autonegotiation.[39] Additional options include -r to restart autonegotiation and -w to continuously monitor link status at one-second intervals.[39]
mii-tool is limited to interfaces equipped with MII or Gigabit MII (GMII) transceivers, focusing solely on basic link parameters without support for advanced features such as offload capabilities, detailed statistics, or modern Ethernet standards beyond Fast Ethernet.[39] It does not handle newer PHY types or provide comprehensive diagnostics, making it unsuitable for contemporary network hardware.[39]
Although still available in the net-tools package across many Linux distributions, mii-tool has been deprecated in favor of more capable tools like ethtool, with upstream development of net-tools being sporadic—the last release (version 2.10) occurring on January 7, 2021—though distributions have applied patches since earlier versions.[40][41][42]
ethtool supersedes mii-tool by leveraging the full ethtool kernel API, enabling comprehensive support for modern network interface controllers (NICs) that include advanced offload features, detailed diagnostics, and higher-speed interfaces beyond 100 Mbps, whereas mii-tool is restricted to basic Media Independent Interface (MII) negotiation primarily for 10/100 Mbps Ethernet cards.[39][1][43]
mii-tool was marked obsolete around the introduction of the Linux 2.6 kernel series in 2003, with its limitations highlighted in documentation and recommendations to migrate to ethtool; by the 2010s, it had been removed or made optional in major distributions such as Red Hat Enterprise Linux and Fedora, as part of broader efforts to deprecate the net-tools package.[41]
For migration, commands like mii-tool -F 100baseTx-FD eth0 can be directly replaced with ethtool -s eth0 speed 100 duplex full, and existing scripts can be updated using tools such as sed or awk to parse and convert mii-tool syntax to ethtool equivalents for compatibility.[44][45]
ethtool offers advantages including broader hardware compatibility for Gigabit and faster Ethernet, more parseable and scripting-friendly output formats that facilitate automation, and independence from the deprecated net-tools suite, making it suitable for contemporary network management tasks.[1][46]
As of 2025, mii-tool is retained only for legacy systems with older NICs, while ethtool serves as the primary utility, handling the vast majority of network configuration and diagnostic needs in modern Linux environments.[3]
Integration and Alternatives
Kernel Integration
Ethtool interacts with the Linux kernel's networking subsystem primarily through the SIOCETHTOOL ioctl, defined in the kernel's socket interface, which enables user-space applications to send commands for querying and configuring network device parameters. This ioctl dispatches requests to the driver's implementation of the ethtool_ops structure, a set of callbacks registered via the net_device operations that expose hardware-specific settings, including link negotiation, offload capabilities, and diagnostic information. The ethtool_ops framework ensures that drivers can handle a standardized set of operations while allowing vendor-specific extensions.[7]
Support for ethtool is integral to modern network drivers, which must implement ethtool_ops as part of their net_device registration to enable full feature exposure. For instance, Intel's igb driver for Gigabit Ethernet controllers and ixgbe driver for 10 Gigabit controllers provide comprehensive ethtool integration, supporting operations like ring buffer sizing and interrupt moderation directly through kernel callbacks.[47][48] This driver-level requirement ensures compatibility and performance tuning across diverse hardware in the Linux ecosystem.
Recent enhancements in the Linux kernel, beginning with version 6.10 released in July 2024, have expanded the ethtool netlink interface to offer more robust user-space control, reducing reliance on traditional ioctls for certain operations. The netlink family, using generic netlink with the ETHTOOL_GENL_NAME, now supports features such as Power over Ethernet (PoE) status and configuration via new attributes like ETHTOOL_A_PSE, alongside improved handling for multi-PHY devices.[49] These updates, further refined in subsequent releases through 2025, enable asynchronous notifications and multicast support for monitoring changes without polling ioctls.[50]
From a security perspective, ethtool commands necessitate elevated privileges, typically executed as root, with the kernel validating CAP_NET_ADMIN capability for all "set" and "action" requests to safeguard network device modifications.[7] This enforcement prevents unprivileged processes from altering hardware states, such as enabling promiscuous mode or flashing firmware, while allowing read-only queries for most users.[51]
For extensibility, kernel drivers can define private flags—driver-specific bitmasks accessible via the ETHTOOL_GPFLAGS and ETHTOOL_SPFLAGS ioctls, queried and modified using the ethtool -k command—to expose custom hardware controls not covered by standard operations.[7] Additionally, ethtool integrates with the devlink subsystem for advanced hardware management, such as querying firmware versions or reloading device configurations, bridging ethtool's ioctl-based model with devlink's netlink API for more complex scenarios.
Other Network Utilities
The iproute2 suite offers a collection of command-line utilities for advanced network configuration and monitoring on Linux systems, serving as a modern complement to ethtool by handling aspects like interface state and traffic management. Specifically, the ip link command enables users to bring network interfaces up or down, configure maximum transmission units (MTU), and manage basic link properties, providing essential control over device activation without delving into hardware-specific features. Meanwhile, the tc (traffic control) tool within iproute2 allows for shaping, scheduling, and policing network traffic, which overlaps with ethtool's capabilities in configuring receive and transmit queues on network interface cards (NICs) by adjusting software-based queuing disciplines that interact with hardware offloads.[52][53][54]
NetworkManager, a widely used daemon for network configuration, integrates ethtool features through its command-line interface nmcli, enabling persistent application of settings across reboots in desktop and server environments. Administrators can use commands like nmcli dev set <interface> ethtool.<feature> <value> to configure hardware parameters such as wake-on-LAN or offload states directly within connection profiles, ensuring these changes survive system restarts unlike transient ethtool invocations. This integration simplifies management in dynamic setups, combining ethtool's low-level tweaks with NetworkManager's higher-level persistence and GUI support via tools like nmtui.[37]
Several alternatives address network tasks beyond ethtool's primary focus on wired Ethernet interfaces. The deprecated ifconfig utility from the net-tools package once handled basic interface configuration but has been superseded by iproute2's ip commands due to its lack of support for modern kernel features. For wireless networks, where ethtool's functionality is limited to basic driver queries, the iw tool provides comprehensive management of Wi-Fi interfaces, including scanning, association, and station configuration. Additionally, devlink serves as a specialized alternative for switchdev-enabled devices, allowing configuration of hardware offloads in network switches and NICs, such as port splitting or firmware updates, through a netlink-based interface that extends beyond ethtool's scope.[55][56][57][58]
For programmatic access, the libnl suite provides libraries to interact with Linux kernel netlink interfaces, including the ethtool netlink family for querying and controlling NIC settings without direct ethtool binary calls. This enables developers to build custom applications that leverage netlink for efficient, kernel-direct communication on features like link modes and statistics. In Python scripting environments, the ethtool module offers bindings to the kernel interface, allowing scripts to retrieve or modify interface parameters such as speed, duplex, and offloads in an object-oriented manner.[7][59][8]
Administrators typically select ethtool for low-level, hardware-centric NIC diagnostics and tuning on wired interfaces, while turning to iproute2 for routing, addressing, and broader traffic engineering. In scenarios involving wireless hardware, ethtool proves insufficient, necessitating tools like iw for spectrum management and association control, ensuring the right utility matches the network layer and device type.[60][61]