Linux "mii-tool" Command Line Options and Examples
view, manipulate media-independent interface status

This utility checks or sets the status of a network interface's Media Independent Interface (MII) unit. Most fast ethernet adapters use an MII to autonegotiate link speed and duplex setting. Most intelligent network devices use an autonegotiation protocol to communicate what media technologies they support, and then select the fastest mutually supported media technology.


Usage:

mii-tool [-v, --verbose] [-V, --version] [-R, --reset] [-r, --restart] [-w, --watch] [-l, --log] [-A, --advertise=media,...] [-F,
    --force=media] [-p, --phy=addr] interface ...




Command Line Options:

-v
Display more detailed MII status information. If used twice, also display raw MII register contents.Alert: If used three times, will force reading all MII registers, including non standard ones. It's not guaranteed any validanswer from PHY while PHY communication can even hang. With driver e1000e will fail while reading register 0x07.
mii-tool -v ...
-V
Display program version information.
mii-tool -V ...
-R
Reset the MII to its default configuration.
mii-tool -R ...
-r
Restart autonegotiation.
mii-tool -r ...
-w
Watch interface(s) and report changes in link status. The MII interfaces are polled at one second intervals.
mii-tool -w ...
-l
Used with -w, records link status changes in the system log instead of printing on standard output.
mii-tool -l ...
-F
Disable autonegotiation, and force the MII to either 100baseTx-FD, 100baseTx-HD, 10baseT-FD, or 10baseT-HD operation.
mii-tool -F ...
-A
Enable and restart autonegotiation, and advertise only the specified media technologies. Multiple technologies should be sep‐arated by commas. Valid media are 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, and 10baseT-HD.
mii-tool -A ...
-p
Override the MII address provided by kernel with value addr.DIAGNOSTICSSIOCGMIIPHY on 'eth?' failed: Invalid argumentIf the interface is not running (up), kernel will refuse to report its link state.SIOCGMIIPHY on 'eth?' failed: Operation not permittedMost kernels restrict access to root.SIOCGMIIPHY on 'eth?' failed: No such deviceThis error is shown, if the kernel does not know about the named device.SIOCGMIIPHY on 'eth?' failed: Operation not supportedThe interface in question does not support MII queries. Most likely, it does not have MII transceivers, at all.AUTHORSDavid Hinds - dhinds@pcmcia.sourceforge.orgDonald Becker - becker@scyld.comBernd Eckenfels - net-tools@lina.inka.de
mii-tool -p ...