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.
| Option | Purpose | Typical use |
|---|---|---|
ethtool eth0 | Show link settings | Check speed, duplex and link status |
-s | Change link settings | Force speed or toggle auto-negotiation |
-i | Show driver information | Identify driver, version and firmware |
-S | Show NIC statistics | Read drops, errors and queue counters |
-k / -K | Show or set offloads | Enable or disable TSO, GRO and checksums |
-g / -G | Show or set ring sizes | Enlarge buffers to reduce drops |
-c / -C | Show or set coalescing | Balance latency against CPU load |
-l / -L | Show or set channels | Change the number of queues |
-m | Read module EEPROM | Inspect SFP optics and power levels |
Link settings, offloads and performance tuning
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.
| Parameter | Benefit of raising or enabling | Cost or risk |
|---|---|---|
| Ring buffer size | Fewer drops during bursts | More memory and slightly higher latency |
| Interrupt coalescing | Lower CPU load per packet | Added latency for small flows |
| Channel count | Spreads load across CPU cores | More interrupts and memory |
| Segmentation offload | Higher throughput, less CPU | Captures show oversized frames |
| Receive offload | Fewer packets through the stack | Can interfere with forwarding setups |
| Flow control | Avoids drops on congested links | Pauses can spread congestion |
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.
| Tool | Layer it manages | Example task |
|---|---|---|
| ethtool | Physical link and driver | Check negotiated speed and NIC errors |
| ip command | Addresses, routes, links | Assign an address or bring a link up |
| ifconfig | Legacy addressing | Older interface configuration |
| nmcli | NetworkManager profiles | Persist connection settings |
| tcpdump | Packet capture | Inspect traffic on an interface |
| nftables | Packet filtering | Define firewall rules |
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 system | Mechanism | Notes |
|---|---|---|
| NetworkManager | ethtool.* properties via nmcli | Covers offloads, rings and coalescing |
| systemd-networkd | .link files in /etc/systemd/network | Applied by udev when the device appears |
| Netplan | Renderer-specific options | Coverage depends on the backend |
| ifupdown | pre-up or post-up commands | Runs ethtool when the interface starts |
| udev rule | RUN action on device add | Works without a network manager |
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
-Sare vendor-specific. - Disabling offloads permanently to make captures readable wastes CPU on production hosts.
- Ignoring firmware versions from
-ihides 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.