Find speed of NIC in linux

This entry was posted in Linux and tagged on June 17, 2012, by

In Redhat we have two packages which will allows us to display the speed of NIC

ethtool- This is use to change the speed or to display the speed of nic.

 

mii-tool : Use to view or manipulate the NIC status

Install both the packages. ethtool and net-tools

1.First check if it is install or not

Look for net-tools package

# rpm -qa net-tools

net-tools-1.60-77.el5

If it is not installed install it.

# rpm -ivh net-tools*

Now look for ethtools package

# rpm -qa ethtool

ethtool-5-1.el5

If it is not install , install it

# rpm -ivh ethtool*

2. Now next step is to find the duplex speed

# dmesg | grep -i duplex

tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth1: Link is up at 100 Mbps, full duplex.
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth1: Link is up at 100 Mbps, full duplex.
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth1: Link is up at 100 Mbps, full duplex.

 

Full duplex means you are able to send and receive data simultaneously. and Half duplex means you can either send or receive data at once a time.

Now let us use the tools

# ethtool eth0

Settings for eth0:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes

OR

Use mii-tool command

# mii-tool eth0

eth0: 100 Mbit, 100baseTx-FD flow control,link ok

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright 2017 ©Aceadmins. All rights reserved.