Source code download: https://git.kernel.org/pub/scm/network/ethtool/ethtool.git
Description:
ethtool allows to query or control network drivers and hardware settings, especially for wired Ethernet devices, is used for query and commands for setting network card parameters.
use:
ethtool ethx 查询ethx网口基本设置,其中 x 是对应网卡的编号,如eth0、eth1等等
ethtool –h 显示ethtool的命令帮助(help)
ethtool –i ethX 查询ethX网口的相关信息
ethtool –d ethX 查询ethX网口注册性信息
ethtool –r ethX 重置ethX网口到自适应模式
ethtool –S ethX 查询ethX网口收发包统计
ethtool –s ethX [speed 10|100|1000] [duplex half|full] [autoneg on|off] 设置网口速率 10/100/1000M、设置网口半/全双工、设置网口是否自协商