1. 查看网卡信息
lspci | grep -i 'eth'
1a:00.0 Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GbE SFP+ (rev 09) 1a:00.1 Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GbE SFP+ (rev 09) 1a:00.2 Ethernet controller: Intel Corporation Ethernet Connection X722 for 1GbE (rev 09) 1a:00.3 Ethernet controller: Intel Corporation Ethernet Connection X722 for 1GbE (rev 09) 3b:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01) 3b:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
-
第一列表示的网卡编号
-
后面展示有2个10G,2个1G,2个扩展10G口,其中板载的是
X722
网卡,扩展的为82599ES
网卡,通过查询得知82599ES为X520
类型。
2. 安装驱动
- 到对应官网下载对应的tar压缩文件
tar zxvf ixgbe-5.3.3.tar.gz
- 进入到对应目录查看
README
文件,该文件叙述了支持的网卡型号以及安装方法 rmmod ixgbe
卸载原驱动- 进入
src
目录进行make install
ip link show
查看- 加载网卡驱动
modprobe ixgbe
或modprobe ixgbe allow_unsupported_sfp=1,1
- 通过
ethtool eth0
查看对应网卡端口
3. 查看网卡驱动版本
[root@xxx tmp]# ethtool -i eth0 driver: i40e #所使用的驱动模块名称 version: 1.5.10-k #驱动版本 firmware-version: 3.2d 0x80000b8a 255.65535.255 expansion-rom-version: bus-info: 0000:1a:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: yes
4.查看模块更多信息
[root@wxxxx ~]# modinfo i40e filename: /lib/modules/3.10.0-123.6.1.el6.ksyun.x86_64/updates/drivers/net/ethernet/intel/i40e/i40e.ko version: 2.4.10 license: GPL description: Intel(R) 40-10 Gigabit Ethernet Connection Network Driver author: Intel Corporation, <e1000-devel@lists.sourceforge.net> srcversion: 3977C21019A3C4865FF253A alias: pci:v00008086d0000158Bsv*sd*bc*sc*i* alias: pci:v00008086d0000158Asv*sd*bc*sc*i* alias: pci:v00008086d000037D3sv*sd*bc*sc*i* alias: pci:v00008086d000037D2sv*sd*bc*sc*i* alias: pci:v00008086d000037D1sv*sd*bc*sc*i* alias: pci:v00008086d000037D0sv*sd*bc*sc*i* alias: pci:v00008086d000037CFsv*sd*bc*sc*i* alias: pci:v00008086d000037CEsv*sd*bc*sc*i* alias: pci:v00008086d00001588sv*sd*bc*sc*i* alias: pci:v00008086d00001587sv*sd*bc*sc*i* alias: pci:v00008086d00001589sv*sd*bc*sc*i* alias: pci:v00008086d00001586sv*sd*bc*sc*i* alias: pci:v00008086d00001585sv*sd*bc*sc*i* alias: pci:v00008086d00001584sv*sd*bc*sc*i* alias: pci:v00008086d00001583sv*sd*bc*sc*i* alias: pci:v00008086d00001581sv*sd*bc*sc*i* alias: pci:v00008086d00001580sv*sd*bc*sc*i* alias: pci:v00008086d00001574sv*sd*bc*sc*i* alias: pci:v00008086d00001572sv*sd*bc*sc*i* depends: ptp vermagic: 3.10.0-123.6.1.el6.ksyun.x86_64 SMP mod_unload modversions parm: debug:Debug level (0=none,...,16=all) (int)
5.问题
- 有网卡识别不了。通过
dmesg
查看是由于模块问题
ixgbe 0000:3b:00.1: PCI INT B -> GSI 44 (level, low) -> IRQ 44 ixgbe 0000:3b:00.1: setting latency timer to 64 ixgbe: 0000:3b:00.1: ixgbe_check_options: FCoE Offload feature enabled ixgbe 0000:3b:00.1: failed to load because an unsupported SFP+ or QSFP module type was detected. ixgbe 0000:3b:00.1: Reload the driver after installing a supported module.
方法:rmmod ixgbe
删除驱动modprobe ixgbe allow_unsupported_sfp=1,1
然后ifconfig即可。
来源:https://www.cnblogs.com/hbgzy/p/10266546.html