Determine Linux ethernet interface speed and duplex

Contributor Icon Contributed by qmchenry Date Icon September 3, 2003  
Tag Icon Tagged: Linux networking

Determine the autonegotiated ethernet connection speed and duplex using the mii-tool command


Running the following command as superuser with no options will generate basic information about all of the ethernet interfaces on the computer:

mii-tool

The resulting output will look something like:

eth0: negotiated 100baseTx-FD, link ok

This output shows one interface (eth0) which was autonegotiated to 100 Mbps (100baseTx) and full duplex (FD).

Adding the -v option to the command generates verbose output and will tell you more about the interface including the manufacturer and model (if available) and the interface’s capabilities.

Previous recipe | Next recipe |
 
  • archon
    When I run mii-tool, it fails and prints:
    SIOCGMIIPHY on 'eth0' failed: Operation not supported
    no MII interfaces found



    I am running this as root. Does this just mean my ethernet card does not support MII (whatever that is)?
  • qmchenry
    It is possible that your network card does not support MII (media independent interface, essentially an abstraction layer between the operating system and the hardware). Depending on your OS, there may be an ethtool command which is similiar and might work for you, although the syntax is different -- try ethtool -v. If this doesn't work, let us know what OS you are running and what kind of ethernet card you are using. An easy way to find out is to run dmesg | grep ^eth0 and look at the first line or few lines.
  • Anonymous
    same case here. Running fedora core 1
    any help how to use mii-tool
  • Anonymous
    <ul id="quote"><h6>archon wrote:</h6>When I run mii-tool, it fails and prints:
    SIOCGMIIPHY on 'eth0' failed: Operation not supported
    no MII interfaces found



    I am running this as root. Does this just mean my ethernet card does not support MII (whatever that is)?</ul>
  • veriguest
    hi,

    i am looking at programming the mii-interface, to test the effect of cable pulling and re-inserting actions (physically) on my code. However, everytime going to the test-m/c is uncomfortable.

    is there any possiblities that i can program the interface using mii or some such interface to have the same effect? i dont want to use the ifconfig as kernel gets to know about it.

    --a
blog comments powered by Disqus