Linux ethtool Examples to Manipulate Ethernet Card

ethtool is a utility for Linux kernel-based operating system for displaying and modifying some parameters of network interface controllers (NICs) and their device drivers. ethtool is developed parallel to the Linux kernel.

The command is useful for

  • Identification and diagnosis of Ethernet devices
  • Extended Ethernet devices statistics
  • Control speed, duplex, auto-negotiation and flow control for Ethernet devices
  • Control checksum offload and other hardware offload features
  • Control DMA ring sizes and interrupt moderation
  • Control receive queue selection for multiqueue devices
  • Upgrade firmware in flash memory

Commands:

ethtool eth0
ethtool -s eth0 autoneg off
ethtool -s eth0 speed 10 autoneg off
ethtool -i eth0
ethtool -K eth0 tso off
ethtool -K eth0 tso on
ethtool -a eth0

Reference: