Ethtool
Das ethtool ist ein Linuxprogramm mit dem Sie Ethernetports optimieren bzw. diagnostizieren können.
Erläuterung
Mit dem Tool ethtool kann man Netzwerkkschnittstellen auf individuelle Wünsche konfigurieren. Dabei kann man zum Beispiel die Bandbreite festlegen (Achtung: Muss bei beiden Seiten eingestellt werden) oder auf Autonegotiation (Automatische Anpassung der Bandbreite) gestellt werden. Desweiteren können folgende Informationen ausgelesen werden:
- Link Status
- PCI-Slot
- Geräte Version
- Wake on Lan
Installation
Unter Debian oder Ubuntu installieren Sie ethtool via apt:
apt install ethtool
Beispiele
Die angeführten Ausgaben beziehen sich auf ein 10 Gbit/s onboard Intel X722 Netzwerk-Interface (eno1) eines Supermicro X11DPi-NT Mainboards (BIOS Version 3.5).
ethtool DEVNAME
Ohne weitere Parameter zeigt ethtool DEVNAME unter anderem Informationen zu den unterstützen Geschwindigkeiten (supported link modes), der aktuell verwendeten Datenrate (speed), dem verwendeten Duplex-Modus sowie dem Vorhandensein eines Links (link detected):
root@debian11:~# ethtool eno1
Settings for eno1:
Supported ports: [ TP ]
Supported link modes: 1000baseT/Full
10000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseT/Full
10000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
MDI-X: Unknown
Supports Wake-on: g
Wake-on: g
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
ethtool -i DEVNAME
ethtool -i DEVNAME (alternativ ethtool --driver DEVNAME) zeigt Informationen des Treibers des angeführten Netzwerk-Devices:
root@debian11:~# ethtool -i eno1 driver: i40e version: 5.10.0-10-amd64 firmware-version: 3.33 0x80000e48 1.1876.0 expansion-rom-version: bus-info: 0000:60:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: yes
ethtool -m DEVNAME
Siehe ethtool --dump-module-eeprom.
ethtool -h
ethtool -h (alternativ ethtool --help) zeigt die verfügbaren Befehls-Optionen:
root@debian11:~# 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
root@debian11:~#
lspci -vvv -nn
Zu Referenzzwecken wird hier noch die Ausgabe von lspci -vvv -nn -s 60:00.0 (in den oben anführten Beispielen verwendetes Netwerk-Interface) angeführt:
root@debian11:~# lspci -vvv -nn -s 60:00.0
60:00.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection X722 for 10GBASE-T [8086:37d2] (rev 09)
DeviceName: Intel Ethernet X722 #1
Subsystem: Super Micro Computer Inc Ethernet Connection X722 for 10GBASE-T [15d9:37d2]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 33
NUMA node: 0
IOMMU group: 82
Region 0: Memory at 38c000000000 (64-bit, prefetchable) [size=16M]
Region 3: Memory at 38c002800000 (64-bit, prefetchable) [size=32K]
Expansion ROM at c5d00000 [disabled] [size=512K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
Address: 0000000000000000 Data: 0000
Masking: 00000000 Pending: 00000000
Capabilities: [70] MSI-X: Enable+ Count=129 Masked-
Vector table: BAR=3 offset=00000000
PBA: BAR=3 offset=00001000
Capabilities: [a0] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0.000W
DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop- FLReset-
MaxPayload 256 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s (ok), Width x1 (ok)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Range AB, TimeoutDis+ NROPrPrP- LTR-
10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
FRS- TPHComp- ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
Retimer- 2Retimers- CrosslinkRes: unsupported
Capabilities: [100 v2] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
HeaderLog: 00000000 00000000 00000000 00000000
Capabilities: [140 v1] Device Serial Number de-45-bb-ff-ff-6b-1f-ac
Capabilities: [150 v1] Alternative Routing-ID Interpretation (ARI)
ARICap: MFVC- ACS-, Next Function: 1
ARICtl: MFVC- ACS-, Function Group: 0
Capabilities: [160 v1] Single Root I/O Virtualization (SR-IOV)
IOVCap: Migration-, Interrupt Message Number: 000
IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy+
IOVSta: Migration-
Initial VFs: 32, Total VFs: 32, Number of VFs: 0, Function Dependency Link: 00
VF offset: 16, stride: 1, Device ID: 37cd
Supported Page Size: 00000553, System Page Size: 00000001
Region 0: Memory at 000038c002000000 (64-bit, prefetchable)
Region 3: Memory at 000038c002810000 (64-bit, prefetchable)
VF Migration: offset: 00000000, BIR: 0
Capabilities: [1a0 v1] Transaction Processing Hints
Device specific mode supported
No steering table available
Capabilities: [1b0 v1] Access Control Services
ACSCap: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-
ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-
Kernel driver in use: i40e
Kernel modules: i40e
Hier noch die Informationen des verwendeten Netzwerkkarten-Treiers:
root@debian11:~# modinfo i40e
filename: /lib/modules/5.10.0-10-amd64/kernel/drivers/net/ethernet/intel/i40e/i40e.ko
license: GPL v2
description: Intel(R) Ethernet Connection XL710 Network Driver
author: Intel Corporation, <e1000-devel@lists.sourceforge.net>
alias: pci:v00008086d0000158Bsv*sd*bc*sc*i*
alias: pci:v00008086d0000158Asv*sd*bc*sc*i*
alias: pci:v00008086d00000D58sv*sd*bc*sc*i*
alias: pci:v00008086d00000CF8sv*sd*bc*sc*i*
alias: pci:v00008086d00001588sv*sd*bc*sc*i*
alias: pci:v00008086d00001587sv*sd*bc*sc*i*
alias: pci:v00008086d000037D3sv*sd*bc*sc*i*
alias: pci:v00008086d000037D2sv*sd*bc*sc*i*
alias: pci:v00008086d000037D1sv*sd*bc*sc*i*
alias: pci:v00008086d000037D0sv*sd*bc*sc*i*
alias: pci:v00008086d000037CFsv*sd*bc*sc*i*
alias: pci:v00008086d000037CEsv*sd*bc*sc*i*
alias: pci:v00008086d0000104Fsv*sd*bc*sc*i*
alias: pci:v00008086d0000104Esv*sd*bc*sc*i*
alias: pci:v00008086d000015FFsv*sd*bc*sc*i*
alias: pci:v00008086d00001589sv*sd*bc*sc*i*
alias: pci:v00008086d00001586sv*sd*bc*sc*i*
alias: pci:v00008086d00001585sv*sd*bc*sc*i*
alias: pci:v00008086d00001584sv*sd*bc*sc*i*
alias: pci:v00008086d00001583sv*sd*bc*sc*i*
alias: pci:v00008086d00001581sv*sd*bc*sc*i*
alias: pci:v00008086d00001580sv*sd*bc*sc*i*
alias: pci:v00008086d00001574sv*sd*bc*sc*i*
alias: pci:v00008086d00001572sv*sd*bc*sc*i*
depends: ptp
retpoline: Y
intree: Y
name: i40e
vermagic: 5.10.0-10-amd64 SMP mod_unload modversions
sig_id: PKCS#7
signer: Debian Secure Boot CA
sig_key: 4B:6E:F5:AB:CA:66:98:25:17:8E:05:2C:84:66:7C:CB:C0:53:1F:8C
sig_hashalgo: sha256
signature: 18:74:9E:E5:70:5B:26:4F:EC:9E:11:54:7A:01:46:DF:AF:FA:17:61:
B0:C1:32:E3:CD:FF:A9:03:A9:9E:1F:15:C1:0B:DF:7B:72:21:82:6A:
5D:C0:CB:CA:67:EC:63:76:A2:92:8A:22:FA:FA:89:81:71:C5:2B:90:
54:1F:B9:DD:98:25:53:C0:35:4A:50:73:FA:DE:8E:9A:24:C2:0D:55:
BE:69:FF:7F:1B:B4:8B:6E:69:86:23:32:D6:3E:2E:C0:B0:45:67:AF:
8E:FC:49:8C:AC:A0:41:34:18:8E:37:15:48:33:31:AB:8B:45:B6:84:
40:17:18:77:6E:AC:15:AB:A7:29:2D:10:1F:B9:31:B0:DA:21:1C:A3:
0E:78:60:3C:41:26:DD:7C:3C:28:FE:C3:90:99:6B:E2:FE:A7:D5:F9:
D1:7A:82:C4:B2:37:AC:56:3D:3F:2F:75:4E:28:65:A3:10:64:D1:DC:
01:6D:DB:4E:D2:2D:83:4B:71:E2:72:24:93:33:2C:CF:28:CD:18:84:
33:D3:80:70:65:62:20:8D:95:80:C0:1E:7B:8E:68:5F:3B:73:D4:9E:
B5:16:5D:BD:5F:83:F1:6B:DA:10:C6:2A:D0:DD:DF:B9:3B:EA:18:BC:
E5:D0:83:87:71:78:BE:4E:29:42:3E:97:94:1D:E3:C4
parm: debug:Debug level (0=none,...,16=all), Debug mask (0x8XXXXXXX) (uint)
root@debian11:~#
