π NAME
ethtool - query or control network driver and hardware settings
π Quick Reference
| Use Case | Command | Description |
| Show device settings | ethtool devname | π Display current settings of the network device |
| Show driver information | ethtool -i devname | π₯οΈ Display driver and firmware version |
| Show statistics | ethtool -S devname | π Display NIC and driver-specific statistics |
| Identify adapter (blink LED) | ethtool -p devname | π‘ Blink LED to physically identify the port |
| Change speed and duplex | ethtool -s devname speed 1000 duplex full | β‘ Set speed (Mb/s) and duplex mode |
| Enable/disable offload feature | ethtool -K devname tx on | π§ Enable TX checksum offload (or other features) |
| Show pause parameters | ethtool -a devname | βΈοΈ Show pause frame settings |
| Show ring parameters | ethtool -g devname | π Show RX/TX ring sizes |
| Show interrupt coalescing | ethtool -c devname | β±οΈ Show coalescing settings |
| Show RSS indirection table | ethtool -x devname | π Show RSS hash indirection table |
| Show Energy-Efficient Ethernet | ethtool --show-eee devname | π± Show EEE support |
| Show Forward Error Correction | ethtool --show-fec devname | π§ Show FEC capabilities |
| Perform cable test | ethtool --cable-test devname | π Test cable for faults |
| Monitor netlink notifications | ethtool --monitor | ποΈ Listen for device changes |
π SYNOPSIS
ethtool devname
ethtool -h|--help
ethtool --version
ethtool [--debug N] args
ethtool [--json] args
ethtool [-I | --include-statistics] args
ethtool --monitor [ command ] [ devname ]
ethtool -a|--show-pause devname
ethtool -A|--pause devname [autoneg on|off] [rx on|off] [tx on|off]
ethtool -c|--show-coalesce devname
ethtool -C|--coalesce devname [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] [cqe-mode-rx on|off] [cqe-mode-tx on|off]
ethtool -g|--show-ring devname
ethtool -G|--set-ring devname [rx N] [rx-mini N] [rx-jumbo N] [tx N]
ethtool -i|--driver devname
ethtool -d|--register-dump devname [raw on|off] [hex on|off] [file name]
ethtool -e|--eeprom-dump devname [raw on|off] [offset N] [length N]
ethtool -E|--change-eeprom devname [magic N] [offset N] [length N] [value N]
ethtool -k|--show-features|--show-offload devname
ethtool -K|--features|--offload devname feature on|off ...
ethtool -p|--identify devname [N]
ethtool -P|--show-permaddr devname
ethtool -r|--negotiate devname
ethtool -S|--statistics devname [--all-groups|--groups [eth-phy] [eth-mac] [eth-ctrl] ]
ethtool --phy-statistics devname
ethtool -t|--test devname [offline|online|external_lb]
ethtool -s devname [speed N] [lanes N] [duplex half|full] [port tp|aui|bnc|mii]
[mdix auto|on|off] [autoneg on|off] [advertise N[/M] | advertise mode on|off ...]
[phyad N] [xcvr internal|external] [wol N[/M] | wol p|u|m|b|a|g|s|f|d...]
[sopass xx:yy:zz:aa:bb:cc] [master-slave preferred-master|preferred-slave|forced-
master|forced-slave] [msglvl N[/M] | msglvl type on|off ...]
ethtool -n|-u|--show-nfc|--show-ntuple devname
[ rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 |
rule N ]
ethtool -N|-U|--config-nfc|--config-ntuple devname
rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r... |
flow-type ether|ip4|tcp4|udp4|sctp4|ah4|esp4|ip6|tcp6|udp6|ah6|esp6|sctp6
[src xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]]
[dst xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]] [proto N [m N]] [src-ip ip-
address [m ip-address]] [dst-ip ip-address [m ip-address]] [tos N [m N]]
[tclass N [m N]] [l4proto N [m N]] [src-port N [m N]] [dst-port N [m N]] [spi N [m N]]
[l4data N [m N]] [vlan-etype N [m N]] [vlan N [m N]] [user-def N [m N]] [dst-
mac xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]] [action N] [context N] [loc N] |
delete N
ethtool -w|--get-dump devname [data filename]
ethtool -W|--set-dump devname N
ethtool -T|--show-time-stamping devname
ethtool -x|--show-rxfh-indir|--show-rxfh devname
ethtool -X|--set-rxfh-indir|--rxfh devname [hkey xx:yy:zz:aa:bb:cc:...] [start N] [ equal
N | weight W0 W1 ... | default ] [hfunc FUNC] [context CTX | new] [delete]
ethtool -f|--flash devname file [N]
ethtool -l|--show-channels devname
ethtool -L|--set-channels devname [rx N] [tx N] [other N] [combined N]
ethtool -m|--dump-module-eeprom|--module-info devname [raw on|off] [hex on|off] [offset N]
[length N] [page N] [bank N] [i2c N]
ethtool --show-priv-flags devname
ethtool --set-priv-flags devname flag on|off ...
ethtool --show-eee devname
ethtool --set-eee devname [eee on|off] [tx-lpi on|off] [tx-timer N] [advertise N]
ethtool --set-phy-tunable devname [ downshift on|off [count N] ] [ fast-link-down on|off
[msecs N] ] [ energy-detect-power-down on|off [msecs N] ]
ethtool --get-phy-tunable devname [downshift] [fast-link-down] [energy-detect-power-down]
ethtool --get-tunable devname [rx-copybreak] [tx-copybreak] [pfc-prevention-tout]
ethtool --set-tunable devname [rx-copybreak N] [tx-copybreak N] [pfc-prevention-tout N]
ethtool --reset devname [flags N] [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 --show-fec devname
ethtool --set-fec devname encoding auto|off|rs|baser|llrs [...]
ethtool -Q|--per-queue devname [queue_mask %x] sub_command ...
.
ethtool --cable-test devname
ethtool --cable-test-tdr devname [first N] [last N] [step N] [pair N]
ethtool --show-tunnels devname
π DESCRIPTION
ethtool is used to query and control network device driver and hardware settings, particularly for wired Ethernet devices.
devname is the name of the network device on which ethtool should operate.
βοΈ OPTIONS
ethtool with a single argument specifying the device name prints current settings of the specified device.
π§ General Options
- -h --help β Shows a short help message.
- --version β Shows the ethtool version number.
- --debug N β Turns on debugging messages. Argument is interpreted as a mask: 0x01 Parser information
- --json β Output results in JavaScript Object Notation (JSON). Only a subset of options support this.
- -I --include-statistics β Include command-related statistics in the output.
βΈοΈ Pause Parameters
- -a --show-pause β Queries the specified Ethernet device for pause parameter information.
- -A --pause β Changes the pause parameters of the specified Ethernet device.
- autoneg on|off β Specifies whether pause autonegotiation should be enabled.
- rx on|off β Specifies whether RX pause should be enabled.
- tx on|off β Specifies whether TX pause should be enabled.
β±οΈ Coalescing
- -c --show-coalesce β Queries the specified network device for coalescing information.
- -C --coalesce β Changes the coalescing settings of the specified network device.
π Ring Parameters
- -g --show-ring β Queries the specified network device for rx/tx ring parameter information.
- -G --set-ring β Changes the rx/tx ring parameters of the specified network device.
- rx N β Changes the number of ring entries for the Rx ring.
- rx-mini N β Changes the number of ring entries for the Rx Mini ring.
- rx-jumbo N β Changes the number of ring entries for the Rx Jumbo ring.
- tx N β Changes the number of ring entries for the Tx ring.
π₯οΈ Driver Information
- -i --driver β Queries the specified network device for associated driver information.
π Register Dump
- -d --register-dump β Retrieves and prints a register dump for the specified network device. When raw is enabled, dumps raw register data to stdout. If file is specified, reads from previous dump.
πΎ EEPROM Dump
- -e --eeprom-dump β Retrieves and prints an EEPROM dump for the specified network device. When raw is enabled, dumps raw EEPROM data to stdout. The length and offset parameters allow dumping certain portions.
- raw on|off
- offset N
- length N
- -E --change-eeprom β Changes EEPROM byte for the specified network device. A magic key must be specified to prevent accidental writes.
π§ Offload Features
- -k --show-features --show-offload β Queries the specified network device for the state of protocol offload and other features.
- -K --features --offload β Changes the offload parameters and other features.
- rx on|off β RX checksumming
- tx on|off β TX checksumming
- sg on|off β Scatter-gather
- tso on|off β TCP segmentation offload
- ufo on|off β UDP fragmentation offload
- gso on|off β Generic segmentation offload
- gro on|off β Generic receive offload
- lro on|off β Large receive offload
- rxvlan on|off β RX VLAN acceleration
- txvlan on|off β TX VLAN acceleration
- ntuple on|off β Rx ntuple filters and actions
- rxhash on|off β Receive hashing offload
π‘ Identify Adapter
- -p --identify β Initiates adapter-specific action (e.g., blink LEDs) to identify the adapter. Optional argument N specifies duration in seconds.
π Permanent Address
- -P --show-permaddr β Queries the specified network device for permanent hardware address.
π Restart Auto-negotiation
- -r --negotiate β Restarts auto-negotiation on the specified Ethernet device.
π Statistics
- -S --statistics β Queries the specified network device for standard (IEEE, IETF, etc.) or NIC- and driver-specific statistics. Groups: --all-groups, --groups [eth-phy] [eth-mac] [eth-ctrl] [rmon]
- --phy-statistics β Queries PHY specific statistics.
π§ͺ Self-test
- -t --test β Executes adapter selftest. Modes: offline (full test, may interrupt), online (limited test, no interruption), external_lb (full test plus external loopback).
β‘ Change Settings
- -s --change β Allows changing some or all settings of the specified network device.
- speed N β Set speed in Mb/s.
- lanes N β Set number of lanes.
- duplex half|full β Sets full or half duplex mode.
- port tp|aui|bnc|mii β Selects device port.
- master-slave preferred-master|preferred-slave|forced-master|forced-slave β Configure MASTER/SLAVE role of PHY.
- mdix auto|on|off β Selects MDI-X mode.
- autoneg on|off β Specifies whether autonegotiation should be enabled.
- advertise N β Sets the speed and duplex advertised by autonegotiation. See table below for values.
- phyad N β PHY address.
- xcvr internal|external β Selects transceiver type.
- wol p|u|m|b|a|g|s|f|d... β Sets Wake-on-LAN options. Characters: p (PHY), u (unicast), m (multicast), b (broadcast), a (ARP), g (MagicPacketβ’), s (SecureOnβ’), f (filter), d (disable).
- sopass xx:yy:zz:aa:bb:cc β Sets SecureOnβ’ password.
- msglvl N or msglvl type on|off ... β Sets driver message type flags. Types: drv (0x0001), probe (0x0002), link (0x0004), timer (0x0008), ifdown (0x0010), ifup (0x0020), rx_err (0x0040), tx_err (0x0080), tx_queued (0x0100), intr (0x0200), tx_done (0x0400), rx_status (0x0800), pktdata (0x1000), hw (0x2000), wol (0x4000).
π Advertise Speed/Duplex Values
- 0x001 β 10baseT Half
- 0x002 β 10baseT Full
- 0x004 β 100baseT Half
- 0x008 β 100baseT Full
- 0x80000000000000000 β 100baseT1 Full
- 0x40000000000000000000000 β 100baseFX Half
- 0x80000000000000000000000 β 100baseFX Full
- 0x010 β 1000baseT Half (not supported by IEEE)
- 0x020 β 1000baseT Full
- 0x20000 β 1000baseKX Full
- 0x20000000000 β 1000baseX Full
- 0x100000000000000000 β 1000baseT1 Full
- 0x8000 β 2500baseX Full (not supported by IEEE)
- 0x800000000000 β 2500baseT Full
- 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)
- 0x400000 β 20000baseKR2 Full (not supported by IEEE)
- 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
- 0x8000000000000000000 β 100000baseKR Full
- 0x10000000000000000000 β 100000baseSR Full
- 0x20000000000000000000 β 100000baseLR_ER_FR Full
- 0x40000000000000000000 β 100000baseCR Full
- 0x80000000000000000000 β 100000baseDR Full
- 0x4000000000000000 β 200000baseKR4 Full
- 0x8000000000000000 β 200000baseSR4 Full
- 0x10000000000000000 β 200000baseLR4_ER4_FR4 Full
- 0x20000000000000000 β 200000baseDR4 Full
- 0x40000000000000000 β 200000baseCR4 Full
- 0x100000000000000000000 β 200000baseKR2 Full
- 0x200000000000000000000 β 200000baseSR2 Full
- 0x400000000000000000000 β 200000baseLR2_ER2_FR2 Full
- 0x800000000000000000000 β 200000baseDR2 Full
- 0x1000000000000000000000 β 200000baseCR2 Full
- 0x200000000000000000 β 400000baseKR8 Full
- 0x400000000000000000 β 400000baseSR8 Full
- 0x800000000000000000 β 400000baseLR8_ER8_FR8 Full
- 0x1000000000000000000 β 400000baseDR8 Full
- 0x2000000000000000000 β 400000baseCR8 Full
- 0x2000000000000000000000 β 400000baseKR4 Full
- 0x4000000000000000000000 β 400000baseSR4 Full
- 0x8000000000000000000000 β 400000baseLR4_ER4_FR4 Full
- 0x10000000000000000000000 β 400000baseDR4 Full
- 0x20000000000000000000000 β 400000baseCR4 Full
π Network Flow Classification
- -n -u --show-nfc --show-ntuple β Retrieves receive network flow classification options or rules.
- rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 β Retrieves hash options for the specified flow type.
- rule N β Retrieves the RX classification rule with the given ID.
- -N -U --config-nfc --config-ntuple β Configures receive 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... β Configures hash options. Options: m (L2 dest), v (VLAN), t (L3 protocol), s (IP src), d (IP dst), f (L4 bytes 0-1), n (L4 bytes 2-3), r (discard all packets).
- flow-type ether|ip4|tcp4|udp4|sctp4|ah4|esp4|ip6|tcp6|udp6|ah6|esp6|sctp6 β Inserts or updates a classification rule for the specified flow type. Fields: src, dst, proto, src-ip, dst-ip, tos, tclass, l4proto, src-port, dst-port, spi, l4data, vlan-etype, vlan, user-def, dst-mac, action (-1 drop, -2 WoL, 0+ queue), context, vf, queue, loc, delete.
π¦ Firmware Dump
- -w --get-dump β Retrieves and prints firmware dump for the specified network device. When data is specified, fetches dump data to a file.
- -W --set-dump β Sets the dump flag for the device.
β° Time Stamping
- -T --show-time-stamping β Shows the device's time stamping capabilities and associated PTP hardware clock.
π RSS (Receive Side Scaling)
- -x --show-rxfh-indir --show-rxfh β Retrieves the receive flow hash indirection table and/or RSS hash key.
- -X --set-rxfh-indir --rxfh β Configures the receive flow hash indirection table and/or RSS hash key.
- hkey β Sets RSS hash key.
- hfunc β Sets RSS hash function.
- start N β Starting receive queue for spreading.
- equal N β Spread flows evenly between first N queues.
- weight W0 W1 ... β Spread flows according to weights.
- default β Reset to default indirection table.
- context CTX | new β Specify RSS context.
- delete β Delete specified RSS context.
π₯ Flash Firmware
- -f --flash β Write a firmware image to flash or other non-volatile memory. file specifies the firmware image; optional N specifies region.
π‘ Channel Configuration
- -l --show-channels β Queries the specified network device for the numbers of channels.
- -L --set-channels β Changes the numbers of channels.
- rx N β Number of channels with only receive queues.
- tx N β Number of channels with only transmit queues.
- other N β Number of channels for other purposes.
- combined N β Number of multi-purpose channels.
π Module EEPROM / SFP+ Info
- -m --dump-module-eeprom --module-info β Retrieves and decodes EEPROM from plugin modules (e.g., SFP+, QSFP). Supports raw, hex, offset, length, page, bank, i2c parameters.
π·οΈ Private Flags
- --show-priv-flags β Queries the specified network device for its private flags.
- --set-priv-flags β Sets the device's private flags. Syntax: flag on|off.
π± Energy-Efficient Ethernet (EEE)
- --show-eee β Queries the specified network device for its support of EEE (IEEE 802.3az).
- --set-eee β Sets the device EEE behaviour.
- eee on|off β Enable/disable EEE.
- tx-lpi on|off β Assert Tx LPI.
- advertise N β Set speeds for EEE advertisement.
- tx-timer N β Set time in microseconds to stay idle before Tx LPI.
π§ PHY Tunable Parameters
- --set-phy-tunable β Sets PHY tunable parameters.
- downshift on|off [count N] β Enable/disable downshift and set retries.
- fast-link-down on|off [msecs N] β Enable/disable fast link down and set period.
- energy-detect-power-down on|off [msecs N] β Enable/disable EDPD and set wake-up interval.
- --get-phy-tunable β Gets PHY tunable parameters. Arguments: downshift, fast-link-down, energy-detect-power-down.
π§ Driver Tunable Parameters
- --get-tunable β Gets driver tunable parameters. Arguments: rx-copybreak, tx-copybreak, pfc-prevention-tout.
- --set-tunable β Sets driver tunable parameters.
- rx-copybreak N β Set rx copybreak in bytes.
- tx-copybreak N β Set tx copybreak in bytes.
- pfc-prevention-tout N β Set PFC prevention timeout in msecs (0=disable, 65535=auto).
π Reset Hardware
- --reset β Reset hardware components. Flags: flags N (direct mask), 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.
π§ Forward Error Correction (FEC)
- --show-fec β Queries the specified network device for its support of Forward Error Correction.
- --set-fec β Configures FEC for the specified network device.
- encoding auto|off|rs|baser|llrs [...] β Set FEC encoding. Options: auto (driver default), off, RS (RS-FEC), BaseR, LLRS.
ποΈ Per-Queue Configuration
- -Q|--per-queue β Applies provided sub command to specific queues.
- queue_mask %x β Set the specific queues (hex mask).
- sub_command β Supported sub commands: --show-coalesce, --coalesce.
π Cable Test
- --cable-test β Perform a cable test and report results (open/short pairs, OK, distance to fault).
- --cable-test-tdr β Perform a cable test and report raw Time Domain Reflectometer data.
- first N β First measurement distance in meters.
- last N β Last measurement distance in meters.
- step N β Step size in meters.
- pair N β Which pair to measure (0 = Pair A).
ποΈ Monitor
- --monitor β Listens to netlink notification and displays them. Optional command filters by type; devname filters by device.
π Show Tunnels
- --show-tunnels β Show tunnel-related device capabilities and state (UDP ports for VxLAN, GENEVE).
π BUGS
Not supported (in part or whole) on all network drivers.
π€ AUTHOR
ethtool was written by David Miller. Modifications by Jeff Garzik, Tim Hockin, Jakub Jelinek, Andre Majorel, Eli Kupermann, Scott Feldman, Andi Kleen, Alexander Duyck, Sucheta Chakraborty, Jesse Brandeburg, Ben Hutchings, Scott Branden.
π¦ AVAILABILITY
ethtool is available from http://www.kernel.org/pub/software/network/ethtool/
Ethtool version 5.16, January 2022