Jay Taylor's notes

back to listing index

How do I verify the speed of my NIC?

[web search]
Original source (serverfault.com)
Tags: linux networking serverfault.com
Clipped on: 2016-03-08

I just installed a new gigabit network interface card (NIC) in Linux. How do I tell if it is really set to gigabit speeds? I see ethtool has an option to set the speed, but I can't seem to figure out how to report its current speed.

asked Nov 30 '10 at 16:20
Image (Asset 2/14) alt=
User1
5022817
1 upvote
  flag
ethtool -h says: ethtool DEVNAME Display standard information about device – Ryan Babchishin Oct 17 '15 at 23:12
up vote 56 down vote accepted

Just use a command like: ethtool eth0 to get the needed info.

Speed: 1000Mb/s
answered Nov 30 '10 at 16:23
Image (Asset 3/14) alt=
Khaled
23k43458
1 upvote
  flag
Thank you! I knew it was something simple like that! – User1 Nov 30 '10 at 16:29

Use mii-tool to watch the negotiated network speed.

Ex.

eth0: no link
eth1: negotiated 100baseTx-FD, link ok
answered Nov 30 '10 at 20:58
Image (Asset 4/14) alt=
Simon Gate
38122
8 upvote
  flag
For Debian based systems, ethtool is not installed by default. But mii-tool is, as part of the essential "net-tools" package. So this was the best solution for me. – mivk Jul 6 '14 at 13:20

As Khaled mentioned, you should be able to run ethtool with just the interface as an argument. This will list the supported speeds, the advertised speeds, the current speed, and a bunch of other things too:

Settings for eth0:
    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: 1000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000007 (7)
    Link detected: yes

You can also run dmesg, and grep for your interface, but this might not work if your system has been running for a long time and the current buffer no longer has that information (in that case, you'll have to grep the older /var/log/dmesg.* files):

dmesg |grep eth0
[    2.867481] e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
[   19.429444] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   19.431555] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[   19.449341] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   26.972379] e1000: eth0: e1000_set_tso: TSO is Enabled
[   29.920458] eth0: no IPv6 routers present
answered Nov 30 '10 at 16:40
Image (Asset 5/14) alt=
Jed Daniels
5,1581634

I know this is not quite what you asked. But if you want to know the real world performance of your NIC, rather than what your computer says it should be, you can use iperf. You'll need two computers.

On computer one, run iperf in server mode:

iperf -s

On the other, run iperf in client mode:

iperf -c 192.168.0.10

If you want to see the full duplex speed, try this instead:

iperf -d -c 192.168.0.10

Substitute 192.168.0.10 for the servers IP address

answered Oct 1 '15 at 10:28
Image (Asset 6/14) alt=
Ryan Babchishin
1,194314

Use below command

 dmesg | grep -i duplex
 Output: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

refer this

answered Nov 28 '14 at 10:17
Image (Asset 7/14) alt=
Vikas Hardia
15528

Your Answer

asked

5 years ago

viewed

75539 times

active

5 months ago

Hot Network Questions

Technology Life / Arts Culture / Recreation Science Other
  1. Stack Overflow
  2. Server Fault
  3. Super User
  4. Web Applications
  5. Ask Ubuntu
  6. Webmasters
  7. Game Development
  8. TeX - LaTeX
  1. Programmers
  2. Unix & Linux
  3. Ask Different (Apple)
  4. WordPress Development
  5. Geographic Information Systems
  6. Electrical Engineering
  7. Android Enthusiasts
  8. Information Security
  1. Database Administrators
  2. Drupal Answers
  3. SharePoint
  4. User Experience
  5. Mathematica
  6. Salesforce
  7. ExpressionEngine® Answers
  8. more (13)
  1. Photography
  2. Science Fiction & Fantasy
  3. Graphic Design
  4. Movies & TV
  5. Seasoned Advice (cooking)
  6. Home Improvement
  7. Personal Finance & Money
  8. Academia
  9. more (9)
  1. English Language & Usage
  2. Skeptics
  3. Mi Yodeya (Judaism)
  4. Travel
  5. Christianity
  6. Arqade (gaming)
  7. Bicycles
  8. Role-playing Games
  9. more (21)
  1. Mathematics
  2. Cross Validated (stats)
  3. Theoretical Computer Science
  4. Physics
  5. MathOverflow
  6. Chemistry
  7. Biology
  8. more (5)
  1. Stack Apps
  2. Meta Stack Exchange
  3. Area 51
  4. Stack Overflow Careers
site design / logo © 2016 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required
rev 2016.3.8.3324