已连接到有线网络,但互联网无法正常工作 Ubuntu 17.04

已连接到有线网络,但互联网无法正常工作 Ubuntu 17.04

有线网络显示已连接,但互联网不起作用。

sudo lshw -C network

终端显示以下内容:

description: Ethernet interface
   product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:01:00.0
   logical name: enp1s0
   version: 07
   serial: fc:45:96:84:73:b8
   size: 10Mbit/s
   capacity: 100Mbit/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 autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8106e-1_0.0.1 06/29/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
   resources: irq:124 ioport:4000(size=256) memory:a3200000-a3200fff memory:a3000000-a3003fff

我也尝试过禁用安全启动,但是也不起作用。

上面ifconfig显示:

enp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    ether fc:45:96:84:73:b8  txqueuelen 1000  (Ethernet)
    RX packets 104  bytes 12418 (12.4 KB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 978  bytes 75957 (75.9 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 405  bytes 44664 (44.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 405  bytes 44664 (44.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.10  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::e187:9d1f:f675:9bea  prefixlen 64  scopeid 0x20<link>
        ether 98:54:1b:f3:33:ce  txqueuelen 1000  (Ethernet)
        RX packets 5568  bytes 3045587 (3.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4345  bytes 938706 (938.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

注意:)在提问之前,我已经阅读了这里大部分类似的帖子/问题。这些都不适合我

请帮我解决这个问题。

答案1

What happens when you do the following?

sudo /sbin/modprobe -v -r r8169
sudo /sbin/modprobe -v r8169

If your r8169 comes back into service, then:

Had your machine previously suspended?  That is a well-known weakness

在 r8169 内核对象中:由于某种原因,suspend 后跟 resume 似乎禁用了 r8169 驱动程序,这种情况可以追溯到几年前。
上面的 2 条命令行解决了这个问题。
我最终创建了一个 systemd 服务来自动为我的笔记本电脑解决这个问题。

相关内容