How to Find Network Interface Details Using Linux Mii-Tool

Interface Details

Mii-tool is used to allow Linux system administrators to modify or change or check the network interface card. This tool can be used for the diagnostic and identification of ethernet devices. Even you can control the links, set the auto-negotiation mode, set the simplex, half-duplex or full-duplex mode. (Simplex, half-duplex and full-duplex are referred to as dialog modes and they can determine the direction in which data can flow through the network media).

Using this command you can set speed and duplex of your interface card. Make sure that your NIC should support mii-tool.

1) Mii Tool (default output)

By default mii-tool shows below results on the console.

# mii-tool
eth0: negotiated 100baseTx-FD, link ok

Detail information on each card can be found using -v option. You can find the link status speed of the connectivity.

# mii-tool -v
eth0: negotiated, link ok
product info: vendor 00:08:18, model 25 rev 0
basic mode: autonegotiation enabled
basic status: autonegotiation complete, link ok
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
eth1: negotiated, link ok
product info: vendor 00:08:18, model 25 rev 0
basic mode: autonegotiation enabled
basic status: autonegotiation complete, link ok
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

2) Force set speed

Below mii-tool command will force set the speed of the interface to 10 Mbit

# mii-tool --force 10baseT-FD

# mii-tool
eth0: 10 Mbit, full duplex, link ok

3) Initiate auto-negotiation

This command will restart the auto-negotiation.

# mii-tool --restart

4) Set to Full Duplex

Below options will change the settings of eth0 interface to 100 Mbs Full-Duplex:

# mii-tool -F 100baseTx-FD eth0

Conclusion

In this tutorial, we learned how to use Linux mii tool to check and change the network interface parameters. Thanks for reading and please leave your suggestion in the below comment section.

Read Also: How to Use ethtool Command with Examples
Bobbin Zachariah 11:59 am

Comments

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.