cheat-sheets

ethtool

ethtool queries and changes the settings of Ethernet network interfaces: link speed and duplex, offloads, ring buffers, driver details and Wake-on-LAN. Use it when a link negotiates slower than expected or a NIC drops packets.

Documentation: ethtool(8) Project: ethtool

Verification: options were checked against the ethtool man page in Ubuntu 24.04. Support for each option depends on the NIC and driver, and virtual NICs often reject changes. Changes are lost at reboot unless persisted (see below).

COMMANDDESCRIPTION
sudo ethtool <IF>Speed, duplex, auto-negotiation and link detected
sudo ethtool -s <IF> speed 1000 duplex full autoneg offForce speed and duplex (both ends must match)
sudo ethtool -s <IF> autoneg onRe-enable auto-negotiation
sudo ethtool -r <IF>Restart auto-negotiation
sudo ethtool -i <IF>Driver, driver version and firmware
sudo ethtool -P <IF>Permanent MAC address

Statistics #

COMMANDDESCRIPTION
sudo ethtool -S <IF>NIC and driver counters (errors, drops, missed)
sudo ethtool -S <IF> | grep -iE 'err|drop|miss'Only the error counters
sudo ethtool -m <IF>SFP/SFP+ module data (optical levels, vendor)
sudo ethtool -T <IF>Timestamping capabilities

Offloads #

COMMANDDESCRIPTION
sudo ethtool -k <IF>Show offload features
sudo ethtool -K <IF> tso off gso off gro offDisable TCP segmentation, generic segmentation and generic receive offload
sudo ethtool -K <IF> rx-checksumming offDisable receive checksum offload

Turn offloads off to diagnose odd packet captures or a driver bug, not as a permanent fix. See tcpdump captures in Network Troubleshooting.

Ring Buffers and Queues #

COMMANDDESCRIPTION
sudo ethtool -g <IF>Current and maximum ring buffer sizes
sudo ethtool -G <IF> rx 4096 tx 4096Enlarge ring buffers (up to the reported maximum)
sudo ethtool -l <IF>Channel (queue) counts
sudo ethtool -c <IF>Interrupt coalescing settings

Wake-on-LAN #

COMMANDDESCRIPTION
sudo ethtool <IF> | grep -i wakeSupported and current Wake-on modes (g = magic packet)
sudo ethtool -s <IF> wol gEnable wake on magic packet

Persist it with your network manager; see Wake-on-LAN.

Persist a Setting #

ethtool changes do not survive a reboot. With systemd-networkd, put them in the .link file:

ini
# /etc/systemd/network/10-lan.link
[Match]
MACAddress=00:00:5e:00:53:01

[Link]
WakeOnLan=magic

With NetworkManager, use nmcli connection modify <CONNECTION> ethtool.feature-tso off (property names follow the offload names in nmcli documentation; unverified here).

Troubleshooting #

SYMPTOMFIX
Link at 100 Mb/s on a gigabit portCheck the cable and both ends; ethtool <IF> shows what the partner advertises
Rising rx_missed or rx_droppedEnlarge the ring buffer with ethtool -G, check CPU load and IRQ balance
Operation not supportedThe driver does not implement that feature (common on virtual NICs)
No Link detectedCable, switch port or SFP; try ethtool -r <IF>

See Also #

Search all sheets

Tip: / or Ctrl/Cmd+K to open, Esc to close.