1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| <!--more--> ethtool eno1 Settings for eno1: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: Symmetric Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Speed: 100Mb/s # 使用命令查看时,虽然显示是千兆网卡,但Speed只有100Mb/s ethtool -s eno1 speed 1000 # 使用上面命令可能将网卡重新设置为1000Mb/s vim /etc/sysconfig/network-scripts/ifcfg-eno1 ETHTOOL_OPTS="speed 1000 duplex full autoneg off" # 在网卡配置中加入上面一行,可以强制将网卡设置为千兆。
============================================================================================== ethtool命令的简单使用 ethtool ethX # 查看网卡信息 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] [port tp|aui|bnc|mii] # [speed 10|100|1000] 设置网口速率10/100/1000M # [duplex half|full] 设置网口半/全双工 # [autoneg on|off] 设置网口是否自协商 # [port tp|aui|bnc|mii] 设置网口类型
|