Where to start First steps track · 15 stages
Linux Labs

ethtool — network card settings

4 min Linux · ethtool

Link speed and duplex, error statistics, cable type — NIC diagnostics.

Cheat sheet

5 commands Printable version
  • sudo ethtool eth0 Speed/Duplex/Link
  • sudo ethtool -S eth0 errors/drops
  • sudo ethtool -i eth0 driver/firmware
  • sudo ethtool -g eth0 ring buffers (-G to change them)
  • sudo ethtool -p eth0 10 blink the port (find it physically)

Overview

ethtool shows and configures physical network card parameters: speed, duplex, link state, error statistics, offload features. When "the network is slow at the hardware level", this is where you look.

bash
sudo ethtool eth0                 # speed, duplex, whether there's a link
sudo ethtool -i eth0              # driver and firmware

Options

8
Flag Meaning
(none) Speed / Duplex / Link detected / supported modes
-i driver, version, firmware, bus
-S NIC statistics (errors, drops, collisions)
-k offload state (gro/gso/tso/checksum)
-K turn offload on/off
-g / -G ring buffer sizes (show/set)
-p N blink the indicator for N seconds (find the port)
-s set speed/duplex/autoneg/wol
Option What it does Example
-i --driver Show the driver, version, and firmware of the network card. sudo ethtool -i eth0
-S --statistics NIC statistics — errors, drops, collisions. sudo ethtool -S eth0
-k --show-features State of offload features (gro, gso, tso, checksum). sudo ethtool -k eth0
-g --show-ring Show the sizes of the RX/TX ring buffers. sudo ethtool -g eth0
-p --identify seconds Blink the port's indicator for the given number of seconds — to find it physically. sudo ethtool -p eth0 10
-K --features Turn an offload feature on or off. dangerous sudo ethtool -K eth0 gro off
-G --set-ring Set a ring buffer size (useful when drops occur under load). sudo ethtool -G eth0 rx 4096
-s --change Force speed/duplex/autoneg/wol; usually unnecessary and breaks negotiation. dangerous sudo ethtool -s eth0 speed 1000 duplex full autoneg off

Nothing found. Try a shorter query.

Recipes

1

Commands

bash
sudo ethtool eth0                 # Speed/Duplex/Link detected
sudo ethtool -S eth0             # statistics (rx_errors, rx_dropped, crc)
sudo ethtool -S eth0 | grep -iE 'err|drop|crc'   # only the problem counters
sudo ethtool -i eth0             # driver/version/firmware
sudo ethtool -k eth0             # offload flags (gro, tso, …)
sudo ethtool -g eth0             # RX/TX ring buffer sizes
sudo ethtool -p eth0 10          # blink the indicator for 10s (find the port physically)

# changes (temporary; permanent goes through netplan/networkd):
sudo ethtool -G eth0 rx 4096      # increase the RX buffer (under drops with load)
sudo ethtool -K eth0 gro off      # disable offload (debugging odd latency)
sudo ethtool -s eth0 speed 1000 duplex full autoneg off   # forced (usually NOT needed)

The interface name comes from ip -br l. Permanent settings go through netplan, not one-off ethtool -s calls.

Troubleshooting

5

"The network is slow" at the physical layer

sudo ethtool eth0 → Speed and Duplex. 100Mb/s instead of 1000, or Half duplex, means a bad cable/port/negotiation. Link detected: no means there's no link at all.

Growing errors/drops

ethtool -S eth0 → rx_errors, rx_dropped, rx_crc_errors. CRC errors point to the cable/port/SFP; drops under load point to small ring buffers (raise them with -G) or overload. Compare counters before/after the load.

I don't know which port this is physically

sudo ethtool -p eth0 10 blinks the port's LED for 10 seconds.

Speed "jumps around" / half-duplex

An auto-negotiation problem with the switch. Fix it on both sides (autoneg), not by force-setting -s on one side (a mismatch causes collisions).

Odd latency/timeouts under load

Sometimes offload (GRO/TSO) is the culprit with a specific driver. To check, temporarily run ethtool -K eth0 gro off tso off and compare behavior.

See also

  • ip — Managing interfaces, addresses, and routes (iproute2) — the replacement for ifconfig/route.
  • vlan-bonding — VLAN tags and bonding network cards — configured via netplan, checking it.
  • network-diagnostics — The connectivity-checking ladder — from the gateway to DNS and the destination port.
Loading…