macoffee

网卡的工作模式是半双工,会导致服务器间通讯异常。

查看linux网卡工作状态:

# ethtool ethX

修改linux网卡的工作模式:

ethtool –r ethX                          ## 重置ethX网口到自适应模式
ethtool –S ethX                          ## 查询ethX网口收发包统计
ethtool –s ethX [speed 10|100|1000]        ## 设置网口速率10/100/1000M
[duplex half|full]                     ## 设置网口半/全双工
[autoneg on|off]                      ## 设置网口是否自协商

# ethtool -s eth0 duplex full autoneg off speed 100

 

linux网卡工作模式开机就是全双工的方法:

一:
在/etc/sysconfig/network-script/ifcfg-ethX加入下面这句:
ETHTOOL_OPTS="speed 100 duplex full autoneg off"
二:
将上面的命令写入到/etc/rc.local里面。
ethtool -s eth0 duplex full autoneg off speed 100

  

分类:

技术点:

相关文章:

  • 2021-12-05
  • 2021-12-05
  • 2021-12-05
  • 2021-09-26
  • 2021-10-14
  • 2021-09-07
  • 2021-07-04
猜你喜欢
  • 2022-03-06
  • 2021-08-31
  • 2021-11-16
  • 2021-12-05
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案