16

Is there a command that I can verify by its output the speed of my NIC and some information about its characteristics such as duplex full or half .

28

Suppose your NIC name eth0 :

You can verify the speed and some informations by three Commands :

First Command :

dmesg |grep eth0

Output :

enter image description here

Second Command :

mii-tool -v  eth0

Output :

enter image description here

FD : full duplex , Logic that enables concurrent sending and receiving. This is usually desirable and enabled when your computer is connected to a switch.

HD : half duplex , his logic requires a card to only send or receive at a single point of time. When your machine is connected to a Hub, it auto-negotiates itself and uses half duplex to avoid collisions.

Third command :

ethtool eth0

ethtool - Display or change ethernet card settings

Install ethtool :

sudo apt-get install ethtool

Output :

Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: Unknown
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000007 (7)
                   drv probe link
    Link detected: yes

Hope it helps .

8

To obtain the link speed of an interface without parsing logs or installing additional tools, simply read its corresponding speed sysfs node, as follows:

cat /sys/class/net/<interface>/speed

where is the name of your NIC, e.g. eth0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.