How do I verify the speed of my NIC?

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.


Solution 1:

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

$ sudo ethtool eth0 | grep Speed

Speed: 1000Mb/s

Solution 2:

It is possible to use the information from the kernel when ethtool is missing:

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

Example for interface named eth0:

cat /sys/class/net/eth0/speed

Solution 3:

NOTE: the man page for mii-tool has this disclaimer:

This program is obsolete. For replacement check ethtool.

Use mii-tool to watch the negotiated network speed.

Ex.

eth0: no link
eth1: negotiated 100baseTx-FD, link ok