Ethtool: Utility To Query And Control Network Device Settings

by
Share this Article: Facebook7Google+0Twitter12LinkedIn0Reddit0StumbleUpon0

ethtool is a command line utility used to query and control network device driver and hardware settings, particularly for wired Ethernet devices.

Syntax

ethtool devname options

where devname is the name of the network card i.e eth0, eth1 etc.

This short tutorial will help you to know about installation and some basic examples of ethtool command.

Install Ethtool

On Debian/Linux Mint/Ubuntu:

$ sudo apt-get install ethtool

On CentOS/RHEL:

# yum install ethtool

Examples

To view Ethernet card details, enter the following command.

$ ethtool eth0

Sample Output:

Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Speed: Unknown!
    Duplex: Unknown! (255)
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: Unknown
Cannot get wake-on-lan settings: Operation not permitted
    Current message level: 0x00000007 (7)
                   drv probe link
    Link detected: no

To View the statistics of your Network card, enter the following command.

$ ethtool -S eth0

or

$ ethtool --statistics eth0

To view Network Card Driver Details, use the option ‘-i‘ with ethtool command.

$ ethtool -i eth0

Sample output:

driver: e1000e
version: 2.1.4-k
firmware-version: 1.1-2
bus-info: 0000:00:19.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no

To view the autonegotiate, RX and TX details of eth0, use the option ‘-a‘ with ethtool command.

$ ethtool -a eth0

Sample output:

Pause parameters for eth0:
Autonegotiate:    on
RX:        on
TX:        on

For more information about ethtool command, see the man pages.

$ man ethtool

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook7Google+0Twitter12LinkedIn0Reddit0StumbleUpon0