Centos 6.5 下通过ethtool限制网卡速率

Love The Way You Lie 2022-08-13 16:53 665阅读 0赞

操作环境:

Centos 6.5 x86_64

ethtool

操作步骤:

查看此时网口em1设备信息

  1. [root@ceph-osd-2 ~]# ethtool em1
  2. Settings for em1:
  3. Supported ports: [ TP ]
  4. Supported link modes: 10baseT/Half 10baseT/Full
  5. 100baseT/Half 100baseT/Full
  6. 1000baseT/Full
  7. Supported pause frame use: No
  8. Supports auto-negotiation: Yes
  9. Advertised link modes: 10baseT/Half 10baseT/Full
  10. 100baseT/Half 100baseT/Full
  11. 1000baseT/Full
  12. Advertised pause frame use: No
  13. Advertised auto-negotiation: Yes
  14. Speed: 1000Mb/s
  15. Duplex: Full
  16. Port: Twisted Pair
  17. PHYAD: 1
  18. Transceiver: internal
  19. Auto-negotiation: on
  20. MDI-X: Unknown
  21. Supports Wake-on: g
  22. Wake-on: d
  23. Link detected: yes

使用ethtool显示em1网口速率,提示无法设置

  1. [root@ceph-osd-2 ~]# ethtool -s em1 speed 100
  2. Cannot advertise speed 100

后来查找资料,正确设置方法如下

  1. #ethtool -s em1 speed 100 duplex full autoneg off

查看此时em1网口信息

  1. [root@ceph-osd-2 ~]# ethtool em1
  2. Settings for em1:
  3. Supported ports: [ TP ]
  4. Supported link modes: 10baseT/Half 10baseT/Full
  5. 100baseT/Half 100baseT/Full
  6. 1000baseT/Full
  7. Supported pause frame use: No
  8. Supports auto-negotiation: Yes
  9. Advertised link modes: Not reported
  10. Advertised pause frame use: No
  11. Advertised auto-negotiation: No
  12. Speed: 100Mb/s
  13. Duplex: Full
  14. Port: Twisted Pair
  15. PHYAD: 1
  16. Transceiver: internal
  17. Auto-negotiation: off
  18. MDI-X: Unknown
  19. Supports Wake-on: g
  20. Wake-on: d
  21. Link detected: yes

配置成功

发表评论

表情:
评论列表 (有 0 条评论,665人围观)

还没有评论,来说两句吧...

相关阅读