无法使用有线连接连接到互联网,即使插入电源也是如此

无法使用有线连接连接到互联网,即使插入电源也是如此

我最近全新安装了 Ubuntu,没有双启动,所以一切都被删除了,但现在我无法连接到互联网,即使使用有线连接也是如此。在“连接信息”上,它显示它是“活动网络连接”,但我无法上网。以下是我在网上找到的一些命令的结果:

ifconfig

eth0      Link encap:Ethernet  HWaddr 00:23:54:2a:b5:fd  
          inet addr:10.42.0.1  Bcast:10.42.0.255  Mask:255.255.255.0
          inet6 addr: fe80::223:54ff:fe2a:b5fd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:138 errors:0 dropped:5 overruns:0 frame:0
          TX packets:1730 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:15637 (15.6 KB)  TX bytes:337255 (337.2 KB)

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:6386 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6386 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:502340 (502.3 KB)  TX bytes:502340 (502.3 KB)

----------------------------------------------
sudo 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:0c:00.0
       logical name: eth0
       version: 02
       serial: 00:23:54:2a:b5:fd
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list rom 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=half ip=10.42.0.1 latency=0 link=yes multicast=yes port=MII speed=10Mbit/s
       resources: irq:28 ioport:e800(size=256) memory:fcfff000-fcffffff memory:fcfe0000-fcfeffff memory:fea00000-fea0ffff
------------------------------------------------
sudo ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:23:54:2a:b5:fd  
          inet addr:10.42.0.1  Bcast:10.42.0.255  Mask:255.255.255.0
          inet6 addr: fe80::223:54ff:fe2a:b5fd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:410 errors:0 dropped:12 overruns:0 frame:0
          TX packets:1799 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:43699 (43.6 KB)  TX bytes:345354 (345.3 KB)

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:7716 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7716 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:613180 (613.1 KB)  TX bytes:613180 (613.1 KB)

--------------------------------------------------
lspci -nnk | grep -i net -A2

0c:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 02)
    Subsystem: Lenovo Device [17aa:2108]
    Kernel driver in use: r8169
---------------------------------------------------
cat/etc/network/interfaces
bash: cat/etc/network/interfaces: No such file or directory
---------------------------------------------------
 cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
-----------------------------------------------------
route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.42.0.0       0.0.0.0         255.255.255.0   U     1      0        0 eth0
--------------------------------------------
cat /var/lib/NetworkManager/NetworkManager.state
[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
WimaxEnabled=true
------------------------------------------
 sudo ethtool eth0
Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Link partner advertised link modes:  10baseT/Half 
    Link partner advertised pause frame use: No
    Link partner advertised auto-negotiation: No
    Speed: 10Mb/s
    Duplex: Half
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000033 (51)
                   drv probe ifdown ifup
    Link detected: yes
----------------------------------
cat syslog
cat: syslog: No such file or directory

请帮助我,非常感谢

答案1

请注意,您的以太网有一个 IP 地址,即非常不常见的 10.42.0.1。这表明以太网设置为与网络上的另一台计算机共享;相反,它应该设置为从路由器、交换机或其他接入点请求并接收 IP 地址。

请单击网络管理器图标,选择“编辑连接”,突出显示以太网连接并选择“编辑”。选择 IPv4 设置并确保其设置为“自动(DHCP)”。

在此处输入图片描述

从终端重新启动网络管理器:

sudo service network-manager restart

有改善吗?

相关内容