ethtool -h
or refer to the man page, ethtool(8)
, for a more comprehensive list and explanation. The first two examples are information queries and show the use of the different formats of the command.
ethtool
[option...] devname
root
. Here is an example of the output when the command is run as root
:
~]# ethtool em1
Settings for em1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 2
Transceiver: internal
Auto-negotiation: on
MDI-X: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
ethtool
-i, --driver
devname
~]$ ethtool -i em1
driver: e1000e
version: 2.0.0-k
firmware-version: 0.13-3
bus-info: 0000:00:19.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
-short
and --long
form:
--statistics
--statistics
or -S
queries the specified network device for NIC and driver statistics. It takes the following form:
-S
,--statistics
devname
--identify
--identify
or -p
option initiates adapter-specific action intended to enable an operator to easily identify the adapter by sight. Typically this involves blinking one or more LEDs on the specified network port. It takes the following form:
-p, --identify
devname integer
--show-time-stamping
--show-time-stamping
or -T
option queries the specified network device for time stamping parameters. It takes the following form:
-T, --show-time-stamping
devname
--show-offload
--show-features
, or --show-offload
, or -k
option queries the specified network device for the state of protocol offload and other features. It takes the following form:
-k, --show-features, --show-offload
devname
--test
--test
or -t
option is used to perform tests on a Network Interface Card. It takes the following form:
-t, --test
devname word
offline
— Perform a comprehensive set of tests. Service will be interrupted.
online
— Perform a reduced set of tests. Service should not be interrupted.
external_lb
— Perform full set of tests including loopback tests while fitted with a loopback cable.
-s
or --change
option. All the following options are only applied if the -s
or --change
option is also specified. For the sake of clarity we will omit it here.
ETHTOOL_OPTS
directive. It can be used in interface configuration files to set the desired options when the network interface is brought up. Refer to Section 1.2.1, “Ethernet Interfaces” for more details on how to use this directive.
--offload
--features
, or --offload
, or -K
option changes the offload parameters and other features of the specified network device. It takes the following form:
-K, --features, --offload
devname feature boolean
ON
or OFF
,
ethtool(8)
man page lists most features. As the feature set is dependent on the NIC driver, you should consult the driver documentation for features not listed in the man page.
--speed
--speed
option is used to set the speed in megabits per second (Mb/s). Omitting the speed value will show the supported device speeds. It takes the following form:
--speed
number devname
--duplex
--duplex
option is used to set the transmit and receive mode of operation. It takes the following form:
--duplex
word devname
half
— Sets half-duplex mode. Usually used when connected to a hub.
full
— Sets full-duplex mode. Usually used when connected to a switch or another host.
--port
--port
option is used to select the device port . It takes the following form:
--port
value devname
tp
— An Ethernet interface using Twisted-Pair cable as the medium.
aui
— Attachment Unit Interface (AUI). Normally used with hubs.
bnc
— An Ethernet interface using BNC connectors and co-axial cable.
mii
— An Ethernet interface using a Media Independent Interface (MII).
fibre
— An Ethernet interface using Optical Fibre as the medium.
--autoneg
--autoneg
option is used to control auto-negotiation of network speed and mode of operation (full-duplex or half-duplex mode). If auto-negotiation is enabled you can initiate re-negotiation of network speeds and mode of operation by using the -r, --negotiate
option. You can display the auto-negotiation state using the --a, --show-pause
option.
--autoneg
value devname
yes
— Allow auto-negotiating of network speed and mode of operation.
no
— Do not allow auto-negotiating of network speed and mode of operation.
--advertise
--advertise
option is used to set what speeds and modes of operation (duplex mode) are advertised for auto-negotiation. The argument is one or more hexadecimal values from Table 1.1, “Ethtool advertise options: speed and mode of operation”.
--advertise
option devname
Table 1.1. Ethtool advertise options: speed and mode of operation
Hex Value | Speed | Duplex Mode | IEEE standard? |
---|---|---|---|
0x001 | 10 | Half | Yes |
0x002 | 10 | Full | Yes |
0x004 | 100 | Half | Yes |
0x008 | 100 | Full | Yes |
0x010 | 1000 | Half | No |
0x020 | 1000 | Full | Yes |
0x8000 | 2500 | Full | Yes |
0x1000 | 10000 | Full | Yes |
0x20000 | 20000MLD2 | Full | No |
0x20000 | 20000MLD2 | Full | No |
0x40000 | 20000KR2 | Full | No |
--phyad
--phyad
option is used to change the physical address. Often referred to as the MAC or hardware address but in this context referred to as the physical address.
--phyad
physical_address devname
--xcvr
--xcvr
option is used to select the transceiver type. Currently only “internal” and “external” can be specified. In the future other types might be added.
--xcvr
word devname
internal
— Use internal transceiver.
external
— Use external transceiver.
--wol
--wol
option is used to set “Wake-on-LAN” options. Not all devices support this. The argument to this option is a string of characters specifying which options to enable.
--wol
value devname
p
— Wake on PHY activity.
u
— Wake on unicast messages.
m
— Wake on multicast messages.
b
— Wake on broadcast messages.
g
— Wake-on-Lan; wake on receipt of a "magic packet".
s
— Enable security function using password for Wake-on-Lan.
d
— Disable Wake-on-Lan and clear all settings.
--sopass
--sopass
option is used to set the “SecureOn” password. The argument to this option must be 6 bytes in Ethernet MAC hexadecimal format (xx:yy:zz:aa:bb:cc).
--sopass
xx:yy:zz:aa:bb:cc devname
--msglvl
--msglvl
option is used to set the driver message-type flags by name or number. The precise meanings of these type flags differ between drivers.
--msglvl
message_type devname
Table 1.2. Driver message type
Message Type | Hex Value | Description |
---|---|---|
drv | 0x0001 |
General driver status
|
probe | 0x0002 |
Hardware probing
|
link | 0x0004 |
Link state
|
timer | 0x0008 |
Periodic status check
|
ifdown | 0x0010 | Interface being brought down |
ifup | 0x0020 |
Interface being brought up
|
rx_err | 0x0040 | Receive error |
tx_err | 0x0080 | Transmit error |
intr | 0x0200 | Interrupt handling |
tx_done | 0x0400 | Transmit completion |
rx_status | 0x0800 | Receive completion |
pktdata | 0x1000 | Packet contents |
hw | 0x2000 | Hardware status |
wol | 0x4000 | Wake-on-LAN status |