MII-TOOL(8)
π NAME π
okay so bestie, this is mii-tool π¦ and it's giving "check your network interface's MII status" energy. It's all about viewing and manipulating the media-independent interface status β¨
π SYNOPSIS π
mii-tool [-v, --verbose] [-V, --version] [-R, --reset] [-r, --restart]
[-w, --watch] [-l, --log] [-A, --advertise=media,...] [-F,
--force=media] [-p, --phy=addr] interface ...
π DESCRIPTION π
okay so 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, so it's lowkey the thing doing the heavy lifting πΈ
Most intelligent network devices use an autonegotiation protocol to say what media technologies they support, and then pick the fastest one everyone can agree on π«Ά The -A or --advertise options let you tell the MII to only advertise a subset of its capabilities. Some passive devices, like single-speed hubs, can't autonegotiate at all π For those, the MII protocol can still establish a link by just detecting a 10baseT or 100baseT link beat. That's where -F or --force comes in, forcing the MII to run in one mode instead of negotiating β¨ Just know that -A and -F are mutually exclusive, so you can't use both at once, no cap π
ββοΈ
The default short output reports the negotiated link speed and link status for each interface π§
π OPTIONS π
-v,--verboseβ shows more detailed MII status info π Use it twice and you also get the raw MII register contents π
β οΈ Alert: if you go three times, it'll force a read of all MII registers, including the non-standard ones π There's no guarantee you'll get a valid answer from the PHY, and PHY communication can even hang. With thee1000edriver, reading register0x07will fail π
-V,--versionβ shows the program version info π-R,--resetβ resets the MII back to its default configuration π-r,--restartβ restarts autonegotiation π-w,--watchβ watches the interface(s) and reports link status changes π The MII interfaces get polled every one second β±οΈ-l,--logβ used together with-w, this records link status changes in the system log instead of printing them to standard output π-F media,--force=mediaβ disables autonegotiation and forces the MII into either100baseTx-FD,100baseTx-HD,10baseT-FD, or10baseT-HDoperation π-A media,...,--advertise=media,...β enables and restarts autonegotiation, but only advertises the media technologies you pick π«§ Separate multiple technologies with commas. The valid media are100baseT4,100baseTx-FD,100baseTx-HD,10baseT-FD, and10baseT-HDπ-p addr,--phy=addrβ overrides the MII address the kernel gave you with the valueaddrπ§ββοΈ
π DIAGNOSTICS π
when stuff goes wrong, these are the errors you'll see, iykyk π
SIOCGMIIPHY on 'eth?' failed: Invalid argumentβ if the interface isn't running (up), the kernel will refuse to report its link state π ββοΈSIOCGMIIPHY on 'eth?' failed: Operation not permittedβ most kernels restrict access to root, so try again as root πSIOCGMIIPHY on 'eth?' failed: No such deviceβ this one pops up when the kernel doesn't know about the named device π«SIOCGMIIPHY on 'eth?' failed: Operation not supportedβ the interface in question doesn't support MII queries. Most likely it doesn't have MII transceivers at all, bestie π
π¦ AUTHORS π¦
these are the legends who made it happen π«Ά
- David Hinds -
dhinds@pcmcia.sourceforge.org - Donald Becker -
becker@scyld.com - Bernd Eckenfels -
net-tools@lina.inka.de
β¨ SEE ALSO β¨
if you want to go deeper, check out the homepage of the net-tools project at http://net-tools.sourceforge.net π
π and that's the tea, bestie! mii-tool from the net-tools project, dated 2013-02-15 π β¨
π¦ where this page comes from
- alpine 3.22: net-tools-doc 2.10-r3 Β· GPL-2.0-or-later
- alpine 3.23: net-tools-doc 2.10-r3 Β· GPL-2.0-or-later
- alpine 3.24: net-tools-doc 2.10-r3 Β· GPL-2.0-or-later
- arch rolling: net-tools 2.10-3 Β· GPL2
- debian bookworm: net-tools 2.10-0.1+deb12u2 Β· GPL-2.0-or-later
- debian trixie: net-tools 2.10-1.3 Β· GPL-2.0-or-later
- nixpkgs unstable: net-tools 2.10
- ubuntu jammy: net-tools 1.60+git20181103.0eebece-1ubuntu5 Β· GPL-2.0-or-later
- ubuntu jammy: net-tools 1.60+git20181103.0eebece-1ubuntu5.4 Β· GPL-2.0-or-later
- ubuntu noble: net-tools 2.10-0.1ubuntu4 Β· GPL-2.0-or-later
- ubuntu noble: net-tools 2.10-0.1ubuntu4.4 Β· GPL-2.0-or-later
- ubuntu questing: net-tools 2.10-1.3ubuntu2 Β· GPL-2.0-or-later
- ubuntu resolute: net-tools 2.10-2ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: net-tools 2.10-2ubuntu1 Β· GPL-2.0-or-later
- Copyright (C) 2000 David A. Hinds -- dhinds@pcmcia.sourceforge.org
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms