Tech

Check the network interface of your Linux system with ethtool

NS ethtool Linux utilities allow you to view and change some of your network driver and interface card settings, especially for wired devices. These include speed, whether the interface uses auto-negotiation, whether to run in half-duplex mode or full-duplex mode, and other settings. Ethtool also provides an easy way to view or troubleshoot your network interface.

probably, ethtool Already available on Linux systems. However, you can use one or both of the following commands to verify.

$ which ethtool
/usr/sbin/ethtool
$ sudo ethtool —version
ethtool version 5.13

To understand how this utility can control the settings, run a command similar to the following: NS -NS It means “help”. You’ll notice that you’re looking at a 10-page syntax like the one shown here.

$ ethtool -h | more
ethtool version 5.13
Usage:
        ethtool [ FLAGS ] DEVNAME       Display standard information about device
        ethtool [ FLAGS ] -s|—change DEVNAME   Change generic options
                [ speed %d ]
                [ lanes %d ]
                [ duplex half|full ]
                [ port tp|aui|bnc|mii|fibre|da ]
                [ mdix auto|on|off ]
                [ autoneg on|off ]
                [ advertise %x[/%x] | mode on|off ... [—] ]
                [ phyad %d ]
                [ xcvr internal|external ]
                [ wol %d[/%d] | p|u|m|b|a|g|s|f|d... ]
                  [ sopass %x:%x:%x:%x:%x:%x ]
                [ msglvl %d[/%d] | type on|off ... [—] ]
                [ master-slave preferred-master|preferred-slave|forced-master|forced-slave ]
        ethtool [ FLAGS ] -a|—show-pause DEVNAME       Show pause options
        ethtool [ FLAGS ] -A|—pause DEVNAME    Set pause options
                [ autoneg on|off ]
                [ rx on|off ]
—More—

Show settings

Obviously there are many things ethtool The utility can be done for you. However, to view the network interface settings, enter ethtool followed by the name of the network interface (for example, eth0). The following example looks at a network interface named enp0s25.

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

Note the “yes” in the last line indicating that this interface is working. The output also shows that it has supported link modes and that auto-negotiation is turned on. Notice the speed (100Mbps) and the interface running at full duplex.

You can check the Ethernet driver settings using a command similar to the following:

Copyright © 2021 IDG Communications, Inc.

Check the network interface of your Linux system with ethtool

Source link Check the network interface of your Linux system with ethtool

Show More

Related Articles

Back to top button