Ethtool is a useful linux utility that we can use to view and modify the ethernet device settings. By following this article, you will learn how to change the speed in your network card, modify auto-negotiation settings and changing duplex modes in your network card.
#apt install ethtool
Once it is installed, use the following command to check the installed version.
Display Network Interface card version
#ip link show
As you can see, I have only two network interfaces connected to my linux virtual machine.
To display more information about a specific interface, use the following command:
Display driver settings
This option displays driver version, firmware version and bus details as shown below
#ethtool -i <interface_name>
Display Auto-negotiation settings
You can view the auto-negotiation details about the specific ethernet device by using the following command:
#ethtool -a <interface_name>
Change Auto-negotiation settings
#ethtool -s <interface_name> autoneg off
Display statistics of interface
This command will show the bytes transfered, received, errors, etc, as shown below.
#ethtool -S <interface_name>
Change the Speed of Ethernet Device
#ethtool -s <interface_name> speed 100 autoneg off
Set duplex mode
# ethtool -s <interface_name> speed 100 duplex <full/half>
Save the changes
If you’ve changed any ethernet device parameters using the ethtool, it will all disappear after the next reboot, unless you do the following.
On ubuntu, you have to modify /etc/network/interfaces file and add all your changes as shown below.
Add the following line
Post -up ethtool -s eth2 speed 1000 duplex full autoneg off
Blink LED Port of NIC Card
If you have multiple ethernet adapters connected to your system, you can use the following command to identify the physical port of a particular ethernet card.
#ethtool -p <interface_name>
This command will make the corresponding LED of physical port to blink.
Latest posts by Ruwantha Nissanka (see all)
- 4 ways to hide your identity using linux - January 18, 2021
- How To Install Kali Linux in Virtualbox - December 31, 2020
- Kali Linux : The OS That Hackers Use - December 31, 2020
- How to monitor user activity in Linux with Acct - December 30, 2020
- Debsecan : You will not miss another security update - December 28, 2020