光模块不兼容问题处理

今天碰到一个问题就是centos 7能识别到10G网卡出来,就是没有网卡配置文件。

#lspci | grep -i Eth 可以识别10G网卡,ip a 没有显示10G网卡出来

#dmesg | grep -i fail

这样现像由于光模块和网卡不兼容,由于模块不是自带模块,要么是驱动不对,或是要么换模块,要么通过命令方式解决。

解决方案1:

(1)从新卸载驱动

rmmod ixgbe

(2)通过官方下载驱动重新安装,重启网卡重启设备,查看配置文件有没有出来

解决方案2:

使用modprobe命令加载模块。

检查驱动程序的版本,然后加载:

#modinfo ixgbe

# modprobe ixgbe

或者,确保在加载新模块之前从内核中删除任何旧的ixgbe驱动程序:

# rmmod ixgbe

#Modprobe ixgbe

解决方案3:

# 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或ip addr就能够看到网卡信息了

.通过ifconfig -a发现有网卡找不到,并且配置没有问题,那么很可能是光模块有问题

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.

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

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

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

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

重启网卡服务重新加载IP a能够看到网卡信息了

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

vi /etc/rc.local

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

modprobe -r ixgbe

modprobe ixgbe allow_unsupported_sfp=1,1

猜你喜欢

转载自blog.csdn.net/weixin_38642722/article/details/129210200