知识库

个人知识管理

用户工具

站点工具


博客:一次ubuntu网卡修复过程

一次ubuntu网卡修复过程

前言

最近使用Ubuntu16.04时,发现连接有线网卡时经常出现网络断流的现象.通过wireshark抓包发现,每隔一段时间(十几秒或者几分钟),网络就会无法连通,使用ping命令行,提示Destination Host Unreachable,连接无线网络卻没有发现这种情况,怀疑是网络驱动问题,遂尝试更新网卡驱动.

信息搜集

首先查看本机网卡驱动相关信息,需要知道当前网卡型号和驱动版本.

执行命令

lspci

显示

00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09)
00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03)
00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (3) I218-LM (rev 03)
00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #6 (rev e3)
00:1c.1 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3)
00:1d.0 USB controller: Intel Corporation Wildcat Point-LP USB EHCI Controller (rev 03)
00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03)
00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)
00:1f.6 Signal processing controller: Intel Corporation Wildcat Point-LP Thermal Management Controller (rev 03)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8192EE PCIe Wireless Network Adapter

查看Ethernet controller一行,可以看到有线网卡类型为Intel Corporation Ethernet Connection (3) I218-LM

执行命令

sudo lshw -C network 

显示

  *-network               
       description: Ethernet interface
       product: Ethernet Connection (3) I218-LM
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eth0
       version: 03
       serial: 50:7b:9d:ae:75:dd
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.2-3 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:50 memory:f1200000-f121ffff memory:f123e000-f123efff ioport:4080(size=32)

可以看到驱动为e1000e ,版本为3.2.6-k.

使用搜索引擎搜索官网驱动,很容易搜索到相关的驱动地址

官网最新驱动版本为3.4.0.2,下载下来准备更新.

更新驱动

下载驱动文件为e1000e-3.4.0.2.tar.gz并解压,查看内部文档说明,使用如下步骤更新驱动.

安装新驱动

cd e1000e-3.4.0.2/src
make
sudo make install

卸载旧驱动并启用新驱动

sudo rmmod e1000e
sudo modprobe e1000e

重新查看驱动版本信息

sudo lshw -C network 

显示

  *-network               
       description: Ethernet interface
       product: Ethernet Connection (3) I218-LM
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eth0
       version: 03
       serial: 50:7b:9d:ae:75:dd
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.4.0.2-NAPI firmware=0.2-3 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:50 memory:f1200000-f121ffff memory:f123e000-f123efff ioport:4080(size=32)

可以看到驱动版本已更新为3.4.0.2-NAPI.

搞定!

博客/一次ubuntu网卡修复过程.txt · 最后更改: 2019/09/11 00:49 (外部编辑)