mii-tool is deprecated, use ethtool

Title says it all. If you want to check (or set) your ethernet NIC configuration or status in Linux, people used to use mii-tools. But there’s a lot more powerful and modern tool that obsoletes it: ethtool
You can install it with your favourite package manager, if it’s not already present in your system.
In Debian/Ubuntu, you can issue
# aptitude install ethtool

Here it is an example:


# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes

Advertisements

8 thoughts on “mii-tool is deprecated, use ethtool

  1. I beat my head against mii-tool the other day for a long while before I found this post (or, it could have been some other one, but I found this one today by looking for “mii-tool deprecated). mii-tool doesn’t seem to know about gigabit connections, so even though the machine was doing gigabit, I couldn’t tell with mii-tool.

    • Yep Jay, this is one of the worst limitations of mii-tool and it makes me a little sad that Debian as of Lenny still installs by default mii-tool and not ethtool

  2. Looks like neither will simply print out a list of all interfaces:

    #dladm show-dev
    e1000g0 link: unknown speed: 100 Mbps duplex: full
    e1000g1 link: up speed: 100 Mbps duplex: full
    e1000g2 link: unknown speed: 0 Mbps duplex: half
    e1000g3 link: unknown speed: 0 Mbps duplex: half

  3. Is what Linux? Antecedent, man! The use of mii-tool and ethtool? Yeah. dladm of course is Solaris 10.

    Jay: I had the same experience. I ran mii-tool because Sun’s ILOM had it and as far as I knew it was the tool for all Linuxes. As we struggle to deploy RHEL I keep running into this mindless duplication — there seem to be at least FIVE separate tools to manipulate the anachronistic MS-DOS-style disk partitions. If mii-tool is deprecated, it should bloody well say so when run, or — better yet — be removed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s