Ubuntu 16.04 LTS 中没有互联网连接

Ubuntu 16.04 LTS 中没有互联网连接

除了 Windows10 安装外,我还安装了全新的 Ubuntu。在 Windows 中,互联网运行良好。在 Ubuntu 中,我认为我有以太网连接,因为我有一个 IP(来自 DHCP?)并且还可以 ping 网络中的 IP。我尝试了很多,但都不起作用。以下是一些可能有用的命令的输出:

ifconfig

eno1      Link encap:Ethernet  HWaddr xx:xx:xx:xx:04:8c  
          inet addr:141.31.42.247  Bcast:141.31.43.255  Mask:255.255.252.0
          inet6 addr: fe80::xxxx:xxx:xxxx:xxxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:220325 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20845 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:211299782 (211.2 MB)  TX bytes:17066416 (17.0 MB)
          Interrupt:20 Memory:f0a00000-f0a20000 

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:1245 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1245 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:102353 (102.3 KB)  TX bytes:102353 (102.3 KB)

lspci -nnk | grep -e 0200 -e 0280
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I218-LM [8086:15a0] (rev 05)

sudo lshw -C network
  *-network               
       description: Ethernet interface
       product: Ethernet Connection (2) I218-LM
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eno1
       version: 05
       serial: 50:65:f3:41:04:8c
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.1-4 ip=141.31.42.247 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:29 memory:f0a00000-f0a1ffff memory:f0a3b000-f0a3bfff ioport:2040(size=32)

/etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

/etc/NetworkManager/NetworkManager.conf 

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=true

答案1

从我在文件中看到的内容来看/etc/network/interfaces,网络管理器当前未管理您的 eno1 接口。要使此接口受管理,请将以下节添加到文件/etc/network/interfaces

自动 eno1
iface eno1 inet 自动

然后通过执行以下操作重新启动网络管理器sudo service network-manager restart

相关内容