Friday, August 24, 2012

How to find out LAN card speed in linux ?


To Find full or half duplex speed:

You can use dmesg command to find out your duplex mode:


   # dmesg | grep -i duplex


O/P: 

eth0: link up, 1000Mbps, full-duplex, lpa 0x45E1


So we can come to know that it has 

1. One NIC card, i.e, etho.  if it has 2 NIC cards , it will show eth1 
2. It is 1000Mbps speed
3. Communication is full duplex mode.


Use ethtool to display or change ethernet card settings.  To display duplex speed.


# ethtool eth0

Output:

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: umbg
        Wake-on: g
        Current message level: 0x00000007 (7)
        Link detected: yes

Explanation:

So we come to know that , eth0 supports 10baseT/Half, 10baseT/Full, 100baseT/Half, 100baseT/Full and  1000baseT/Full.

But the network configured as 1000Mbps , Full duplex mode.

We 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)









3 comments: