Useful ethtool commands.
Ethtool is a user space utility for displaying and configuring the Network Interface Unit.

Useful ethtool commands
Ethtool is a user space utility for displaying and configuring the Network Interface Unit. This article is an attempt to summarise the most useful ethtool commands with examples
Ethtool for ethtool
Ethool provides commands like ethtool -h which contains a pretty good documentation of the tool usage.
man ethtool gives further information about how to use ethtool
ethtool -version : the current version of ethool
Installation
apt-get install ethtool
Ethool Query Commands
To check the current settings of the nic interface.
ethool ethX
Settings for eno1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: on
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x000000ff (255)
drv probe link timer ifdown ifup rx_err tx_err
Link detected: yes
- Speed: The speed in which the interface is configured
- Duplex: The duplex mode device is configured
- Link detected : Shows if the physical interface is actually connected to the network
- Information about the Supported speeds and Duplex modes
- Idea about whether the interface supports auto negotiation or not or forward error correction is supported or not
All the information can be useful links to the current state of the interface.
ethtool -i ethX
driver: tg3
version: 3.137
firmware-version: FFV20.6.18 bc 5720-v1.39
expansion-rom-version:
bus-info: 0000:04:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
Giving out the more driver specific information of the interface
- The driver and the version of the driver is available from here.
- The Bus information which is available in lspci
- The “supports” prefix parameters gives insight about the other supported commands in the ethtool by the driver.
Ethtool Debug Command
This category of commands can be used for debugging purpose.
ethtool -S ethX
NIC statistics:
rx_packets: 0
tx_packets: 0
rx_bytes: 0
tx_bytes: 0
rx_broadcast: 0
tx_broadcast: 0
rx_multicast: 0
tx_multicast: 0
rx_errors: 0
tx_errors: 0
tx_dropped: 0
multicast: 0
collisions: 0
rx_length_errors: 0
rx_over_errors: 0
rx_crc_errors: 0
rx_frame_errors: 0
rx_no_buffer_count: 0
rx_missed_errors: 0
tx_aborted_errors: 0
tx_carrier_errors: 0
tx_fifo_errors: 0
tx_heartbeat_errors: 0
tx_window_errors: 0
tx_abort_late_coll: 0
tx_deferred_ok: 0
tx_single_coll_ok: 0
tx_multi_coll_ok: 0
tx_timeout_count: 0
tx_restart_queue: 0
rx_long_length_errors: 0
rx_short_length_errors: 0
rx_align_errors: 0
tx_tcp_seg_good: 0
tx_tcp_seg_failed: 0
rx_flow_control_xon: 0
rx_flow_control_xoff: 0
tx_flow_control_xon: 0
tx_flow_control_xoff: 0
rx_csum_offload_good: 0
rx_csum_offload_errors: 0
rx_header_split: 0
alloc_rx_buff_failed: 0
Above command can be used to extract the network usage statistics. Different drivers support different parameters but the mainly supported once are the tx/rx packet statistics
ethtool -m ethX
Identifier : 0x11 (QSFP28)
Extended identifier : 0x00
Extended identifier description : 1.5W max. Power consumption
Extended identifier description : No CDR in TX, No CDR in RX
Extended identifier description : High Power Class (> 3.5 W) not enabled
Connector : 0x23 (No separable connector)
Transceiver codes : 0x88 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Transceiver type : 40G Ethernet: 40G Base-CR4
Transceiver type : 100G Ethernet: 100G Base-CR4 or 25G Base-CR CA-L
Encoding : 0x05 (64B/66B)
BR, Nominal : 25500Mbps
Rate identifier : 0x00
Length (SMF,km) : 0km
Length (OM3 50um) : 0m
Length (OM2 50um) : 0m
Length (OM1 62.5um) : 0m
Length (Copper or Active cable) : 2m
Transmitter technology : 0xa0 (Copper cable unequalized)
Attenuation at 2.5GHz : 5db
Attenuation at 5.0GHz : 7db
Attenuation at 7.0GHz : 9db
Attenuation at 12.9GHz : 14db
Vendor name : Mellanox
Vendor OUI : 00:02:c9
Vendor PN : MCP1600-C002
Vendor rev : A3
Vendor SN : MT1845VS01580
Date code : 181028
Revision Compliance : SFF-8636 Rev 2.0
Module temperature : 0.00 degrees C / 32.00 degrees F
Module voltage : 0.0000 V
Gives out the transceiver specific information. The current temperature and voltage can be of particular interest in this case.
Ethtool Control commands
Can be used to control the configuration of the interface.
Physical interface setting
ethtool -s ethX speed 1000 duplex full autoneg on
Allows to configure the interface speed to (1000) duplex mode to (full) and auto negotiation (enabled)
This would be accepted only if it is listed on supported/advertised modes and the combination should be supported by ethtool
ethtool -s ethX advertise
Limits helps advertise a subset of the advertised modes. It takes hex arguments and below is the accepted inputs.
0x001 10baseT Half
0x002 10baseT Full
0x004 100baseT Half
0x008 100baseT Full
0x80000000000000000 100baseT1 Full
0x010 1000baseT Half (not supported by IEEE standards)
0x020 1000baseT Full
0x100000000000000000 1000baseT1 Full
0x20000 1000baseKX Full
0x20000000000 1000baseX Full
0x800000000000 2500baseT Full
0x8000 2500baseX Full (not supported by IEEE standards)
0x1000000000000 5000baseT Full
0x1000 10000baseT Full
0x40000 10000baseKX4 Full
0x80000 10000baseKR Full
0x100000 10000baseR_FEC
0x40000000000 10000baseCR Full
0x80000000000 10000baseSR Full
0x100000000000 10000baseLR Full
0x200000000000 10000baseLRM Full
0x400000000000 10000baseER Full
0x200000 20000baseMLD2 Full (not supported by IEEE standards)
0x400000 20000baseKR2 Full (not supported by IEEE standards)
0x80000000 25000baseCR Full
0x100000000 25000baseKR Full
0x200000000 25000baseSR Full
0x800000 40000baseKR4 Full
0x1000000 40000baseCR4 Full
0x2000000 40000baseSR4 Full
0x4000000 40000baseLR4 Full
0x400000000 50000baseCR2 Full
0x800000000 50000baseKR2 Full
0x10000000000 50000baseSR2 Full
0x10000000000000 50000baseKR Full
0x20000000000000 50000baseSR Full
0x40000000000000 50000baseCR Full
0x80000000000000 50000baseLR_ER_FR Full
0x100000000000000 50000baseDR Full
0x8000000 56000baseKR4 Full
0x10000000 56000baseCR4 Full
0x20000000 56000baseSR4 Full
0x40000000 56000baseLR4 Full
0x1000000000 100000baseKR4 Full
0x2000000000 100000baseSR4 Full
0x4000000000 100000baseCR4 Full
0x8000000000 100000baseLR4_ER4 Full
0x200000000000000 100000baseKR2 Full
0x400000000000000 100000baseSR2 Full
0x800000000000000 100000baseCR2 Full
0x1000000000000000 100000baseLR2_ER2_FR2 Full
0x2000000000000000 100000baseDR2 Full
0x4000000000000000 200000baseKR4 Full
0x8000000000000000 200000baseSR4 Full
0x10000000000000000 200000baseLR4_ER4_FR4 Full
0x20000000000000000 200000baseDR4 Full
0x40000000000000000 200000baseCR4 Fullethtool — setfec ethX baser
To set the forward error correction mode.
ethtool – set-fec eth<x> encoding auto|off|rs|baser
The supported mode and the current setting can is displayed on
ethtool – show-fec eth<x>
ethtool — set-priv-flags
sets or resets the private flags specific to the device. Useful when you want to have a specific configuration for your driver.
Tuning and/or configuring the device
Display the default rx/tx queue size
ethtool -g ethX
Ring parameters for eth2:
Pre-set maximums:
RX: 1048576
RX Mini: 0
RX Jumbo: 0
TX: 1048576
Current hardware settings:
RX: 1024
RX Mini: 0
RX Jumbo: 0
TX: 4096
Modify the default rx/tx queue size using
ethtool -G eth2 rx 4096 tx 4096
Debug Configurations
ethtool -K ethX rx-all on
Forwarding ingress error packets to network stack
Useful when error packets has to be forwarded to network stack for analysis (eg. tcpdump). Driver by default drops ingress packets received with errors
ethtool -s ethX msglvl 0x40 << Displays Rx packet error levels and codes setup by HW
ethtool -s ethX msglvl 0x80 << Packet transmission errors
Enables the driver debug prints.
Ethtool provides many other options not explained above. There is a good documentation at http://man7.org/linux/man-pages/man8/ethtool.8.html
메타데이터
- post_id
- 7f2b1bca55d1
- slug
- useful-ethtool-commands-7f2b1bca55d1
- url
- https://medium.com/@christina.jacob.koikara/useful-ethtool-commands-7f2b1bca55d1
- canonical_url
- https://medium.com/@christina.jacob.koikara/useful-ethtool-commands-7f2b1bca55d1
- author_url
- https://medium.com/@christina.jacob.koikara
- status
- ok
- fetched_at
- 2026-06-26 21:52:29