What it does
ethtool queries and configures Ethernet device parameters exposed by the kernel driver. It’s the go-to tool when you need to answer: “Is this link really 1Gb/Full?”, “What driver is loaded?”, “Are offloads enabled?”, “Why is throughput terrible?”, or “Is the NIC negotiating correctly?”.
How it works (mechanical)
NIC drivers export capabilities and settings through kernel APIs (ethtool ops).
ethtool calls into those interfaces (often via netlink/ioctls),
and the driver reports or applies changes such as negotiated speed,
pause frames, checksum/TSO/GRO offloads, queue/ring parameters, and statistics.
- Reads current negotiated link state from the PHY/driver
- Queries driver + firmware metadata
- Toggles hardware offload features (when supported)
- Adjusts rings/queues for performance tuning
10 Practical Examples
# 1) Show basic link status (speed/duplex/link detected) ethtool eth0
# 2) Show driver + firmware info (great first diagnostic step) ethtool -i eth0
# 3) Show supported modes + advertised modes (autoneg view) ethtool eth0 | sed -n '1,60p'
# 4) Show offload features (tx/rx checksums, TSO, GRO, etc.) ethtool -k eth0
# 5) Toggle an offload feature (example: disable GRO temporarily) sudo ethtool -K eth0 gro off
# 6) Force speed/duplex (use sparingly; can break negotiation) # Example: 1000Mb/s full duplex, autoneg off sudo ethtool -s eth0 speed 1000 duplex full autoneg off
# 7) Re-enable autonegotiation (often the right “undo”) sudo ethtool -s eth0 autoneg on
# 8) Show NIC statistics (driver-dependent, but very useful) ethtool -S eth0 | less
# 9) View ring buffer sizes (RX/TX) and adjust (performance tuning) ethtool -g eth0 sudo ethtool -G eth0 rx 4096 tx 4096
# 10) Blink the NIC LED to identify which port you’re on (if supported) sudo ethtool -p eth0 10
Notes & Gotchas
- Forcing speed/duplex can create mismatches. Prefer autoneg unless you have a specific reason.
- Offload toggles are great for debugging weird throughput/latency issues, but can change CPU load.
- Settings persistence: changes often reset on reboot or link flap unless managed by NetworkManager/systemd scripts.
- Driver support varies: some flags and stats are device/driver specific.
- Virtual interfaces: many settings don’t apply to VLANs, bridges, tunnels; target the underlying NIC.
Historical Context
Before ethtool, Linux networking used older tools like mii-tool for basic
link negotiation. ethtool became the standard because it exposes far more NIC features
and provides a consistent interface across drivers.
Modern Equivalent / Related Tools
- ip — interface state, addresses, routes
- ss — socket statistics (replacement for netstat)
- nmcli — NetworkManager control (persistence + profiles)
- networkctl — systemd-networkd status
- perf / sar — performance monitoring when tuning offloads/rings