Ubuntu 16.04 RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller” 不能上网

来源:http://forum.ubuntu.org.cn/viewtopic.php?f=116&t=463646

1、执行如下命令

uname -a
sudo lspci -knn
sudo lshw -C network
ifconfig
ping 192.168.1.1 -c 4
tail /var/log/syslog -n 20

2、查看状态:

[email protected]:~$ uname -aLinux gofox-To-be-filled-by-O-E-M 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux[email protected]:~$ lspci00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (external gfx0 port B) (rev 02)00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port B)00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port D)00:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port H)00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 42)00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller (rev 40)00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge (rev 40)00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller00:16.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller00:16.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor HyperTransport Configuration00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Address Map00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor DRAM Controller00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Miscellaneous Control00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Link Control01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850]01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]02:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)[email protected]:~$ sudo lshw -C network[sudo] password for gofox: *-network description: Ethernet interfaceproduct: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controllervendor: Realtek Semiconductor Co., Ltd.physical id: 0bus info: [email protected]:03:00.0logical name: eth0version: 06serial: 94:de:80:2a:f5:58size: 100Mbit/scapacity: 1Gbit/swidth: 64 bitsclock: 33MHzcapabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiationconfiguration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.1.100 latency=0 link=yes multicast=yes port=MII speed=100Mbit/sresources: irq:73 ioport:d000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff[email protected]:~$ ifconfigeth0 Link encap:以太网 硬件地址 94:de:80:2a:f5:58 inet 地址:192.168.1.100 广播:192.168.1.255 掩码:255.255.255.0inet6 地址: fe80::96de:80ff:fe2a:f558/64 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1接收数据包:31 错误:0 丢弃:0 过载:0 帧数:0发送数据包:35 错误:0 丢弃:611 过载:0 载波:0碰撞:0 发送队列长度:1000 接收字节:4309 (4.3 KB) 发送字节:5059 (5.0 KB)

lo Link encap:本地环回 inet 地址:127.0.0.1 掩码:255.0.0.0inet6 地址: ::1/128 Scope:HostUP LOOPBACK RUNNING MTU:65536 跃点数:1接收数据包:1054 错误:0 丢弃:0 过载:0 帧数:0发送数据包:1054 错误:0 丢弃:0 过载:0 载波:0碰撞:0 发送队列长度:0 接收字节:84166 (84.1 KB) 发送字节:84166 (84.1 KB)

[email protected]:~$ ping 192.168.1.1 -c 4PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.From 192.168.1.100 icmp_seq=1 Destination Host UnreachableFrom 192.168.1.100 icmp_seq=2 Destination Host UnreachableFrom 192.168.1.100 icmp_seq=3 Destination Host UnreachableFrom 192.168.1.100 icmp_seq=4 Destination Host Unreachable

--- 192.168.1.1 ping statistics ---4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3000mspipe 3[email protected]:~$ tail /var/log/syslog -n 20Sep 3 11:15:27 gofox-To-be-filled-by-O-E-M kernel: [ 43.926344] ---[ end trace f68773f9b988bca3 ]---Sep 3 11:15:27 gofox-To-be-filled-by-O-E-M kernel: [ 43.932415] r8169 0000:03:00.0 eth0: link upSep 3 11:15:30 gofox-To-be-filled-by-O-E-M ntpdate[2071]: Can‘t find host ntp.ubuntu.com: Name or service not known (-2)Sep 3 11:15:30 gofox-To-be-filled-by-O-E-M ntpdate[2071]: no servers can be used, exitingSep 3 11:15:41 gofox-To-be-filled-by-O-E-M whoopsie[1006]: offlineSep 3 11:16:09 gofox-To-be-filled-by-O-E-M kernel: [ 85.984761] r8169 0000:03:00.0 eth0: link upSep 3 11:17:01 gofox-To-be-filled-by-O-E-M CRON[2447]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)Sep 3 11:17:27 gofox-To-be-filled-by-O-E-M kernel: [ 164.012906] r8169 0000:03:00.0 eth0: link upSep 3 11:17:51 gofox-To-be-filled-by-O-E-M kernel: [ 188.029088] r8169 0000:03:00.0 eth0: link upSep 3 11:18:15 gofox-To-be-filled-by-O-E-M kernel: [ 212.045170] r8169 0000:03:00.0 eth0: link upSep 3 11:18:51 gofox-To-be-filled-by-O-E-M kernel: [ 248.069269] r8169 0000:03:00.0 eth0: link upSep 3 11:19:15 gofox-To-be-filled-by-O-E-M kernel: [ 272.085347] r8169 0000:03:00.0 eth0: link upSep 3 11:19:51 gofox-To-be-filled-by-O-E-M kernel: [ 308.109475] r8169 0000:03:00.0 eth0: link upSep 3 11:19:56 gofox-To-be-filled-by-O-E-M anacron[909]: Job `cron.daily‘ startedSep 3 11:19:56 gofox-To-be-filled-by-O-E-M anacron[2602]: Updated timestamp for job `cron.daily‘ to 2014-09-03Sep 3 11:20:15 gofox-To-be-filled-by-O-E-M kernel: [ 332.125563] r8169 0000:03:00.0 eth0: link upSep 3 11:20:51 gofox-To-be-filled-by-O-E-M kernel: [ 368.149702] r8169 0000:03:00.0 eth0: link upSep 3 11:22:03 gofox-To-be-filled-by-O-E-M kernel: [ 440.201919] r8169 0000:03:00.0 eth0: link upSep 3 11:23:03 gofox-To-be-filled-by-O-E-M kernel: [ 500.238182] r8169 0000:03:00.0 eth0: link upSep 3 11:23:39 gofox-To-be-filled-by-O-E-M kernel: [ 536.262303] r8169 0000:03:00.0 eth0: link up[email protected]:~$

3、查看网络连接是否正常

sudo ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 29 8月 28 20:05 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
sudo cat /etc/resolv.conf
nameserver 127.0.1.1

运行结果

。。。
[email protected]:~$ lspci
。。。
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
02:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
[email protected]:~$ sudo lshw -C network
[sudo] password for gofox:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: [email protected]:03:00.0
logical name: eth0
version: 06
serial: 94:de:80:2a:f5:58
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.1.100 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:73 ioport:d000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff
[email protected]:~$ ifconfig
eth0 Link encap:以太网 硬件地址 94:de:80:2a:f5:58
inet 地址:192.168.1.100 广播:192.168.1.255 掩码:255.255.255.0
inet6 地址: fe80::96de:80ff:fe2a:f558/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:31 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:35 错误:0 丢弃:611 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:4309 (4.3 KB) 发送字节:5059 (5.0 KB)
。。。
[email protected]:~$ tail /var/log/syslog -n 20
Sep 3 11:15:27 gofox-To-be-filled-by-O-E-M kernel: [ 43.926344] ---[ end trace f68773f9b988bca3 ]---
Sep 3 11:15:27 gofox-To-be-filled-by-O-E-M kernel: [ 43.932415] r8169 0000:03:00.0 eth0: link up
Sep 3 11:15:30 gofox-To-be-filled-by-O-E-M ntpdate[2071]: Can‘t find host ntp.ubuntu.com: Name or service not known (-2)
Sep 3 11:15:30 gofox-To-be-filled-by-O-E-M ntpdate[2071]: no servers can be used, exiting
Sep 3 11:15:41 gofox-To-be-filled-by-O-E-M whoopsie[1006]: offline
Sep 3 11:16:09 gofox-To-be-filled-by-O-E-M kernel: [ 85.984761] r8169 0000:03:00.0 eth0: link up
Sep 3 11:17:01 gofox-To-be-filled-by-O-E-M CRON[2447]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Sep 3 11:17:27 gofox-To-be-filled-by-O-E-M kernel: [ 164.012906] r8169 0000:03:00.0 eth0: link up
Sep 3 11:17:51 gofox-To-be-filled-by-O-E-M kernel: [ 188.029088] r8169 0000:03:00.0 eth0: link up
Sep 3 11:18:15 gofox-To-be-filled-by-O-E-M kernel: [ 212.045170] r8169 0000:03:00.0 eth0: link up
Sep 3 11:18:51 gofox-To-be-filled-by-O-E-M kernel: [ 248.069269] r8169 0000:03:00.0 eth0: link up
Sep 3 11:19:15 gofox-To-be-filled-by-O-E-M kernel: [ 272.085347] r8169 0000:03:00.0 eth0: link up
Sep 3 11:19:51 gofox-To-be-filled-by-O-E-M kernel: [ 308.109475] r8169 0000:03:00.0 eth0: link up
Sep 3 11:19:56 gofox-To-be-filled-by-O-E-M anacron[909]: Job `cron.daily‘ started
Sep 3 11:19:56 gofox-To-be-filled-by-O-E-M anacron[2602]: Updated timestamp for job `cron.daily‘ to 2014-09-03
Sep 3 11:20:15 gofox-To-be-filled-by-O-E-M kernel: [ 332.125563] r8169 0000:03:00.0 eth0: link up
Sep 3 11:20:51 gofox-To-be-filled-by-O-E-M kernel: [ 368.149702] r8169 0000:03:00.0 eth0: link up
Sep 3 11:22:03 gofox-To-be-filled-by-O-E-M kernel: [ 440.201919] r8169 0000:03:00.0 eth0: link up
Sep 3 11:23:03 gofox-To-be-filled-by-O-E-M kernel: [ 500.238182] r8169 0000:03:00.0 eth0: link up
Sep 3 11:23:39 gofox-To-be-filled-by-O-E-M kernel: [ 536.262303] r8169 0000:03:00.0 eth0: link up
[email protected]:~$

4、分析问题

不出所料,应该是你的网卡使用了错误的驱动,见红色字体的内容:

你的网卡是“RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller”,不应使用r8169这个内核驱动模块来驱动,否则就出现象你现在这样拿到了dhcp的ip地址,但网卡却一直处于不断“r8169 0000:03:00.0 eth0: link up”的状态。这样是无法使用有线网络的。

正确的驱动要到realtek的网站下载,自己安装。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 driver for kernel 3.x and 2.6.x and 2.4.x”、版本为“8.038”的文件下载。下载好文件,解压到你的家目录中,然后在家目录中执行以下命令:

代码:

cd r8168-8.038.00
sudo ./autorun.sh


驱动安装完成,重启系统。你的有线网络就应该正常了。
时间: 2024-10-18 09:06:47

Ubuntu 16.04 RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller” 不能上网的相关文章

ubuntu 16.04 连接无线网络

最近在闲置的Dell inspiron 6400上安装了ubuntu 16.04版本,安装过程此处不细说. 安装完成后,发现WIFI无法开启,通过如下方法进行无线网卡的配置. 1)查看对应的PCI设备 [email protected]:/code# lspci 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03

【转】Ubuntu 16.04安装配置TensorFlow GPU版本

之前摸爬滚打总是各种坑,今天参考这篇文章终于解决了,甚是鸡冻\(≧▽≦)/,电脑不知道怎么的,安装不了16.04,就安装15.10再升级到16.04 requirements: Ubuntu 16.04 python 2.7 Flask tensorflow GPU 版本 安装nvidia driver 经过不断踩坑的安装,终于google到了靠谱的方法,首先检查你的NVIDIA VGA card model sudo lshw -numeric -C display 可以看到你的显卡信息,比如

Ubuntu 16.04编译Android 7.1.2

折腾了很久,终于搞定了这个环境.记录一下. 准备工作: 1. 首先在Ubuntu官网上下载Ubuntu16.04的官方镜像.官网下载地址(这个找了很久,这里可以直接下载ISO镜像):https://launchpad.net/ubuntu/+cdmirrors 2. 建议直接安装到自己硬盘上(推荐双系统),不要在虚拟机上搞,除非你有足够大的SSD.我之前在虚拟机上试过,电脑的性能完全发挥不出来,后来搞了双系统,发现一切都是那么舒服. 3. Android源码下载方法:https://lug.us

给Ubuntu 16.04更换更新源

给自家的Ubuntu下载软件速度有点慢,毕竟是从国外下载软件,就想更换到国内比较好的更新源(就是这些软件所在的服务器),一般直接百度Ubuntu更新源就能出来一大堆,这时候最好是找和自己Ubuntu版本一致的更新源,我的Ubuntu版本是16.04,下面是我找到的一个比较好的更新源 http://www.cnblogs.com/bovenson/p/5752213.html 下面是更换步骤: 1  备份原来的更新源 cp /etc/apt/sources.list /etc/apt/source

如何在Ubuntu 16.04上将Redis服务器设置为PHP的会话处理程序

介绍 Redis是一个开源的键值缓存和存储系统,也称为数据结构服务器,因为它对几种数据类型(如散列,列表,集合和位图等)提供高级支持.它还支持集群,使其在高可用性和可扩展的环境中非常有用. 在本教程中,我们将看到如何安装和配置一个外部Redis服务器,用作在Ubuntu 16.04上运行的PHP应用程序的会话处理程序. 会话处理程序负责存储和检索保存到会话中的数据.默认情况下,PHP使用文件这一点.这对于单个服务器工作得很好,但是由于会话信息被绑定到单个服务器,所以具有一些显着的性能和可扩展性限

Ubuntu 16.04 安装 VMware-Workstation-12

以前一直使用 Ubuntu + Virtaulbox ,最近测试了 VMware-Workstation-9,性能超过 Virtaulbox-4.2.x,下面是详细步骤: 1 首先准备一个Ubuntu 系统 lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04 LTS Release: 16.04 2 获得VMware-Workstation-12 安装包下载地址

ubuntu 16.04 Samba服务器搭建

搭建Samba服务器是为了实现Linux共享目录之后,在Windows可以直接访问该共享目录. 现在介绍如何在ubuntu 16.04系统中搭建Samba服务. 1.安装Samba服务 sudo apt install samba 在安装过程中出现如下错误:         错误:1 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 samba-libs amd64 2:4.3.11+dfsg-0ubuntu0.16.04.7 

如何在Ubuntu 16.04安装的Git【转】

转自:https://www.howtoing.com/how-to-install-git-on-ubuntu-16-04/ 介绍 现代软件开发中不可或缺的工具是某种版本控制系统. 版本控制系统允许您在源级别跟踪您的软件. 您可以跟踪更改,恢复到以前的阶段,并分支以创建文件和目录的备用版本. 其中最流行的版本控制系统是git ,分布式版本控制系统. 许多项目将它们的文件保存在一个git存储库中,像GitHub和Bitbucket这样的网站使得代码的共享和贡献变得简单和有价值. 在本指南中,我们

我的淘宝:Ubuntu 16.04.2上安装 Oracle 11.2.0.4 RAC

进入淘宝店铺 教程:Ubuntu 16.04.2上安装 Oracle 11.2.0.4 RAC 请支持下.价格好商量!