Packages and Binaries:

ethtool

ethtool can be used to query and change settings such as speed, auto- negotiation and checksum offload on many network devices, especially Ethernet devices.

Installed size: 597 KB
How to install: sudo apt install ethtool

  • libc6
  • libmnl0
ethtool

Query or control network driver and hardware settings

root@kali:~# ethtool -h
ethtool version 5.9
Usage:
        ethtool [ --debug MASK ][ --json ] DEVNAME	Display standard information about device
        ethtool [ --debug MASK ][ --json ] -s|--change DEVNAME	Change generic options
		[ speed %d ]
		[ duplex half|full ]
		[ port tp|aui|bnc|mii|fibre|da ]
		[ mdix auto|on|off ]
		[ autoneg on|off ]
		[ advertise %x[/%x] | mode on|off ... [--] ]
		[ phyad %d ]
		[ xcvr internal|external ]
		[ wol %d[/%d] | p|u|m|b|a|g|s|f|d... ]
		[ sopass %x:%x:%x:%x:%x:%x ]
		[ msglvl %d[/%d] | type on|off ... [--] ]
		[ master-slave master-preferred|slave-preferred|master-force|slave-force ]
        ethtool [ --debug MASK ][ --json ] -a|--show-pause DEVNAME	Show pause options
        ethtool [ --debug MASK ][ --json ] -A|--pause DEVNAME	Set pause options
		[ autoneg on|off ]
		[ rx on|off ]
		[ tx on|off ]
        ethtool [ --debug MASK ][ --json ] -c|--show-coalesce DEVNAME	Show coalesce options
        ethtool [ --debug MASK ][ --json ] -C|--coalesce DEVNAME	Set coalesce options
		[adaptive-rx on|off]
		[adaptive-tx on|off]
		[rx-usecs N]
		[rx-frames N]
		[rx-usecs-irq N]
		[rx-frames-irq N]
		[tx-usecs N]
		[tx-frames N]
		[tx-usecs-irq N]
		[tx-frames-irq N]
		[stats-block-usecs N]
		[pkt-rate-low N]
		[rx-usecs-low N]
		[rx-frames-low N]
		[tx-usecs-low N]
		[tx-frames-low N]
		[pkt-rate-high N]
		[rx-usecs-high N]
		[rx-frames-high N]
		[tx-usecs-high N]
		[tx-frames-high N]
		[sample-interval N]
        ethtool [ --debug MASK ][ --json ] -g|--show-ring DEVNAME	Query RX/TX ring parameters
        ethtool [ --debug MASK ][ --json ] -G|--set-ring DEVNAME	Set RX/TX ring parameters
		[ rx N ]
		[ rx-mini N ]
		[ rx-jumbo N ]
		[ tx N ]
        ethtool [ --debug MASK ][ --json ] -k|--show-features|--show-offload DEVNAME	Get state of protocol offload and other features
        ethtool [ --debug MASK ][ --json ] -K|--features|--offload DEVNAME	Set protocol offload and other features
		FEATURE on|off ...
        ethtool [ --debug MASK ][ --json ] -i|--driver DEVNAME	Show driver information
        ethtool [ --debug MASK ][ --json ] -d|--register-dump DEVNAME	Do a register dump
		[ raw on|off ]
		[ file FILENAME ]
        ethtool [ --debug MASK ][ --json ] -e|--eeprom-dump DEVNAME	Do a EEPROM dump
		[ raw on|off ]
		[ offset N ]
		[ length N ]
        ethtool [ --debug MASK ][ --json ] -E|--change-eeprom DEVNAME	Change bytes in device EEPROM
		[ magic N ]
		[ offset N ]
		[ length N ]
		[ value N ]
        ethtool [ --debug MASK ][ --json ] -r|--negotiate DEVNAME	Restart N-WAY negotiation
        ethtool [ --debug MASK ][ --json ] -p|--identify DEVNAME	Show visible port identification (e.g. blinking)
               [ TIME-IN-SECONDS ]
        ethtool [ --debug MASK ][ --json ] -t|--test DEVNAME	Execute adapter self test
               [ online | offline | external_lb ]
        ethtool [ --debug MASK ][ --json ] -S|--statistics DEVNAME	Show adapter statistics
        ethtool [ --debug MASK ][ --json ] --phy-statistics DEVNAME	Show phy statistics
        ethtool [ --debug MASK ][ --json ] -n|-u|--show-nfc|--show-ntuple DEVNAME	Show Rx network flow classification options or rules
		[ rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 [context %d] |
		  rule %d ]
        ethtool [ --debug MASK ][ --json ] -N|-U|--config-nfc|--config-ntuple DEVNAME	Configure Rx network flow classification options or rules
		rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r... [context %d] |
		flow-type ether|ip4|tcp4|udp4|sctp4|ah4|esp4|ip6|tcp6|udp6|ah6|esp6|sctp6
			[ src %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]
			[ dst %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]
			[ proto %d [m %x] ]
			[ src-ip IP-ADDRESS [m IP-ADDRESS] ]
			[ dst-ip IP-ADDRESS [m IP-ADDRESS] ]
			[ tos %d [m %x] ]
			[ tclass %d [m %x] ]
			[ l4proto %d [m %x] ]
			[ src-port %d [m %x] ]
			[ dst-port %d [m %x] ]
			[ spi %d [m %x] ]
			[ vlan-etype %x [m %x] ]
			[ vlan %x [m %x] ]
			[ user-def %x [m %x] ]
			[ dst-mac %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]
			[ action %d ] | [ vf %d queue %d ]
			[ context %d ]
			[ loc %d]] |
		delete %d
        ethtool [ --debug MASK ][ --json ] -T|--show-time-stamping DEVNAME	Show time stamping capabilities
        ethtool [ --debug MASK ][ --json ] -x|--show-rxfh-indir|--show-rxfh DEVNAME	Show Rx flow hash indirection table and/or RSS hash key
		[ context %d ]
        ethtool [ --debug MASK ][ --json ] -X|--set-rxfh-indir|--rxfh DEVNAME	Set Rx flow hash indirection table and/or RSS hash key
		[ context %d|new ]
		[ equal N | weight W0 W1 ... | default ]
		[ hkey %x:%x:%x:%x:%x:.... ]
		[ hfunc FUNC ]
		[ delete ]
        ethtool [ --debug MASK ][ --json ] -f|--flash DEVNAME	Flash firmware image from the specified file to a region on the device
               FILENAME [ REGION-NUMBER-TO-FLASH ]
        ethtool [ --debug MASK ][ --json ] -P|--show-permaddr DEVNAME	Show permanent hardware address
        ethtool [ --debug MASK ][ --json ] -w|--get-dump DEVNAME	Get dump flag, data
		[ data FILENAME ]
        ethtool [ --debug MASK ][ --json ] -W|--set-dump DEVNAME	Set dump flag of the device
		N
        ethtool [ --debug MASK ][ --json ] -l|--show-channels DEVNAME	Query Channels
        ethtool [ --debug MASK ][ --json ] -L|--set-channels DEVNAME	Set Channels
               [ rx N ]
               [ tx N ]
               [ other N ]
               [ combined N ]
        ethtool [ --debug MASK ][ --json ] --show-priv-flags DEVNAME	Query private flags
        ethtool [ --debug MASK ][ --json ] --set-priv-flags DEVNAME	Set private flags
		FLAG on|off ...
        ethtool [ --debug MASK ][ --json ] -m|--dump-module-eeprom|--module-info DEVNAME	Query/Decode Module EEPROM information and optical diagnostics if available
		[ raw on|off ]
		[ hex on|off ]
		[ offset N ]
		[ length N ]
        ethtool [ --debug MASK ][ --json ] --show-eee DEVNAME	Show EEE settings
        ethtool [ --debug MASK ][ --json ] --set-eee DEVNAME	Set EEE settings
		[ eee on|off ]
		[ advertise %x ]
		[ tx-lpi on|off ]
		[ tx-timer %d ]
        ethtool [ --debug MASK ][ --json ] --set-phy-tunable DEVNAME	Set PHY tunable
		[ downshift on|off [count N] ]
		[ fast-link-down on|off [msecs N] ]
		[ energy-detect-power-down on|off [msecs N] ]
        ethtool [ --debug MASK ][ --json ] --get-phy-tunable DEVNAME	Get PHY tunable
		[ downshift ]
		[ fast-link-down ]
		[ energy-detect-power-down ]
        ethtool [ --debug MASK ][ --json ] --get-tunable DEVNAME	Get tunable
		[ rx-copybreak ]
		[ tx-copybreak ]
		[ pfc-precention-tout ]
        ethtool [ --debug MASK ][ --json ] --set-tunable DEVNAME	Set tunable
		[ rx-copybreak N]
		[ tx-copybreak N]
		[ pfc-precention-tout N]
        ethtool [ --debug MASK ][ --json ] --reset DEVNAME	Reset components
		[ flags %x ]
		[ mgmt ]
		[ mgmt-shared ]
		[ irq ]
		[ irq-shared ]
		[ dma ]
		[ dma-shared ]
		[ filter ]
		[ filter-shared ]
		[ offload ]
		[ offload-shared ]
		[ mac ]
		[ mac-shared ]
		[ phy ]
		[ phy-shared ]
		[ ram ]
		[ ram-shared ]
		[ ap ]
		[ ap-shared ]
		[ dedicated ]
		[ all ]
        ethtool [ --debug MASK ][ --json ] --show-fec DEVNAME	Show FEC settings
        ethtool [ --debug MASK ][ --json ] --set-fec DEVNAME	Set FEC settings
		[ encoding auto|off|rs|baser|llrs [...]]
        ethtool [ --debug MASK ][ --json ] -Q|--per-queue DEVNAME	Apply per-queue command. 
The supported sub commands include --show-coalesce, --coalesce             [queue_mask %x] SUB_COMMAND
        ethtool [ --debug MASK ][ --json ] --cable-test DEVNAME	Perform a cable test
        ethtool [ --debug MASK ][ --json ] --cable-test-tdr DEVNAME	Print cable test time domain reflectrometery data
		[ first N ]
		[ last N ]
		[ step N ]
		[ pair N ]
        ethtool [ --debug MASK ][ --json ] --show-tunnels DEVNAME	Show NIC tunnel offload information
        ethtool [ --debug MASK ][ --json ] -h|--help 		Show this help
        ethtool [ --debug MASK ][ --json ] --version 		Show version number
        ethtool --monitor               Show kernel notifications
                ( [ --all ]
                  | -s | --change
                  | -s | --change
                  | -s | --change
                  | -s | --change
                  | -k | --show-features | --show-offload | -K | --features | --offload
                  | --show-priv-flags | --set-priv-flags
                  | -g | --show-ring | -G | --set-ring
                  | -l | --show-channels | -L | --set-channels
                  | -c | --show-coalesce | -C | --coalesce
                  | -a | --show-pause | -A | --pause
                  | --show-eee | --set-eee
                  | --cable-test
                  | --cable-test-tdr )
                [ DEVNAME | * ]
Not all options support JSON output

Updated on: 2021-Nov-26