ethtool

On this page 7

ethtool is the standard Linux command-line utility for querying and configuring network interface hardware settings, including link speed, duplex mode, auto-negotiation, offload features, ring buffer sizes, interrupt coalescing and driver statistics. In Linux networking, it works below the IP layer: where the ip command manages addresses and routes, ethtool manages the physical and driver-level behavior of the network interface card.

Administrators use ethtool to diagnose link problems, confirm that a server negotiated the expected speed, tune high-throughput hosts and read error counters that no other tool exposes. Its output depends heavily on the driver and hardware, so the same command can return rich detail on one card and only a few fields on a virtual interface.

How ethtool talks to network drivers

ethtool sends requests to the kernel, which forwards them to the network driver’s ethtool operations, a set of callbacks each driver implements for the features it supports. Historically, the tool used the `SIOCETHTOOL` ioctl with fixed binary structures. Since kernel 5.6, it can use the ethtool netlink interface, which is extensible, supports notifications and allows partial updates without rewriting whole structures.

Because every request ends in driver code, ethtool reports what the driver claims, not an independent measurement. A virtual interface such as a veth pair or a bridge may show an unknown speed, and a paravirtualized adapter may report a nominal speed that has no relation to real throughput. Reading settings is allowed for ordinary users in many cases, while changing them requires the `CAP_NET_ADMIN` capability.

The table below maps the most common options to the driver feature they reach.

OptionPurposeTypical use
ethtool eth0Show link settingsCheck speed, duplex and link status
-sChange link settingsForce speed or toggle auto-negotiation
-iShow driver informationIdentify driver, version and firmware
-SShow NIC statisticsRead drops, errors and queue counters
-k / -KShow or set offloadsEnable or disable TSO, GRO and checksums
-g / -GShow or set ring sizesEnlarge buffers to reduce drops
-c / -CShow or set coalescingBalance latency against CPU load
-l / -LShow or set channelsChange the number of queues
-mRead module EEPROMInspect SFP optics and power levels
Core ethtool options and what they control

The link settings describe the physical connection: speed, duplex, port type, auto-negotiation state and the modes advertised by both link partners. A healthy gigabit or faster copper link should normally show auto-negotiation on and full duplex; forcing values on one end only is a classic cause of a duplex mismatch, which produces late collisions and very poor throughput.

Offloads move work from the CPU to the network card or to optimized kernel paths. TCP segmentation offload lets the stack hand large buffers to the card, generic receive offload merges incoming packets, and checksum offload computes checksums in hardware. These features raise throughput and lower CPU use, but they can confuse packet captures, because tcpdump on the host sees merged or not-yet-segmented frames.

The following table summarizes the main tuning parameters and their trade-offs.

ParameterBenefit of raising or enablingCost or risk
Ring buffer sizeFewer drops during burstsMore memory and slightly higher latency
Interrupt coalescingLower CPU load per packetAdded latency for small flows
Channel countSpreads load across CPU coresMore interrupts and memory
Segmentation offloadHigher throughput, less CPUCaptures show oversized frames
Receive offloadFewer packets through the stackCan interfere with forwarding setups
Flow controlAvoids drops on congested linksPauses can spread congestion
Tunable parameters and their trade-offs

ethtool compared with other Linux networking tools

ethtool fills a narrow but essential niche: it is the only common tool that reaches driver-level hardware settings. Other utilities in the Linux networking toolbox manage addressing, routing, filtering or connection profiles, and they cannot replace it.

ToolLayer it managesExample task
ethtoolPhysical link and driverCheck negotiated speed and NIC errors
ip commandAddresses, routes, linksAssign an address or bring a link up
ifconfigLegacy addressingOlder interface configuration
nmcliNetworkManager profilesPersist connection settings
tcpdumpPacket captureInspect traffic on an interface
nftablesPacket filteringDefine firewall rules
Scope of ethtool and neighboring tools

The ip command can show a basic link state and packet counters, but only ethtool exposes per-queue statistics, offload flags and transceiver data. Conversely, ethtool does not configure addresses, VLANs or routes.

Making ethtool settings persistent

Changes made with ethtool are lost at reboot or when the driver reloads, because they live only in the running driver. Persistence must come from the network configuration layer in use, and each layer has its own syntax.

Configuration systemMechanismNotes
NetworkManagerethtool.* properties via nmcliCovers offloads, rings and coalescing
systemd-networkd.link files in /etc/systemd/networkApplied by udev when the device appears
NetplanRenderer-specific optionsCoverage depends on the backend
ifupdownpre-up or post-up commandsRuns ethtool when the interface starts
udev ruleRUN action on device addWorks without a network manager
Ways to persist ethtool settings

A systemd `.link` file is often the cleanest choice for hardware properties, because it applies settings as soon as the device is detected, before any connection manager touches it.

Common mistakes and diagnostic pitfalls

Most problems with ethtool come from misreading driver output or from changing settings without a baseline. Experienced engineers record the current values first and change one parameter at a time.

  • Forcing speed and duplex on one side only breaks auto-negotiation and often causes a duplex mismatch.
  • Trusting reported speed on virtual NICs is misleading, since the value is nominal.
  • Comparing statistics across drivers fails, because counter names under -S are vendor-specific.
  • Disabling offloads permanently to make captures readable wastes CPU on production hosts.
  • Ignoring firmware versions from -i hides known driver and firmware bugs.
  • Increasing rings without checking drops first may add latency with no benefit.

Understanding it simply

A network card is the part of a computer that connects it to a cable or network switch. ethtool is a tool that lets a Linux user ask the network card how it is doing and change some of its behavior: how fast it talks, how much it can hold at once and how much work it takes off the main processor.

Think of it as the dashboard and settings panel for the network plug. Other tools decide where traffic goes; ethtool checks and adjusts the connection itself.

Applied in practice

A storage server in a small data center suddenly delivers only about 90 megabytes per second instead of the expected 1 gigabyte per second over a 10 gigabit link. The administrator runs ethtool eth0 and sees that the link has negotiated only 1000 Mb/s. The command ethtool -m eth0 shows the optical module reporting low receive power, which points to a dirty or damaged fiber.

After the technician cleans the connector, the link returns at 10000 Mb/s. Statistics from ethtool -S still show rx_missed_errors rising during backups, so the administrator raises the receive ring from 512 to 4096 entries with ethtool -G and adds the value to a systemd .link file. Drops stop, and backup windows shrink by more than half, all diagnosed without opening the server.