我无法连接到以太网,但可以连接到 wifi

我无法连接到以太网,但可以连接到 wifi

我使用的是ubuntu 16.04。这是输出ifconfig

-> ~$ ifconfig 
eth0      Link encap:Ethernet  HWaddr 3c:97:0e:e2:27:ea  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1243 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1243 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:89000 (89.0 KB)  TX bytes:89000 (89.0 KB)

wlan0     Link encap:Ethernet  HWaddr 40:f0:2f:3b:22:d2  
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::b147:93a0:c0e5:7ae6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4132 (4.1 KB)  TX bytes:7730 (7.7 KB)

在 Windows 上我可以连接以太网,我已经重新启动了网络管理器,但不起作用。

-> ~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

iface eth0 inet dhcp添加添加/etc/network/interfaces并执行后ifdown -a,命令ifup -a给出:

Internet Systems Consortium DHCP Client 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/3c:97:0e:e2:27:ea
Sending on   LPF/eth0/3c:97:0e:e2:27:ea
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0xb3b79015)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6 (xid=0xb3b79015)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10 (xid=0xb3b79015)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19 (xid=0xb3b79015)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9 (xid=0xb3b79015)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21 (xid=0xb3b79015)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11 (xid=0xb3b79015)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11 (xid=0xb3b79015)
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

这是我的司机信息:

09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)
    Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
    Flags: bus master, fast devsel, latency 0, IRQ 27
    I/O ports at 2000 [size=256]
    Memory at dbc04000 (64-bit, prefetchable) [size=4K]
    Memory at dbc00000 (64-bit, prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: r8169
    Kernel modules: r8169

-> ~$ dmesg | grep r8169
[    1.129765] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    1.130652] r8169 0000:09:00.0: can't disable ASPM; OS doesn't have ASPM control
[    1.143154] r8169 0000:09:00.0 eth0: RTL8168evl/8111evl at 0xffffc9000067a000, 3c:97:0e:e2:27:ea, XID 0c900800 IRQ 27
[    1.144101] r8169 0000:09:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[   25.526338] r8169 0000:09:00.0 eth0: link down

答案1

AskUbuntu 上的解决方案Realtek 以太网驱动程序错误 ubuntu 16.04建议您需要更新的驱动程序

sudo apt-get install r8168-dkms 

相关内容