Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use the ethtool command of linux to query and set Nic parameters

Shulou Source: shulou.com Published: 2022-06-02 16:15:18 11月14日 Update

This article will explain in detail about the use of linux's ethtool command to query and set network card parameters. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

The ethtool command is used to query the basic settings of the ethX network port and to set the parameters of the network card.

Syntax format: ethtool [parameters]

Common parameters:

-I display the information driven by the network card-E modify the network card read-only memory bytes-K modify the status of the network card Offload query the basic settings of the ethx network port, where x is the number of the corresponding network card, such as eth0, eth2, etc.-s modify part of the configuration of the network card-t let the network card perform self-detection

Reference example

Query the basic settings of the network port:

[root@linuxcool ~] # ethtool eth0

Query the driver information of the network port:

[root@linuxcool ~] # ethtool-I eth0 driver: e1000version: 7.3.21-k8-NAPIfirmware-version:

Set the way the network port works:

[root@linuxcool ~] # ethtool-s eth0 autoneg off speed 100 duplex full [root@linuxcool ~] # ethtool eth0

Check the network card to see if there are any errors when receiving / sending data:

[root@linuxcool] # ethtool-S eth0

Stop the sending module TX of the network card:

[root@linuxcool ~] # ethtool-A tx off eth0 on using linux's ethtool command to query and set Nic parameters is shared here. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Network card query parameter network port command information more article reference driver good practical content read-only memory byte memory instance commonly used data article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MariaDB vpn Shulou Tech Info Docker