System Servicesnetworkethernetdriversettingsoffloadcoalescering

ethtool

ethtool displays or changes Ethernet device settings including speed, auto-negotiation, and checksum offload. It queries and controls network driver and hardware settings on many network devices, especially Ethernet.

Description

ethtool is a powerful utility for managing Ethernet device configurations in Linux environments. It allows administrators to query current settings and make changes to parameters such as link speed, duplex mode, auto-negotiation, Wake-on-LAN, and various offload features. This tool is essential for network troubleshooting, performance tuning, and hardware diagnostics.

Common use cases include adjusting interrupt coalescing parameters to optimize CPU usage, configuring RX/TX ring buffer sizes for high-throughput scenarios, enabling or disabling hardware offloads like TCP segmentation offload (TSO), and performing hardware self-tests. ethtool supports a wide range of network interface controllers and provides detailed statistics and diagnostic capabilities.

The tool interacts directly with kernel network drivers through the ethtool ioctl interface, making it a low-level utility for precise network interface control. It's particularly valuable in server environments, embedded systems, and performance-critical networking applications where fine-grained control over NIC behavior is required.

How It Works

ethtool communicates with network drivers via the Linux ethtool kernel interface (SIOCETHTOOL ioctl). It sends commands to query or modify device-specific settings stored in driver private data structures. The tool supports standardized generic options (speed, duplex, autoneg) as well as driver-specific features through extended command sets. Operations like ring parameter changes modify queue depths and buffer allocations, while offload toggles enable/disable hardware acceleration for checksum calculation, packet segmentation, and flow classification. Diagnostic functions access hardware registers, EEPROM contents, and PHY status through MDIO/MDC interfaces.

Installation

bash
sudo apt install ethtool

Flags

-h|--helpShow this help
-i|--driver DEVNAMEShow driver information
-s|--change DEVNAMEChange generic options like speed, duplex, autoneg, wol
-a|--show-pause DEVNAMEShow pause options
-A|--pause DEVNAMESet pause options (autoneg, rx, tx)
-c|--show-coalesce DEVNAMEShow coalesce options
-C|--coalesce DEVNAMESet coalesce options (rx-usecs, tx-frames, adaptive-rx, etc.)
-g|--show-ring DEVNAMEQuery RX/TX ring parameters
-G|--set-ring DEVNAMESet RX/TX ring parameters (rx N, tx N, rx-mini N, etc.)
-k|--show-features|--show-offload DEVNAMEGet state of protocol offload and other features
-K|--features|--offload DEVNAMESet protocol offload and other features
-p|--identify DEVNAMEShow visible port identification (e.g. blinking)
-t|--test DEVNAMEExecute adapter self test (online, offline, external_lb)
-S|--statistics DEVNAMEShow adapter statistics

Examples

Show ethtool version 6.19 and complete usage help
ethtool -h
Display standard information about network device
ethtool [ FLAGS ] DEVNAME
Show driver version and firmware information for the device
ethtool -i DEVNAME
Change device settings to 1Gbps full duplex with auto-negotiation disabled
ethtool -s DEVNAME speed 1000 duplex full autoneg off
Display current state of all protocol offload features
ethtool -k DEVNAME
Show current interrupt coalescing parameters
ethtool -c DEVNAME
Query current RX/TX ring buffer parameters
ethtool -g DEVNAME
Show detailed adapter hardware statistics
ethtool -S DEVNAME
Updated 2026-04-16kali.org ↗