Ethtool


ethtool is a utility for Linux kernel-based operating system for displaying and modifying some parameters of network interface controllers and their device drivers. ethtool is developed parallel to the Linux kernel.

Usage

The command is useful for:
To display the current parameters of the first network port :

$ ethtool eth0
Settings for eth0:
Supported ports:
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: g
Wake-on: g
Current message level: 0x00000007
Link detected: yes

To force its speed and duplex, in 1000BASE-T:

$ ethtool -s eth0 speed 1000 duplex full autoneg off

mii-tool

mii-tool is an older program performing a similar function to ethtool. Since 2003, it's considered obsolete and replaced by ethtool.

Example

To display the current parameters:

$ mii-tool
eth0: no autonegotiation, 100baseTx-HD, link ok

To force the network speed to 1 Gbit/s, and the duplex in full on the port 1 :

$ mii-tool -F 1000baseTx-FD eth0
$ mii-tool
eth0: 1 000 Mbit, full duplex, link ok