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
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Uss ethtool to display or change ethernet card settings. To display duplex speed, enter:
# ethtool eth1
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
You can also use mii-tool to find out your duplex mode. Type following command at shell prompt:
eth0: negotiated 100baseTx-FD flow-control, link ok
- 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!Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?
- 30 Cool Open Source Software I Discovered in 2013
- 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