Q. How do I find out if my Lan (NIC) card working at full or halt duplex mode / speed under Linux?
A. LAN card or NIC is use to send and receive data. Technically, we use word Duplex for this functionality. Full duplex means you are able to send and receive data (files) simultaneously. In half duplex, you can either send or receive data at a time (i.e. you cannot send receive data (files) simultaneously). Obviously, full duplex gives you best user experience. However, how can I find out whether I am using full duplex/half duplex speed/mode?
Task: Find full or half duplex speed
You can use dmesg command to find out your duplex mode:
# dmesg | grep -i duplex
Output:
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
ethtool command
Uss ethtool to display or change ethernet card settings. To display duplex speed, enter:
# ethtool eth1
Output:
Settings for eth1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 10Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes
mii-tool command
You can also use mii-tool to find out your duplex mode. Type following command at shell prompt:
# mii-tool
Output:
eth0: negotiated 100baseTx-FD flow-control, link ok
Remember,
- 100baseTx-FD: 100Mbps full duplex (FD)
- 100baseTx-HD: 100Mbps half duplex (HD)
- 10baseT-FD: 10Mbps full duplex (FD)
- 10baseT-HD: 10Mbps half duplex (HD)
mii-tool 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. If you are using old card then this utility may not work (use dmesg command).
This utility is useful for forcing specific Ethernet speed and duplex settings too, setup 100Mbps full duplex speed under Linux:
# mii-tool -F 100baseTx-FD
Setup 10Mbps half duplex:
# mii-tool -F 10baseT-HD
You can find more information about setting duplex speed here using ethtool command.
Updated for accuracy!
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop








![Linux Command To Find SATA Link Speed Such as 1.5 / 3.0 / 6.0 Gbps [ Hard Disk ]](http://s0.cyberciti.org/images/rp/1/2.jpg)




{ 10 comments… read them below or add one }
Very informative. Need some Real Time Datacenter , Linux Info..
Thank you for that information, especially the name of that tool. Very useful. Again, Thanks.
ethtool, mii-tool and dmesg output show very different results
first off mii-tool -v eth0
Output
eth0: negotiated 10baseT-HD, link ok
product info: vendor 00:50:ef, model 21 rev 1
basic mode: autonegotiation enabled
basic status: autonegotiation complete, link ok
capabilities:
advertising: 100baseTx-HD 10baseT-HD
link partner: 100baseTx-FD 10baseT-HD
2)
ethtool eth0
Settings for eth0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 2
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: yes
3) dmesg | grep -i duplex
bnx2: eth0 NIC Link is Up, 1000 Mbps full duplex
bnx2: eth1 NIC Link is Up, 1000 Mbps full duplex
Which one should be believed? mii-tool shows the nic is advertising 100baseT/HD but negotiated 10BaseT/HD (which is really slow for what we want to do); ethtool shows nic is advertising 1000Mb/s FD which, confirms with dmesg output.
Conclusion? mii-tool may not be compatible with the fibre channel nics?
How to interpret this output?
Only use ethtool as mii-tool is not compatible and it will be not included in future version
I’m the most rabid Linux preacher in the world, but checking link speed and duplex is one area where windoze is easier to work with.
And think Linux is devious? Try it on Solaris.
thanks a lot!
Bill: What is so devious about “dladm show-dev” ?
Also yes windows is easier if you have graphical console but how do you do it on remote logi ?
my adapter was disconnectig again and again i changed its link speed from 100 mbps full duplex to 10 mbps full duples the problem is gone bu does it affect my downloading speed because i am having a 4 mbps BSNL broadband plan but i am getting the download speed of only 256 kbps
please suggest what to do !!!
Try to change lan-card, ro wires. Looks like broken card. You can for examle try this with usb-lan.
In Debian (also Raspberry pi) this is the way to do it as per document
/usr/share/doc/ethtool/README.Debian
iface eth0 inet dhcp
link-speed 100
link-duplex full
ethernet-autoneg off
works like a charm