| 1 |
.\" Copyright (C) 2000 David A. Hinds -- [email protected] |
| 2 |
.\" |
| 3 |
.TH MII\-TOOL 8 "2013\-02\-15" "net\-tools" "Linux System Administrator's Manual" |
| 4 |
|
| 5 |
.SH NAME |
| 6 |
mii\-tool \- view, manipulate media-independent interface status |
| 7 |
|
| 8 |
.SH SYNOPSIS |
| 9 |
.B mii\-tool |
| 10 |
[\fB\-v\fR, \fB\-\-verbose\fR] |
| 11 |
[\fB\-V\fR, \fB\-\-version\fR] |
| 12 |
[\fB\-R\fR, \fB\-\-reset\fR] |
| 13 |
[\fB\-r\fR, \fB\-\-restart\fR] |
| 14 |
[\fB\-w\fR, \fB\-\-watch\fR] |
| 15 |
[\fB\-l\fR, \fB\-\-log\fR] |
| 16 |
[\fB\-A\fR, \fB\-\-advertise=\fImedia,...\fR] |
| 17 |
[\fB\-F\fR, \fB\-\-force=\fImedia\fR] |
| 18 |
[\fB\-p\fR, \fB\-\-phy=\fIaddr\fR] |
| 19 |
.RI "interface\ ..." |
| 20 |
|
| 21 |
.SH DESCRIPTION |
| 22 |
This utility checks or sets the status of a network interface's Media |
| 23 |
Independent Interface (MII) unit. Most fast ethernet adapters use an |
| 24 |
MII to autonegotiate link speed and duplex setting. |
| 25 |
.PP |
| 26 |
Most intelligent network devices use an autonegotiation protocol to |
| 27 |
communicate what media technologies they support, and then select the |
| 28 |
fastest mutually supported media technology. The \fB\-A\fR or |
| 29 |
\fB\-\-advertise\fR options can be used to tell the MII to only |
| 30 |
advertise a subset of its capabilities. Some passive devices, such as |
| 31 |
single-speed hubs, are unable to autonegotiate. To handle such |
| 32 |
devices, the MII protocol also allows for establishing a link by |
| 33 |
simply detecting either a 10baseT or 100baseT link beat. The \fB\-F\fR |
| 34 |
or \fB\-\-force\fR options can be used to force the MII to operate in |
| 35 |
one mode, instead of autonegotiating. The \fB\-A\fR and \fB\-F\fR |
| 36 |
options are mutually exclusive. |
| 37 |
.PP |
| 38 |
The default short output reports the negotiated link speed and link |
| 39 |
status for each interface. |
| 40 |
.SH OPTIONS |
| 41 |
.TP |
| 42 |
\fB\-v\fR, \fB\-\-verbose\fR |
| 43 |
Display more detailed MII status information. If used twice, also |
| 44 |
display raw MII register contents. |
| 45 |
.br |
| 46 |
\fBAlert:\fR If used three times, will force reading all MII |
| 47 |
registers, including non standard ones. It's not guaranteed any |
| 48 |
valid answer from PHY while PHY communication can even hang. |
| 49 |
With driver e1000e will fail while reading register 0x07. |
| 50 |
.TP |
| 51 |
\fB\-V\fR, \fB\-\-version\fR |
| 52 |
Display program version information. |
| 53 |
.TP |
| 54 |
\fB\-R\fR, \fB\-\-reset\fR |
| 55 |
Reset the MII to its default configuration. |
| 56 |
.TP |
| 57 |
\fB\-r\fR, \fB\-\-restart\fR |
| 58 |
Restart autonegotiation. |
| 59 |
.TP |
| 60 |
\fB\-w\fR, \fB\-\-watch\fR |
| 61 |
Watch interface(s) and report changes in link status. The MII |
| 62 |
interfaces are polled at one second intervals. |
| 63 |
.TP |
| 64 |
\fB\-l\fR, \fB\-\-log\fR |
| 65 |
Used with \fB\-w\fR, records link status changes in the system log |
| 66 |
instead of printing on standard output. |
| 67 |
.TP |
| 68 |
\fB\-F\fI media\fR, \fB\-\-force=\fImedia\fR |
| 69 |
Disable autonegotiation, and force the MII to either \fB100baseTx-FD\fR, |
| 70 |
\fB100baseTx-HD\fR, \fB10baseT-FD\fR, or \fB10baseT-HD\fR operation. |
| 71 |
.TP |
| 72 |
\fB\-A\fI media,...\fR, \fB\-\-advertise=\fImedia,...\fR |
| 73 |
Enable and restart autonegotiation, and advertise only the specified |
| 74 |
media technologies. Multiple technologies should be separated by |
| 75 |
commas. Valid media are \fB100baseT4\fR, \fB100baseTx-FD\fR, |
| 76 |
\fB100baseTx-HD\fR, \fB10baseT-FD\fR, and \fB10baseT-HD\fR. |
| 77 |
.TP |
| 78 |
\fB\-p\fI addr\fR, \fB\-\-phy=\fIaddr\fR |
| 79 |
Override the MII address provided by kernel with value \fBaddr\fR. |
| 80 |
|
| 81 |
.SH DIAGNOSTICS |
| 82 |
.TP |
| 83 |
SIOCGMIIPHY on 'eth?' failed: Invalid argument |
| 84 |
If the interface is not running (up), kernel will refuse to report its link state. |
| 85 |
.TP |
| 86 |
SIOCGMIIPHY on 'eth?' failed: Operation not permitted |
| 87 |
Most kernels restrict access to root. |
| 88 |
.TP |
| 89 |
SIOCGMIIPHY on 'eth?' failed: No such device |
| 90 |
This error is shown, if the kernel does not know about the named device. |
| 91 |
.TP |
| 92 |
SIOCGMIIPHY on 'eth?' failed: Operation not supported |
| 93 |
The interface in question does not support MII queries. Most likely, it does not have |
| 94 |
MII transceivers, at all. |
| 95 |
|
| 96 |
.SH AUTHORS |
| 97 |
David Hinds \- [email protected] |
| 98 |
.br |
| 99 |
Donald Becker \- [email protected] |
| 100 |
.br |
| 101 |
Bernd Eckenfels \- [email protected] |
| 102 |
|
| 103 |
.SH SEE ALSO |
| 104 |
http://net-tools.sourceforge.net \- Homepage of the net-tools project |