Master ethtool: How to Query and Configure Network Interface Settings
ethtool is a Linux command-line utility for querying and modifying network interface parameters, offering options to view driver info, adjust speed, duplex, offload settings, and perform self-tests, with practical examples demonstrating how to inspect and configure interfaces such as ens33.
ethtool: Query and Set Network Interface Parameters
Function Description
ethtool command is used to query and set network interface parameters.
Command Syntax
ethtool [options] [interface]Option Meanings
-a Show the status of RX, TX, and Autonegotiation modules: on or off.
-A Modify the status of RX, TX, and Autonegotiation modules: on or off.
-c display the Coalesce information of the specified ethernet card.
-C Change the Coalesce setting of the specified ethernet card.
-g Display the rx/tx ring parameter information of the specified ethernet card.
-G change the rx/tx ring setting of the specified ethernet card.
-i Show driver information such as name and version.
-d Show register dump information; not supported by all drivers.
-e Show EEPROM dump information; not supported by all drivers.
-E Modify EEPROM byte.
-k Show Offload parameters status: on or off, including rx-checksumming, tx-checksumming, etc.
-K Modify Offload parameters status.
-p Identify the physical location of the NIC by flashing its port LED; N indicates duration in seconds.
-r If autonegotiation is on, restarts it.
-S Show NIC- and driver-specific statistics such as bytes and broadcast packets.
-t Run self-test in offline or online mode.
-s Modify interface settings such as speed, duplex mode, MAC address, etc.Parameter Examples
Example 1: Query Interface Parameters
Query basic information and driver details, and view statistics.
// Query basic interface information
# ethtool ens33
// Identify which physical NIC corresponds to ens33
# ethtool -p ens33 10 // LED flashes for 10 seconds
// Show driver information
# ethtool -i ens33
driver: e1000
version: 7.3.21-k8-NAPI
// Show error statistics
# ethtool -S ens33Example 2: Configure Interface Parameters
Set work mode, speed, disable TX, and adjust checksum offload.
// Set work mode
# ethtool -s ens33 autoneg off speed 100 duplex full
// Reduce speed to 100Mbps
# ethtool -s ens33 speed 100
// Stop TX module
# ethtool -A tx off ens33
// Verify TX status
# ethtool -a ens33
// Disable receive checksum offload
# ethtool -K ens33 rx off
// Verify checksum offload status
# ethtool -k ens33Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
