系统环境:
OS: Ubuntu 16.04 LTS 64位
之前也遇到过这样的问题,使用有线网络上网时,有时会出现断网的现象,不过一般重新启用网络后就可以用了。但是这次断网后,却怎么也连不上网了。后来上网查了很久,终于找到原因了,是网卡的驱动问题导致的。
查找问题
首先,查看系统 Log:
# cat /var/log/syslog | grep enp
NetworkManager[1002]: <info> [1494831368.7343] device (enp3s0): state change: disconnected -> unmanaged (reason 'sleeping') [30 10 37]
NetworkManager[1002]: <info> [1494831368.7589] device (enp3s0): link disconnected
NetworkManager[1002]: <info> [1494831376.6517] device (enp3s0): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
kernel: [ 602.158370] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
kernel: [ 602.286519] r8169 0000:03:00.0 enp3s0: link down
之后执行如下命令查看系统内核版本:
# uname -a
Linux ubuntupc 4.4.0-77-generic #98-Ubuntu SMP Wed Apr 26 08:34:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
然后查看网卡及使用的驱动信息:
# lspci -knn
......
......
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)
Subsystem: Dell RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1028:0585]
Kernel driver in use: r8169
Kernel modules: r8169
注意:以上信息表明,网卡为 Dell RTL8111/8168/8411,但是使用的驱动却是 “r8169”,所以这就是问题所在。
Tips:
也可以执行下面的命令查看网卡及版本信息:
# lshw -C network
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:03:00.0
logical name: enp3s0
version: 06
serial: xx:bb:cc:yy:dd:zz
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.21.189 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:26 ioport:d000(size=256) memory:f2104000-f2104fff memory:f2100000-f2103fff
......
......
其中的 driver=r8169 driverversion=2.3LK-NAPI 为网卡的驱动版本。
驱动下载
之后在官网下载对应内核版本的驱动程序:
http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#2
下载 Unix (Linux) 中的 LINUX driver for kernel up to 4.7 驱动文件。
驱动安装
# tar xjvf 0009-r8168-8.044.02.tar.bz2
# cd r8168-8.044.02/
# ./autorun.sh
Check old driver and unload it.
rmmod r8169
Build the module and install
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:182
sign-file: certs/signing_key.pem: No such file or directory
Backup r8169.ko
rename r8169.ko to r8169.bak
DEPMOD 4.4.0-77-generic
load module r8168
Updating initramfs. Please wait.
update-initramfs: Generating /boot/initrd.img-4.4.0-77-generic
Completed.
之后重启电脑(最好再重新启用下网络连接)即可。
参考文献:
分享到:
相关推荐
在安装ubuntu18.04.1时,不能上网,原因是网卡与驱动不能匹配,在官网下载进入死循环,一直下载不成功,这里分享该网卡的驱动提供网友下载(我使用的是RTL8111/8168/8411网卡)。当然还有一种方式是使用18.04.2的...
华硕 PRIME Z370-P II realtek RTL8111H 千兆网卡 18.04 内核4.15.55,操作系统ubuntu18.04
下载**clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04** LLVM下载地址:http://releases.llvm.org/download.html#8.0.0 放置到`openarkcompiler/tools`目录,打开`openarkcompiler/build/config/BUILDCONFIG.gn`...
内网环境安装mysql5.7数据库所需deb安装包,libaio1_0.3.110-2_amd64.deb ,libmecab2_0.996-1.2ubuntu1_amd64.deb ,libmysqlclient20_5.7.25-1ubuntu16.04_amd64.deb,libmysqlclient-dev_5.7.25-1ubuntu16.04_amd...
Ubuntu 16.04入门手册 Getting Started with Ubuntu 16.04
Ubuntu 16.04入门手册 Getting Started with Ubuntu 16.04.rar
在ubuntu16.04运行lsd-slam需要一些修改,该文件为修改后的文件,参考http://www.luohanjie.com/2017-03-17/ubuntu-install-lsd-slam.html进行安装运行,如果运行有问题,可参考下面几个链接: ubuntu16.04/linux...
这篇文章主要介绍了Ubuntu 16.04 中文版安装基础入门教程(图文),需要的朋友可以参考下 安装Ubuntu16.04 1、进入 live cd 桌面 1)安装盘下载地址:http://releases.ubuntu.com/16.04/,可以用硬盘启动,也可以...
VM中ubuntu16.04安装VM tools的详细步骤,及具体说明和图示
本文主要是在ubuntu 16.04环境下,如何安装 eclipse。
ubuntu 16.04 可以方便使用的清理工具 ubuntu-tweak ubuntu 16.04 LTS
https://github.com/AndreyTSpb/rtl8723bs-Ubuntu16.04 ...cd rtl8723bs-Ubuntu16.04 cd RTL8723BS sudo make sudo make install sudo depmod -a sudo modprobe r8723bs sudo modinfo r8723bs
ubuntu16.04 iso 镜像。ubuntu16.04 iso 镜像。ubuntu16.04 iso 镜像。ubuntu16.04 iso 镜像。ubuntu16.04 iso 镜像。ubuntu16.04 iso 镜像。ubuntu16.04 iso 镜像。
下载**clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04** LLVM下载地址:http://releases.llvm.org/download.html#8.0.0 放置到`openarkcompiler/tools`目录,打开`openarkcompiler/build/config/BUILDCONFIG.gn`...
用U盘制作ubuntu16.04系统的一些心得,包含下载网址,安装整理的一些详细过程
ubuntu-16.04.7-desktop-amd64 下载链接:https://blog.csdn.net/kt1776133839/article/details/123229169
Ubuntu16.04 离线安装openssh所需的安装包deb(修正了安装步骤)
ubuntu16.04中安装使用dockerubuntu16.04中安装使用docker
解决docker的ubuntu16.04官方镜像,默认无法使用https的apt源的deb包。解压缩后,执行setup.sh安装即可。
emqttd-ubuntu16.04-v2.3.0.zip 开发工具 用于tcp的通讯