Knowledgebase

linux系统网卡不兼容第三方光模块设置

  • 1

 经常买光模块的人都知道,光纤模块通常需要确认兼容码,因为目前市面上存在2种,一种是高性能的兼容模块,一种是原交换机品牌光模块.两者之间的价格差距较大,
下面我们简单认识一下

  首先,其实两者的光模块制造商都是一样的,全球比较全体系的光模块制造商就几家,如finisar,爱华高,不管是品牌商还是第三方厂商都是请专门的光模块制造商(也就是代工工厂)按照市场上的,协议和标准做的光模块,不符合要求的也不会被市场接受,直接被淘汰掉,因为代工厂商OEM生产的模块和卖给其他品牌商的产品都是一样的,因此产生的兼容问题跟原厂商生产的一样会产生,因为采用的是一样的芯片。

  纤网卡的驱动在默认情况下不支持第三方兼容光模块,会导致网卡驱动加载失败,表现为,执行lspci |grep 82599能看到网卡在pci设备中

 

  06:00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01)

  06:00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01)

 

  但是使用ifconfig -a命令,却找不到网卡,使用demsg可以看到以下出错信息:

 

  ixgbe 0000:06:00.0: failed to load because an unsupported SFP+ module type was detected

  解决问题的方法是如下

  通过ifconfig -a发现有网卡找不到,并且配置没有问题,那么很可能是光模块有问题
  dmesg | grep 82599EB ,通过这个命令过滤发现有如下信息:

  [ 7142.121979] ixgbe 0000:01:00.0 em1: WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. Intel Corporation is not responsible for any harm caused by using untested modules.

  [ 6828.735097] ixgbe 0000:01:00.0: failed to load because an unsupported SFP+ or QSFP module type was detected.

  82599EB型号的网卡默认只支持自家的模块,第三方模块不兼容。要暂时解决这个问题我们可以通过修改网卡参数来使网卡可用,但是要长期使用还是建议模块用配套的intel的。

  使用如下命令可以使网卡可用:

  modprobe -r ixgbe //卸载光模块驱动

  modprobe ixgbe allow_unsupported_sfp=1,1 //允许系统支持网卡不支持的模块,其中”1,1“代表port_1和port_2

  执行rmmod ixgbe,卸载掉驱动,

  然后执行modprobe ixgbe allow_unsupported_sfp=1

  驱动对allow_unsupported_sfp的解释为:   allow_unsupported_sfp:Allow unsupported and untested SFP+ modules on 82599-based adapters (uint)

  重新加载后,大部分情况下ifconfig就能够看到网卡信息了。

      

命令方式解决要写入开机启动项,要不然重启又加载不起来了:

vi /etc/rc.local

chmod +x /etc/rc.d/rc.local (授权执行权限记得写)

modprobe -r ixgbe

modprobe ixgbe allow_unsupported_sfp=1,1
————————————————

 


Was this answer helpful?

© Copyright 2019. CTG SERVER LTD